Date: Fri, 24 Sep 2004 13:46:44 -0500 From: Norm Vilmer <norm@etherealconsulting.com> To: Gregor Mosheh <stigmata_blackangel@yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: please educate me on memory usage Message-ID: <41546B94.7090508@etherealconsulting.com> In-Reply-To: <20040924165952.62558.qmail@web53808.mail.yahoo.com> References: <20040924165952.62558.qmail@web53808.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Gregor Mosheh wrote: > I was looking at my top output and was surprised to > see that the bulk of my 512 MB of memory was in use, > since the server really has fairly little running. > It's not a problem, but I was wanting some > clarification on where this memory was being used, for > my own education. > > The original goal was that I had figured that a lot of > memory would be unused since so little is running, and > perhaps I could allocate some more to Postgres. > Apparently nowt, but I don't quite understand all the > intricacies of what *is* using my memory. > > 35 processes: 1 running, 34 sleeping > CPU states: 0.0% user, 0.0% nice, 0.0% system, > 0.0% interrupt, 100% idle > Mem: 158M Active, 207M Inact, 80M Wired, 20M Cache, > 60M Buf, 33M Free > Swap: 2000M Total, 6848K Used, 1994M Free > > So, 158 MB of memory in use. Does that include > anything other than process' memory, e.g. shared > memory, kernel memory, some of the fs buffer? If I add > up the VSZ column from 'ps aux' I get 110 MB. > > The server's only processes of interest are MySQL, > Postgres, and Apache httpd. There are cron, sendmail, > etc. but these are all <1M usage according to both top > and ps. > > MySQL has VSZ 38 MB and RSS 4 MB. > > Postgres (incl stats collectors) has VSZ 25 MB and RSS > <1 MB. There's also the shared memory: ipcs agrees > with my postgresql.conf settings: 2 MB of shared > memory buffers. > > Apache 1.3 has 15 processes, each using 3.6 MB VSZ and > 1.5 MB RSS. I was of the impression that the bulk of > this memory was shared with the parent process, no? > > So where's the rest of the memory going? > > The 80M Wired is interesting, since I don't know where > it's going. I presume that PG's 2 MB of shared buffers > are wired (though I saw an email today that implied > otherwise), but how could I track down the rest of it? > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail is new and improved - Check it out! > http://promotions.yahoo.com/new_mail > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > My guess would be MySQL, however I am no expert. My machine is running apache, ntp, ipfw, and other typical stuff like syslog, sendmail, etc. Mem: 11M Active, 122M Inact, 44M Wired, 28K Cache, 57 Buf, 292M Free. I did optimize my machine using doc's I read on www.FreeBSD.org.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41546B94.7090508>