From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jos=E9_Eduardo_Fran=E7a?= Subject: Re: How to get the checkpoint size in remus code? Date: Wed, 24 Oct 2012 15:49:05 -0200 Message-ID: References: <75A1D5EB-12C7-4829-A3F7-4D77B2405FBB@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7204630991224475497==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: rshriram@cs.ubc.ca Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============7204630991224475497== Content-Type: multipart/alternative; boundary=f46d04389489f14bf904ccd1b380 --f46d04389489f14bf904ccd1b380 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Guys, I see too that I can get stats using struct xen_domctl. Then could I put the code below anywhere and get the dirty_count? For example: DECLARE_DOMCTL; uint32_t dirty_count =3D domctl.u.shadow_op.stats.dirty_count; Can I do this? Or are there a permanent data that return dirty_count or checkpoint_size? If yes, what's it? thanks 2012/10/17 Jos=E9 Eduardo Fran=E7a > Hi Shriram, > > Thank you for your reply. I'm sorry coz I saw your email yesterday and my > English is bad. > Ok... I saw your patch but I need to explain more my problem. > > In my master research, I intend to deploy a based-time dynamic checkpoint > that should work this way: if checkpoint size breaks *Lmax* (see attached > figure) I reduce checkpoint interval, and if checkpoint size doesn't brea= k > *Lmin* I increase checkpoint interval. After that I will evaluate the > performace. > > I had read remus code and I saw that remus control the elapsed time in > > endtime =3D time.time() > elapsed =3D (endtime - closure.starttime) * 1000 > > if elapsed < cfg.interval: > time.sleep((cfg.interval - elapsed) / 1000.0) > > Then I thought I could change the checkpoint interval close to code above= , > but I suppose I need get checkpoint size. But here the remus code is pyth= on > and I saw (or thought) that checkpoint size is gotten on *xc_shadow_op_st= ats_t > *stats* or better on *stats->dirty_count*PAGE_SIZE*. > > Would I get checkpoint size into remus code? I thought it's easier this > way for I intend to do. > Please, help me, coz my time is running out. > > Thanks jefranca > > PS: My English is terrible coz I'm not native > > > 2012/10/5 Shriram Rajagopalan > >> On Wed, Oct 3, 2012 at 4:11 AM, Jos=E9 Eduardo Fran=E7a >> wrote: >> > >> > I thought remus used xc_domain_save. Is this function used from live >> > migration? >> > >> > Futhermore I have two doubts if really Remus takes the last iteration = of >> > live migration >> > >> > What's the function? >> >> There is no specific function. xc_domain_save is where everything >> happens. The infinite loop >> that basically keeps sending checkpoints @ a particular frequency >> >> >> > And how to get de I/O disk size on each period? >> > >> >> This depends on the disk backend. With blktap2 (unfortunately not >> available in 3.* kernels) >> tap-remus driver can give you the number of disk blocks sent per >> checkpoint. >> >> With DRBD, it needs a little bit of hacking into the kernel module to >> return the number of disk blocks >> being sent with each checkpoint. >> >> >> >> I'm doing my master research and I need to adapt remus code. Now... I >> >> wanna get the checkpoint size (memory + disk) on each period. Does >> someone >> >> know what function does this? I think some fd object's function in >> remus >> >> code could just get the memory size. >> >> >> >> You can get memory checkpoint stats for each iteration - like >> number of pages dirtied, size of data actually transmitted after >> compression (including headers, etc), >> time to checkpoint, etc. >> >> The attached patch (for xen-4.1.2) will give you the memory checkpoint >> stats for each checkpoint and >> can be easily parsed. >> >> shriram >> > > --f46d04389489f14bf904ccd1b380 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Guys,

I see too that I can get stats using struct xen_domctl.
=
Then could I put the code below anywhere and get the dirty_count? For e= xample:

=A0=A0=A0 DECLARE_DOMCTL;
=A0=A0=A0 uint32_t dirty_count = =3D domctl.u.shadow_op.stats.dirty_count;

Can I do this?

Or are there a permanent data that return dirty= _count or checkpoint_size? If yes, what's it?

than= ks

2012/10/17 Jos=E9 Eduardo Fran=E7a <jefran= ca@gmail.com>
Hi Shriram,

Thank you for your reply. I'm sorry coz I saw your e= mail yesterday and my English is bad.
Ok... I saw your patch but I need = to explain more my problem.

In my master research, I intend to deplo= y a based-time dynamic checkpoint that should work this way: if checkpoint = size breaks Lmax (see attached figure) I reduce checkpoint interval,= and if checkpoint size doesn't break Lmin I increase checkpoin= t interval. After that I will evaluate the performace.

I had read remus code and I saw that remus control the elapsed time in<= br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 endtime =3D time.time()
=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 elapsed =3D (endtime - closure.starttime) * 100= 0

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if elapsed < cfg.interval: =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 time.sleep((cfg.interval - el= apsed) / 1000.0)

Then I thought I could change the checkpoint interv= al close to code above, but I suppose I need get checkpoint size. But here = the remus code is python and I saw (or thought) that checkpoint size is go= tten on xc_shadow_op_stats_t *stats or better on stats->dirty_= count*PAGE_SIZE.

Would I get checkpoint size into remus code? I thought it's easier = this way for I intend to do.
Please, help me, coz my time is running out.

Thanks jefranca

PS: My English is terrible coz I'm not nativ= e


2012/10/5 Shriram Rajagopalan <rshriram@cs.ubc.ca>
On Wed, Oct 3, 2012 at 4:11 AM, Jos=E9 = Eduardo Fran=E7a <jefranca@gmail.com> wrote:
>
> I thought remus used xc_domain_save. Is this function used from live > migration?
>
> Futhermore I have two doubts if really Remus takes the last iteration = of
> live migration
>
> What's the function?

There is no specific function. xc_domain_save is where everything
happens. The infinite loop
that basically keeps sending checkpoints @ a particular frequency


> And how to get de I/O disk size on each period?
>

This depends on the disk backend. With blktap2 (unfortunately not
available in 3.* kernels)
tap-remus driver can give you the number of disk blocks sent per checkpoint= .

With DRBD, it needs a little bit of hacking into the kernel module to
return the number of disk blocks
being sent with each checkpoint.


>> I'm doing my master research and I need to adapt remus code. N= ow... I
>> wanna get the checkpoint size (memory + disk) on each period. Does= someone
>> know what function does this? I think some fd object's functio= n in remus
>> code could just get the memory size.
>>

You can get memory checkpoint stats for each iteration - like
number of pages dirtied, size of data actually transmitted after
compression (including headers, etc),
time to checkpoint, etc.

The attached patch (for xen-4.1.2) will give you the memory checkpoint
stats for each checkpoint and
can be easily parsed.

shriram


--f46d04389489f14bf904ccd1b380-- --===============7204630991224475497== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7204630991224475497==--