Re: [vserver] swap overflows if flag VIRT_MEM is set

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Sat 01 Sep 2007 - 01:37:13 BST
Message-ID: <20070901003713.GF11052@MAIL.13thfloor.at>

On Fri, Aug 31, 2007 at 01:40:28PM +0200, Andreas Piper wrote:
> Hello list,
>
> when I set the flag VIRT_MEM in /etc/vservers/<vservername>/flags,
> the vserver seems to consume very fast all of its swap-space, as
> observed with 'free' inside the vserver. I am running Horde-3.1.4
> under apache-2.2.3 with php-5.2.0 on the vserver, every reload of the
> Horde-webpage takes some 400 MByte from the swap (and nothing from
> Mem, which remains nearly completely free). As a result, I get 'out of
> memory'-errors very soon.
>
> The master-server does not see the change in used swap-space at all,
> 'free' on the master shows 0 swap-usage, even if the vserver shows
> 3.5GByte of swap-usage.
>
> I am using vserver version vs2.0.2wcr on Linux version 2.6.17.13 under
> Debian etch, and util-vserver version 0.30.212-1

first, I'd suggest to get a stable and recent version
of the patch/kernel and tools e.g. vs2.2.0.3 and 0.30.213

> The content of /etc/vservers/<vservername>/flags is:
> sched_prio
> virt_mem
> virt_uptime
> virt_load
> virt_cpu
>
> When I leave out the VIRT_MEM flag, the swap-space on the vserver
> remains empty, and Memory-usage increases by reasonible values, but
> 'vserver-stat' still shows a VSZ of 15.9+ (whatever that means).
>
> Does it help to just leave out the VIRT_MEM-flag, or is there some
> real memory management problem behind this?

the flag only affects what the guest will see, not the
actual memory used, and it will not affect (or heal) the
OOM kills you are observing when you run out of memory

in the above mentioned kernel, the memory accounting and
limitation is a little easier to understand for the user
and thus should give you better results, but keep in mind
that there is nothing which can be done if your guest
actually runs out of memory, except for OOM killing a
few processes ...

HTH,
Herbert

> Thanks for any help,
> Andreas
Received on Sat Sep 1 01:37:25 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 01 Sep 2007 - 01:37:29 BST by hypermail 2.1.8