Re: Is my process using swap ?



kejoseph@xxxxxxxxxxx wrote:
I am using Solaris 9 with some java processes using upto 2-3GB.

Is there any way to tell whether a particular process is being swapped
to disk ?

In the general case, maybe a better question is how much memory pressure
your process is creating.

Pages of your process might be mapped to files on disk. If physical
memory gets low, the operating system will discard some of those pages
(or write them back to disk if they've been changed, and then discard
them), freeing up memory for other purposes. If you then access those
pages again, it will read them back in from the same files. This can
happen all day long and you can seriously slow down the machine without
using a single byte of actual swap space.

So, usually it's best to just see if your process is causing the system
to run low on physical memory. That's usually the real information
you're looking for, rather than whether it's swapping.

Luckily, that's fairly easy to do. Just use a tool like prstat, top,
or ps[1] to watch your resident set size over time and see if it
keeps dropping. If that is the case, then either (a) your process
is freeing up memory a lot, or (b) the system is experiencing memory
pressure and discarding pages that your process was using. It's
not an absolute indicator, but if free physical memory gets low and
then immediately afterwards your process's resident set size drops,
your process is probably a major contributor to memory pressure.

- Logan

[1] specifically, "ps -e -o pid,user,vsz,rss,args" is often good.
.



Relevant Pages

  • Proposed Assembler Commands
    ... ACM Automatically Clear Memory ... BKCRDR Backspace Card Reader ... BKSPD Backspace Disk ... EIAO Execute In Any Order ...
    (sci.electronics.design)
  • Re: Att. Alex Nichol -VM cont.
    ... I find documentation that says a 4kb page in memory is written to the hard ... manner that a 4kb memory page is equal to a 4kb cluster written on the disk". ... So where is the basis for saying since 4kb paging in memory that 4kb clusters ...
    (microsoft.public.windowsxp.general)
  • Re: Slow performance
    ... Leaving your computer on 24/7 means that if any programme has a memory ... The Disk Defragmenter report shows you have minimal free disk space. ... select Properties, General, Advanced and check the box before Compress ... Volume fragmentation ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Slow performance
    ... I realize that the pagefile usage is excessive and I need to reduce memory ... I've never messed with those settings before. ... Peak are greatly in excess of the installed RAM. ... The Disk Defragmenter report shows you have minimal free disk space. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: teaching a child - console or GUI
    ... I use a RDBMS to reuse existing code and optimizations. ... >>And loading them in a system under load (with constant disk io) is worse ... quality stuff), and quality power supply, quality memory etc. ... > lists of pointers on disk, extract files of frequent search fields in ...
    (comp.lang.pascal.delphi.misc)