From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Mon 08 Nov 2004 - 12:55:22 GMT
On Thu, Nov 04, 2004 at 11:58:30AM +0200, Andreea Gansac wrote:
> Hi,
>
> I have a server with 4 running vservers on it and a big problem: after
> a period of time (sometimes a week) there is no more free memory and the
> memory is swapped out on the disk until the server freezes because of
> too much swapping.
>
> This is the hardware configuration for the host server:
>
> Intel(R) Pentium(R) 4 CPU 2.00GHz
> 1G RAM
> 1G Swap
>
> On the host server I have Fedora Core 2 and some vservers have FC1 and
> some FC2. The server is running kernel 2.4.26 with patch-2.4.26-vs1.28.diff.
> I use util-vserver-0.30.
>
> If I add the RSS of all processes running:
>
> echo $[`vps -A u | sed 's/ */ /g' | cut -d ' ' -f 8 | grep -v RSS |
> xargs | sed 's/ /+/g'`]
>
> I get 600M of memory used.
>
> But when I run free I get 832M used plus swap.
vps might not see all the used memory, for example memory
used by the kernel (e.g. for process structures) does not
belong to processes, nevertheless it uses up RAM
> [root_at_atlas vservers]# free
> total used free shared buffers
> cached
> Mem: 905196 897072 8124 0 5844
> 58496
> -/+ buffers/cache: 832732 72464
> Swap: 1020116 136872 883244
>
> This morning something really weird is happening:
>
> After running the command ps -aux several times in a vserver,
> the RSS for the httpd processes gets smaller and smaller. When I restart the
> httpd service every httpd process has 6M RSS. After several ps -aux commands the RSS
> is 56K. How is this possible?
simple, RSS is Resident Set Size (the amount of RAM used
for this process) and this of course can get smaller over
time when unused portions of that process get swapped out
> And the clamd process which usually needed 16M RSS now has 328K.
which actually means, that just 328K are used often enough
to keep them in memory, the rest will be swapped out ...
> The services running in each vservers are httpd, mysql, postfix/qmail
> , clamd, dovecot.
>
> Well just a few minutes ago the server freezed and I had do reset it.
> Now everything seems to be normal.
sounds strange but 2.4.26 had some memory issues (corner
cases, but nevertheless) I'd suggest upgrading to 2.4.27
(with vs1.29) and see if this happens again
1GB might be a little problematic, do you use highmem?
best,
Herbert
> Has anyone encountered this problem with vservers?
>
> Thanks a lot.
> --
> Andreea Gansac
> Web Engineer
> iNES Group
> tel: 021-232.21.12
> fax: 021-232.34.61
> www.ines.ro
>
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver