Subject: Re: [vserver] Sleeping servers - Bug or Feature?
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Sun, 7 Jun 2009 01:11:51 +0200

On Thu, Jun 04, 2009 at 06:50:36AM -0500, Michael S. Zick wrote:
> Here is something I noticed which does not 
> make any difference in my use case, but.. FYI:

> My host server is used to host guest distributions
> - - mostly for software development
> - - my host "sleeps" (suspend to ram) when I do

> For the host:
> wolf-c2q ~ # uptime
>  06:37:52 up 9 days, 14:11,  3 users,  load average: 0.20, 0.06, 0.02

> Which looks about correct (it is elapsed wall time) -
> *including the wall time the system was asleep*

> For the guests:
> wolf-c2q ~ # vserver-stat
> CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME
> 14156    2   8.4M   1.6M   0m00s42   0m00s49   1d08h43 deb-wolf
> 14158    2     6M   1.5M   4h16m10  24m52s83   1d08h43 gen2-32

> Which looks a little bit strange -
> even if the "asleep time" was deducted.

the uptime virtualization is implemented using an
'offset' a bias_uptime, which basically stores the
time when the guest is started and shows the time
difference between now and that stored values as
uptime inside the guest

so, as long as time progresses in a linear way,
host and guest uptime should not drift (i.e. they
should keep the same offset)

> I **know** I have had them awake more than 32 hours in the
> past 9 days (I don't know the exact time, but > 1d08h)

maybe the guests simply got restarted? looks like
they have the same uptime ...

HTH,
Herbert

> - - - -
> 
> Versions:
>                    Kernel: 2.6.27.10-vs2.3.0.36.2
>                    VS-API: 0x00020304
>              util-vserver: 0.30.215; Dec 17 2008, 10:37:16
> 
> Mike