Question about 'top' values on memory usage

Alfred Perlstein alfred at freebsd.org
Mon Oct 15 15:32:49 PDT 2007


* William LeFebvre <bill at lefebvre.org> [071015 06:49] wrote:
> 
> Unfortunately, freebsd does not appear to track the amount of shared 
> virtual memory for each process.  It could be obtained by walking 
> through all the pages in a process's vm map, but that would really slow 
> top down.  I don't know of any freebsd utility that would give that 
> information for an individual process.  But hey, if it's out there 
> somewhere where it is easy to grab, I would be very happy to add it to top.

Or this could be properly accounted for when the map is updated?

> Personally, based on my experience, I would be more concerned with the 
> amount of available cpu cycles than memory.  In my experience, once you 
> run out of idle time on a web server you have exceeded its capacity to 
> serve pages.  In that situation it doesn't matter how many httpd 
> processes there are, the system is still not able to keep up with 
> demand.  And that will probably happen before the system starts 
> thrashing from limited memory.

Bill, I would have to differ with you based on personal experience,
I've almost never run out of cpu on a webserver, typically it's the
RAM that gets blown out.   Once the server starts to page, you typically
wind up with a cascade failure and the box just goes ... belly up.

I would worry about ram.

Typically the best way to scale a box is to load it and keep running
more httpds until "something happens" or you reach enough httpd to
service your load, at that point if "something happens" (ie the box
tanks) you add more ram.

-- 
- Alfred Perlstein


More information about the freebsd-stable mailing list