OpenVZ Forum


Home » General » Support » But why is the RAM gone?!
Re: But why is the RAM gone?! [message #26681 is a reply to message #26669] Wed, 30 January 2008 18:41 Go to previous messageGo to previous message
HubertD is currently offline  HubertD
Messages: 22
Registered: August 2006
Junior Member
I just called the ipssend command in question a few hundred thousand times and there seems to be no impact on the free memory.

So, I'm pretty sure that ipssend is not the origin of my memory leak.

Also, I wrote a small script to show the difference between ps and /proc/meminfo:

#!/usr/bin/perl -w
use strict;

my $pssum = 0;
open DATA, "/bin/ps -o rss= ax |";
while ( <DATA> ) { $pssum += $_; }
close DATA;

my $memtotal = 0;
my $memfree  = 0;
my $buffers  = 0;
my $cached   = 0;
open DATA, '</proc/meminfo';
while (<DATA>) {
        s/^\s+//;
        my @arr = split(/\s+/);
        if ($arr[0] eq 'MemTotal:')  { $memtotal = $arr[1]; }
        if ($arr[0] eq 'MemFree:')   { $memfree  = $arr[1]; }
        if ($arr[0] eq 'Buffers:')   { $buffers  = $arr[1]; }
        if ($arr[0] eq 'Cached:')    { $cached   = $arr[1]; }
}
close DATA;

my $used = $memtotal - $memfree - $buffers - $cached;
my $diff = $used - $pssum;
print "pssum: $pssum used: $used diff: $diff\n";


This shows a diff of ~1.7GB at the moment!

I have few knowledge of linux memory management, but this difference certainly doesn't seem normal to me?

Can somebody give me hints about how to find out more?

Hubert
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Shutdown of VE affects interface on HW-node?
Next Topic: Starting & Stopping Multiple VPS...
Goto Forum:
  


Current Time: Sat Jul 13 14:17:31 GMT 2024

Total time taken to generate the page: 0.02623 seconds