Re: [dtrace-discuss] About memory usage by a specific process

2008-07-13 Thread Jim Mauro
Soif the RSS value of the process reaches a certain size and remains
more or less at the same size (which is typically the case once a workload
quiesces), are you saying to know specific processes should be releasing
memory at some point? Why do you think the memory should be getting
released - specific application code?

Are these heap segments (I assume yes)?

Chasing memory allocations and frees is doable, but not trivial.
You can instrument malloc/free calls with the PID provider, or link
to libumem.so, and use it's feature set for debugging memory allocations
with mdb.

http://access1.sun.com/techarticles/libumem.html

That aside, there are several more detailed responsed on using
dtrace for chasing memory allocations and frees in the archives
on the opensolaris.org page (discussions -> dtrace -> search).

I would encourage you to make sure you have a good sense for what
your chasing before you go down this path. It sounds almost like a
memory leak, but you do not describe it as such.

All I'm saying is have a good sense of the magnitude of the problem.
If you're looking for segments in the 100's of MBytes or GByte range,
you should be able to find those. But if you're chasing a few megabytes
here and thereyou really need to be using a debugger and working
with the folks that own the code.

Good luck,
/jim

> Thanks Jim
> Prstat is useful for looking at what processes are using the memory. 
> I am looking for the processes that use memory but do not release it 
> Thanks
> Riadh 
>   
___
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org


Re: [dtrace-discuss] About memory usage by a specific process

2008-07-13 Thread Akhilesh Mritunjai
No direct way to do it.

If you "know" when the memory usage rises, you already don't need to use 
dtrace. Utility tools like vmstat, prstat and pmap can do the job for you.

You may be just fine running "prstat -s rss -c 1 > prstat.out &" in a shell and 
leaving it there for few days, and then a little perl to find out who were top 
hoggers in last 2-3 days.

After you have found the suspects, use libumem to find out if there is anything 
wrong with their memory allocation/deallocation or they are just need to use 
that much memory.

Keep in mind that reported memory usage figures may be highly misleading. You 
need to account for things like shared pages and reservations.


--
This message posted from opensolaris.org
___
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org


Re: [dtrace-discuss] About memory usage by a specific process

2008-07-12 Thread YOUNSI RIADH
Thanks Jim
Prstat is useful for looking at what processes are using the memory. 
I am looking for the processes that use memory but do not release it 
Thanks
Riadh 

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 11 juillet 2008 23:28
À : YOUNSI RIADH
Cc : dtrace-discuss@opensolaris.org
Objet : Re: [dtrace-discuss] About memory usage by a specific process

prstat -s rss

The RSS column is the resident set size, or roughly the amount of memory
being used be the process. The "-s rss" tells prstat to sort based on 
rss size.

HTH,
/jim


YOUNSI RIADH wrote:
>
> *Hi *
>
> *Using vmstat I noticed that free memory is getting lower during a 
> certain period of time (2 or 3 days) then that memory is recovered. Is 
> there a**_ dtrace script_** that would help to identify the process 
> that uses that** memory?** *
>
> **
>
> **
>
> *Thanks*
>
> ***Riadh YOUNSI*
>
> 
>
> ___
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org
>   
___
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org


Re: [dtrace-discuss] About memory usage by a specific process

2008-07-11 Thread Jim Mauro
prstat -s rss

The RSS column is the resident set size, or roughly the amount of memory
being used be the process. The "-s rss" tells prstat to sort based on 
rss size.

HTH,
/jim


YOUNSI RIADH wrote:
>
> *Hi *
>
> *Using vmstat I noticed that free memory is getting lower during a 
> certain period of time (2 or 3 days) then that memory is recovered. Is 
> there a**_ dtrace script_** that would help to identify the process 
> that uses that** memory?** *
>
> **
>
> **
>
> *Thanks*
>
> ***Riadh YOUNSI*
>
> 
>
> ___
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org
>   
___
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org


[dtrace-discuss] About memory usage by a specific process

2008-07-11 Thread YOUNSI RIADH
Hi 
Using vmstat I noticed that free memory is getting lower during a
certain period of time (2 or 3 days) then that memory is recovered. Is
there a dtrace script that would help to identify the process that uses
that memory? 



Thanks


Riadh YOUNSI

___
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org