[hobbit] Linux memory Usage

Henrik Stoerner henrik at hswn.dk
Thu Apr 20 16:33:00 CEST 2006


On Thu, Apr 20, 2006 at 07:56:27AM -0400, Vaishnavi R wrote:
> I have installed Hobbit on Red Hat ES Linux.
> Everything works fine but I feel the memory usage by Hobbit is high.
> 
> My Hobbit version is 4.1.2p1
> 
> I am not very good on Linux and am not sure how to find out which process is
> consuming so much memory.
[snip]
> Following is  a snapshot of how memory was used

The data you provide is simply not enough to say what is using your
memory.

A look at your data shows a couple of things:

1) Swap is just not used - it stays constant at 160 KB. So there's
   really no memory pressure at all.

2) The "used" column in the "-/+ buffers/cache" is what you should 
   be looking at. Linux will use lots of memory for various types
   of disk caches, but these can be freed instantaneously if some
   application needs memory. So when evaluating your memory usage,
   you shouldn't really count the buffer/cache memory as "used".
   Memory usage grows from ~296 MB upon startup to ~300 MB after 
   starting Hobbit - it seems quite reasonable for Hobbit to use 
   4 MB of memory just to run. Half an hour later, it's grown an 
   extra MB, which is also normal as more data is being recorded
   by Hobbit. After that it should be stable, unless you add more 
   tests or hosts, of course.
   6 hours later you're up to 350 MB used - whether that is used
   by Hobbit or something else I cannot tell.


What you *really* should do is to see how much memory the different
processes are using. E.g.

   $ ps vax --sort -rss

will show a list of all processes currently running, sorted by memory
usage. That should give you a much better clue at what is using memory
on your system. I am fairly confident that you'll see Hobbit is not
using a lot of memory. If I run this on my main production system (which
is also running 4.1.2p1, incidentally), I get this:

$ ps v --sort -rss -u hobbit
  PID TTY      STAT   TIME  MAJFL   TRS   DRS  RSS %MEM COMMAND
  745 ?        S    1780:29     1   162 27077 25600  2.4 hobbitd --pidfile
 1241 ?        S    918:42      1   154 11789 10008  0.9 hobbitd_alert --c
 1242 ?        S    2638:33     7   167  6696 2984  0.2 hobbitd_rrd --rrdd
27775 ?        S    153:39      1   146  4341 2704  0.2 hobbitd_client
27774 ?        S     63:42      0    99  2844 1832  0.1 hobbitd_channel --
 6171 ?        S    338:33      1   167  5624 1736  0.1 hobbitd_rrd --rrdd
 6582 ?        S      0:00      0   669  2002 1344  0.1 sh -c vmstat 300 2
 1234 ?        S    3099:30     1    99  2332 1264  0.1 hobbitd_channel --
 1233 ?        S    629:37      1    99  2332 1200  0.1 hobbitd_channel --
 1232 ?        S     12:41      1    99  2332 1184  0.1 hobbitd_channel --
 6170 ?        S    153:12      0    99  2332 1144  0.1 hobbitd_channel --
 1243 ?        S     21:55      0   108  2515 1136  0.1 hobbitd_history
 6584 ?        S      0:00      0    79  1824  760  0.0 vmstat 300 2
  743 ?        Ss     1:06      0   101  1802  696  0.0 hobbitlaunch --con

This system has 1 GB of memory, and handles over 2000 monitored hosts.
It's been running since March 12. And Hobbit uses 52 MB of memory (sum
of the RSS column, where numbers are in KB).


Regards,
Henrik




More information about the Xymon mailing list