On Tue, May 30, 2023 at 11:21:38AM +0800, Wang, Lei wrote: > On 4/27/2023 20:43, Andrei Gudkov via wrote: > > + deadline constraint. > > + > > + :param model: `MemoryModel` object for a given VM > > + :param bandwidth: Bandwidth available for migration [bytes/s] > > + :param downtime: Max allowed downtime [milliseconds] > > + :param deadline: Max total time to migrate VM before timeout > > [milliseconds] > > + :return: Predicted migration time [milliseconds] or `None` > > + if migration process doesn't converge before given deadline > > + """ > > + > > + left_zero_pages = model.num_zero_pages() > > + left_normal_pages = model.num_total_pages() - model.num_zero_pages() > > + header_size = 8 > > In the cover letter: "Typical prediction error is 6-7%". I'm wondering if the > 6-7% is less or more than the real migration time. I think 2 potential factors > will lead to less estimation time: > > 1. Network protocol stack's headers are not counted in, e.g., TCP's header > can > be 20 ~ 60 bytes. > > 2. The bandwidth may not be saturated all the time.
Yes, I totally missed network headers in my model! I do not see any noticeable assymetry in prediction error. Sometimes prediction overestimates actual migration time, sometimes -- underestimates. I think that prediction error is caused mainly by VM workload not being perfectly stable over time.