How can i find memory leak in Solaris?


 
Thread Tools Search this Thread
Operating Systems Solaris How can i find memory leak in Solaris?
# 1  
Old 06-19-2015
How can i find memory leak in Solaris?

HI,

How can i find memory leak in Solaris.

one of my server is having 64 GB memory and noting is running right now, 2 zones was there and we halted that. but still 51 GB is using.

how can i find who is using memory?

Regards,
Ben
# 2  
Old 06-19-2015
Try echo "::memstat" | mdb -kw"

I would suspect ZFS ARC cache has used most of the memory.

If that is the case, you can limit ZFS ARC cache in /etc/system (it will require a reboot).

For instance, added as last line in /etc/system set zfs:zfs_arc_max=4294967296 will limit the ARC cache to 4 GB.

You should consider this limit if you are running databases on ASM (real small arc cache).

Hope that helps
Regards
Peasant.
This User Gave Thanks to Peasant For This Post:
# 3  
Old 06-19-2015
Quote:
Originally Posted by Peasant
Try echo "::memstat" | mdb -kw"

I would suspect ZFS ARC cache has used most of the memory.

If that is the case, you can limit ZFS ARC cache in /etc/system (it will require a reboot).

For instance, added as last line in /etc/system set zfs:zfs_arc_max=4294967296 will limit the ARC cache to 4 GB.

You should consider this limit if you are running databases on ASM (real small arc cache).

Hope that helps
Regards
Peasant.
Thanks for your help.

this is what i got

Code:
root@hrms-zones #echo "::memstat" | mdb "-kw"
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     635135              4961    8%
ZFS File Data             5772613             45098   70%
Anon                       141513              1105    2%
Exec and libs               11482                89    0%
Page cache                  21836               170    0%
Free (cachelist)            74375               581    1%
Free (freelist)           1551004             12117   19%

Total                     8207958             64124
Physical                  8190943             63991

# 4  
Old 06-19-2015
As i suspected ZFS ARC, which is obvious from this line.
ZFS File Data 5772613 45098 70%

Depending on your workload you might want to reduce that. Or not. Depending on the application in question and memory needs.
Since you have 12 GB free everything seems to be in order.
# 5  
Old 06-19-2015
we have added so many local disks.

how can i set the memory for zfs. how can i calculate my work load. is there any standards or based on filesystem zine....

Code:
root@hrms-zones #zpool status
  pool: hrms-pool
 state: ONLINE
 scan: none requested
config:

        NAME         STATE     READ WRITE CKSUM
        hrms-pool    ONLINE       0     0     0
          raidz1-0   ONLINE       0     0     0
            c1t1d0   ONLINE       0     0     0
            c1t2d0   ONLINE       0     0     0
            c1t3d0   ONLINE       0     0     0
            c1t4d0   ONLINE       0     0     0
            c1t5d0   ONLINE       0     0     0
            c1t6d0   ONLINE       0     0     0
          raidz1-1   ONLINE       0     0     0
            c1t7d0   ONLINE       0     0     0
            c1t8d0   ONLINE       0     0     0
            c1t9d0   ONLINE       0     0     0
            c1t10d0  ONLINE       0     0     0
            c1t11d0  ONLINE       0     0     0
            c1t12d0  ONLINE       0     0     0
        spares
          c1t13d0    FAULTED   corrupted data
          c1t13d0    AVAIL

errors: No known data errors
root@hrms-zones #zfs list
NAME                            USED  AVAIL  REFER  MOUNTPOINT
hrms-pool                      1.76T   913G  62.3K  /hrms-pool
hrms-pool/devapr12             49.5G  75.5G  49.5G  /data
hrms-pool/devdbr12              634G   166G   634G  /data
hrms-pool/uatapr12             92.4G   158G  92.4G  /data
hrms-pool/uatdbr12              703G   913G   703G  /data
hrms-pool/zone-roots            328G   913G  66.4K  /hrms-pool/zone-roots
hrms-pool/zone-roots/devapr12  7.56G   913G  7.56G  /hrms-pool/zone-roots/devapr12
hrms-pool/zone-roots/devdbr12   320G   913G   320G  /hrms-pool/zone-roots/devdbr12
root@hrms-zones #

# 6  
Old 06-19-2015
You can limit it as i said in previous post by adding a line in /etc/system and rebooting the machine.

If you are not experiencing problems and you are not running databases on ASM or application which take large segments of memory in one turn, leave it.

12 GB of memory is free when command was issued, so there is plenty of free memory.

This looks strange :
Code:
        spares
          c1t13d0    FAULTED   corrupted data
          c1t13d0    AVAIL

How did you achieve this ?
# 7  
Old 06-19-2015
12 GB is free but all the application and database zones are down. when i start that it reaches to 62 GB.

i have added below to system file and gave instructions to team to reboot system.

Code:
 set zfs:zfs_arc_max=4294967296

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Memory leak

Hi all I am using RED HAT 5.4, and i am getting memory uses problem. when i use "sync;echo 3 > /proc/sys/vm/drop_cache" command the memory will release after 2,3 hour memory show 95%. pls suggest right way. thanks (37 Replies)
Discussion started by: reply.ravi
37 Replies

2. Programming

Memory Leak

Hi, I am trying a database server which keeps a B+ plus tree structure and works on it. I am trying to find the memory used/leak while executing this process. I check the memory leak by using ps uax command. When i execute a delete query i am sure that my code frees up the existing... (9 Replies)
Discussion started by: kumaran_5555
9 Replies

3. IP Networking

memory leak?

Hi All, my client server application can work in two modes: 1) one direction - only client sends msgs to server 2) two directions - server gives 'answers' to client. when program run in the first mode it looks OK, but when server answers to client than client's application exit its... (2 Replies)
Discussion started by: lenna
2 Replies

4. Programming

Memory LEAK with pthreads

I have this code... #include <stdio.h> #include <iostream> #include <pthread.h> static void* cliente(void *datos); int main() { pthread_attr_t tattr; int ret; size_t size = PTHREAD_STACK_MIN + 0x0100; ret = pthread_attr_init(&tattr); ret =... (8 Replies)
Discussion started by: JEscola
8 Replies

5. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

6. Solaris

How to find memory leak in solaris?

please tell me how to use rational purify or any other method to find memory leak :confused: (2 Replies)
Discussion started by: Mythili
2 Replies

7. Programming

about virtual memory and memory leak

Hi, First of all I appreciate this group very much for its informative discussions and posts. Here is my question. I have one process whose virtual memory size increases linearly from 6MB to 12MB in 20 minutes. Does that mean my process has memory leaks? In what cases does the... (4 Replies)
Discussion started by: shriashishpatil
4 Replies

8. UNIX for Dummies Questions & Answers

Comman/Tool to check memory leak in solaris box

Hello Guys, Please let me know about commands or tools that are available to check memory leak in solaris box. Thanks in Advance (1 Reply)
Discussion started by: rajeshlbryan
1 Replies

9. Programming

can I use command "ps" to find memory leak

1 . Thanks for everyone who reads the post first. 2 . I have a idea : whether can I use command "ps" to find which application acquire memory usually . 3 . I do not confirm whether it is correctly , then I do an experiment in Tru64 unix : I write the simple programe a.c below : ... (5 Replies)
Discussion started by: chenhao_no1
5 Replies
Login or Register to Ask a Question