[Vserver] memory : "free" gives wrong numbers

From: Xavier Montagutelli <xavier.montagutelli_at_unilim.fr>
Date: Tue 18 Oct 2005 - 19:48:09 BST
Message-Id: <200510182048.09471.xavier.montagutelli@unilim.fr>

Hello list,

The "free" command gives me false number on vservers. Can someone reproduce
the same as below :

*) Host

linux 2.6.12.4, vs 2.0
server memory : 5 Go

*) On vserver #1 :

[root@vs1] # free
                     total used free
Mem: 5128164 1373868 3754296
-/+ buffers/cache: -3077072 8205236 <<<--- negative number

[root@vs1] # ps auxw | awk '{rss+=$6} END {print rss}'
1991724

*) On vserver #2 :
[root@vs2] # free -g
                      total used free
Mem: 4 0 4
-/+ buffers/cache: 4091 9 <<<--- 4To used !!

*) On the host :

[root@host] # free
                    total used free
Mem: 5128164 4964772 163392
-/+ buffers/cache: 512404 4615760

[root@host] # vps auxw | awk '$4 == "vs1" {rss+=$8} END {print rss}'
1989684

So with "ps" on the vserver or "vps" on the host, vserver #1 seems to consume
nearly 2Go of RSS. vserver-stat gives the same information.
But free gives a negative number for used memory on the vserver #1. And on
vserver #2, memory used is ... erk ... interesting.

Do you think this is related to vserver, perhaps because of a total memory
exceeding 4 Go (32 bits) ? Or is it a (known) limit of the "free" command ?

Thx

-- 
Xavier Montagutelli
Service Commun Informatique
Universite de Limoges
Tel : +33 555457720
Cle GPG : http://pgp.mit.edu 1024D/175CE198
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Tue Oct 18 19:48:40 2005
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 18 Oct 2005 - 19:48:52 BST by hypermail 2.1.8