memory usage on Scyld slave nodes (fwd)
Jag
agrajag at linuxpower.org
Fri Feb 16 19:41:56 PST 2001
On Fri, 16 Feb 2001, Jag wrote:
> On Fri, 16 Feb 2001, Rick Niles wrote:
>
> >
> > > It works fine, but when I use BeoStatus to look at the slaves it
> > > shows that the slaves all have about 400MB of their memory taken up.
> > > Anyone know what is eating up the RAM on those slaves? Each node
> > > has a total of 512MB of RAM. Why is beowulf eating up so much of
> > > it? Thanks.
> >
> > I'm adding up all the memory that's in use on the entire machine, include
> > buffer cache for the filesystem. Linux tries to use any spare memory up
> > to about 90% of available as a cache of the filesystem.
> >
> > I realize that this make that value in beostatus pretty much
> > worthless. It's also been pointed out that it's also the more
> > expensive for the kernel to compute. I believe "top" actually walks
> > though the proc table and adds up all the memory to get it's value,
> > but that also seems a bit expensive to me.
> >
> > So short answer, it's not a problem, it's just not a real useful number
> > and I'll still deciding how to make it better.
>
> When you run the 'free' command, the first few numbers it shows seems to
> be similar to what beostatus shows. What would probablly be a lot more
> useful would be the numbers from the seconds line, with the buffer/cache
> usage subtracted from to total used. I haven't yet looked to see how
> expensive that computation is, but I think this number would be a lot
> more useful to show as I know the kernel will generally make total usage
> near 90%
I glanced at the code for both free and top (they're actually part of
the same package), and both of them pull memory information from
/proc/meminfo, the same place that libbeostat (and thus beostatus) pull
from. Attached is a small patch that impliments my suggested change in
the way beostatus shows the information.
Jag
-------------- next part --------------
diff -ur beostatus-2.0.8.orig/beostatus.c beostatus-2.0.8/beostatus.c
--- beostatus-2.0.8.orig/beostatus.c Fri Jan 5 08:37:07 2001
+++ beostatus-2.0.8/beostatus.c Fri Feb 16 22:31:07 2001
@@ -165,7 +165,7 @@
exit (EXIT_FAILURE);
status->mem.max = (double)(meminfo.mem.used + meminfo.mem.free)/1024.0/1024.0;
- status->mem.curr = (double) meminfo.mem.used / 1024.0 / 1024.0;
+ status->mem.curr = (double) (meminfo.mem.used - meminfo.buffers - meminfo.cached) / 1024.0 / 1024.0;
status->mem.unit = "MB";
status->swap.max = (double)(meminfo.swap.used + meminfo.swap.free) / 1024.0 / 1024.0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20010216/20893973/attachment.sig>
More information about the Beowulf
mailing list