On Tue, 2003-04-08 at 21:13, Hancock, David (DHANCOCK) wrote:
> Part of my question is probably naïve, but please bear with me. The
> ThreadedAppServer process is, umm THREADED. But on Linux (at least
> prior to RedHat 9.0), threads are in fact lightweight processes. The
> behavior that I see is that almost every one of the thread/processes
> has exactly the same virtaual size and same shared size and same
> resident-set size. This leads to the first question:
>
> Does each thread consume the amount of memory it's reported to
> be using?
No, threads run in a _shared_ address space. So don't multiply the
virtual size by the number of threads... it just looks that way.
> And then a specific question. I'm running RedHat 7.3, Webware 0.8,
> and Python 2.2, Apache 1.3.2x, mod_webkit adapter. I have the Min,
> Max, and Start threads parameters set the same (to 30). When I run
> the ThreadedApp, ps reports that each thread is using 288MB virtual,
> with a resident-set size of 22340. Running top, on the other hand,
> shows that each thread is 22MB with resident-set size of 21MB. The
> free command (and the headers for top) show that I'm only using about
> 520 MB of real memory; lots of real memory is untouched, and swap has
> never been touched. This leads to my second question:
>
> Am I misinterpreting something about these numbers? What's
> the true memory usage of the appserver?
The 22MB is shared by all threads in the process. So the total memory
usage is 22MB.
--
Jason D. Hildebrand
jason@...
|