Re: Is my process using swap ?
- From: Logan Shaw <lshaw-usenet@xxxxxxxxxxxxx>
- Date: Thu, 14 Dec 2006 02:00:34 GMT
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.
.
- References:
- Is my process using swap ?
- From: kejoseph
- Is my process using swap ?
- Prev by Date: Re: can rc3.d shutdown use TCP/IP?
- Next by Date: Re: can rc3.d shutdown use TCP/IP?
- Previous by thread: Re: Is my process using swap ?
- Next by thread: can rc3.d shutdown use TCP/IP?
- Index(es):
Relevant Pages
|