[dtrace-discuss] Re: How to trace process memory usage
Jim Mauro
James.Mauro at Sun.COM
Mon Dec 4 16:04:28 PST 2006
Got it - I didn't realize the window of time between "things are getting
slow" and
"we're wedged" was so small. I would not start with a DTrace collection
in the back ground.
You could run prstat in collect mode ("prstat -s rss -c 10 >
/var/tmp/prstat.out" - the
10 is an interval of 10 seconds) in the background. If it's a user land
process growing,
you'll hopefully capture something before things wedge.
I would also recommend running "kstat -n system_pages 10 >
/var/tmp/kstat.out"
in the background. You can track the free page list size, and kernel
pages. Again,
hopefully there will be a trend there we can drill down on before things
get wedged.
Between those 2, we should be able to determine if it's a user land
process consuming
memory, or something in the kernel. The next step will be based on what
that tells
us.
HTH
/jim
Peter Eriksson wrote:
>> prstat(1) is your friend. "prstat -s rss" is a wonderfully simple and effective
>>
>
> There is only one small problem with that approach - when things are running normally we don't see any strange behaviour. And when things misbehave we typically can't start any new processes (fork: resource temporarily unavailable)...
> Ie, no prstat/vmstat/pmap/top/ps..
>
> That's why we was thinking of using an already running Dtrace to try to "see" what's going on when things are misbehaving...
>
>
> Anyway, I've now increased the available swapspace so it's more than the size of the RAM in the machine and we'll see what happens...
>
>
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
>
More information about the dtrace-discuss
mailing list