On Tue, 2007-12-18 at 17:03 +0200, Gilad Ben-Yossef wrote:
> Oren Held wrote:
> > There's something in your question I don't understand:
> > If a process has 1gb in virtual memory, of which 500mb in physical,
> > then this means that it has 500mb in swap. 
> 
> No, that is not what it means.
> 
> Virtual memory amount might be different then physical memory amount due 
> a whole bunch of different reason, swapping being just a single instance 
> and not even the common one.

> In short, please ask your question again using more exact terms so that 
> we understand what you want to ask.

I was using the 1.5GB process only as a (bad) example. If you really
want specifics, then said process has about 1.5GB under the "virtual"
column (which can indeed be a lot of different things other then just
real + swap, although interestingly this is exactly how 'man top'
defines VIRT), about 200MB under "resident" column, some 8MB under
"shared", and 1.2GB under SWAP (according to top, not htop - I couldn't
get htop to list this). Now according to 'free' only 250MB of swap are
in actual use. The way I see it, 'top's SWAP is computed from "virtual"
- "resident" regardless of how much swap space the process actually uses
- so as Gilad said - talking about the virtual image size is next to
useless. 

Anyway, the original question wasn't really about that specific process
- I simply figured it as a good example. Obviously I was wrong, but
that's ok - I was expecting something like this :-)

The real question - as emphasized by all the comments I received - is:
can I know how much memory the process is accessing (within some time
period) specifically when its more then the total of pages actually held
in physical memory.
*accessing = reading to or writing from, not just having them assigned
to the process.

-- 

Oded


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to