--- En date de : Lun 9.3.09, m...@bruningsystems.com <m...@bruningsystems.com> 
a écrit :


De: m...@bruningsystems.com <m...@bruningsystems.com>
Objet: Re: [perf-discuss] Sol10 Leak memory
À: "elkhaoul elkhaoul" <elkha...@yahoo.fr>
Cc: "'perf-discuss@opensolaris.org'" <perf-discuss@opensolaris.org>, "Chad 
Mynhier" <cmynh...@gmail.com>
Date: Lundi 9 Mars 2009, 15h53


elkhaoul elkhaoul wrote:
> 
> 
>     > ** *Is this any tools to know who use the big portion of RAM ?*
>     > ** *Thanks in advance
>     > *
>     >
>     Have you tried:
> 
>     echo "::memstat" | mdb -k
> 
>     Do this a few times over some interval to see if the kernel is
>     growing.
>     Is there a reason you think the leak is in the buffer cache?
> 
>     Do you have large, growing files in /tmp or a tmpfs mounted
>     file system?  That can also eat up memory.
>     Do you have a large process that is growing?
>     You can use prstat -s size
>     or prstat -s rss
>     to see sorted memory usage of processes.
> 
>     max
>     ================================================
>     Thanks max,
>          Look at Kernel size : it's growing by about 3Mb every 5minutes :
> 
>     #############  echo ::memstat |mdb -k
>     Page Summary                Pages                MB  %Tot
>     ------------     ----------------  ----------------  ----
>     Kernel                     186591              *1457*   18%
>     Anon                       446868              3491   43%
>     Exec and libs                4381                34    0%
>     Page cache                  67048               523    6%
>     Free (cachelist)           155799              1217   15%
>     Free (freelist)            180976              1413   17%
>     Total                     1041663              8137
>     Physical                  1024808              8006
>     ############ echo ::memstat |mdb -k
>             Page Summary                Pages                MB  %Tot
>     ------------     ----------------  ----------------  ----
>     Kernel                     186997              *1460*   18%
>     Anon                       447465              3495   43%
>     Exec and libs                4374                34    0%
>     Page cache                  72474               566    7%
>     Free (cachelist)           152954              1194   15%
>     Free (freelist)            177399              1385   17%
>     Total                     1041663              8137
>     Physical                  1024808              8006
>     ############  echo ::memstat |mdb -k
>      
Are you using ZFS?  Regardless, you could run:

echo "::kmastat" | mdb -k

And again, do it periodically over some interval.
Then examine the third to last column ("Memory in Use") to
see which cache(s) are steadily increasing.  ZFS also likes memory.
kmastat will tell you about memory used by (most of?) zfs.
You can get statistics about the adaptive replacement cache (arc) that
zfs uses, but I think the method depends on the version of Solaris.
On my OpenSolaris build 101b, I can use:

echo "::arc" | mdb -k | grep size

Again, run this multiple times to see if the size is increasing over time.
I used to have problems with arc eating up all of my memory on my laptop,
simply by doing a "find ." on a 40GB zfs file system.  I only had 1GB memory,
and very quickly, it all disappeared.  But I haven't had those problems since
upgrading to 2GB ram.  (I have also updated the version of nevada I am running
several times since the 2gb upgrade).

=======================================================
 
The ZFS isn't installed on this server, but I see that Kernel memory is 
increasing :
In put this on crontab : "echo ::memstat | mdb -k > /stats/memstat.out" I am 
checking that  Kernel == 1493, 2 hours ago, it was  1460 ( +10Mb/hours), it's 
strange, it should be Kernel or Application Leak memory ???????
 
This is the output of echo ::memstat | mdb -k 
 
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     191219              1493   18% <----- Increae
Anon                       445790              3482   43%
Exec and libs                4509                35    0%
Page cache                 104862               819   10%
Free (cachelist)           140081              1094   13%
Free (freelist)            155202              1212   15%
Total                     1041663              8137
Physical                  1024808              8006





      
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to