How can i find memory leak in Solaris?


 
Thread Tools Search this Thread
Operating Systems Solaris How can i find memory leak in Solaris?
# 8  
Old 06-21-2015
After i set the kernal parameter, rebooted system and it's not growing

Code:
root@hrms-zones #echo "::memstat" | mdb "-kw"
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     365368              2854    4%
ZFS File Data              447053              3492    5%
Anon                       992441              7753   12%
Exec and libs               49195               384    1%
Page cache                  32038               250    0%
Free (cachelist)            35052               273    0%
Free (freelist)           6286811             49115   77%

Total                     8207958             64124
Physical                  8190943             63991

thanks for your help
# 9  
Old 06-21-2015
From everything that you have shown us, you are now happy that access to ZFS filesystems will be slower than they were before. Before you limited ZFS's use of free memory, it was using lots of free memory as a disk cache. Now, you have lots of free memory that is free, but can't be used by ZFS.

Before you made this change and when the databases were running, you had less free memory. Why is that a problem? Was it causing a lot of swapping?

Why buy 64GB of memory if your goal is to keep 49GB free (i.e., unused)?
# 10  
Old 06-21-2015
I am getting some error from the DBA team,

currently oracle database thread size was set to 4 Gb and they tried to increase that ater this ZFS ARC setting.. They are getting some error.

please find attached.

Image

is it related to this ZFS settings?
# 11  
Old 06-21-2015
If Oracle is unable to allocate 32 bytes, the problem is likely to be that the "oracle database thread size was set to 4 Gb"; not that the ZFS buffer cache size has been restricted.

What was mdb showing when Oracle failed?
# 12  
Old 06-21-2015
Quote:
Originally Posted by Don Cragun
From everything that you have shown us, you are now happy that access to ZFS filesystems will be slower than they were before. Before you limited ZFS's use of free memory, it was using lots of free memory as a disk cache. Now, you have lots of free memory that is free, but can't be used by ZFS.

Before you made this change and when the databases were running, you had less free memory. Why is that a problem? Was it causing a lot of swapping?

Why buy 64GB of memory if your goal is to keep 49GB free (i.e., unused)?
this machine has only 2 zones, application and database. when the memory issue was there, application pages was not loading and they were keep on complaining about the system. and team used to reboot full server every week to resolve this issue.

i am not sure about issue faced before this settings. only thing from mbd i can see like 45 GB memory was used by zfs cache.

---------- Post updated at 02:15 PM ---------- Previous update was at 02:09 PM ----------

Quote:
Originally Posted by Don Cragun
If Oracle is unable to allocate 32 bytes, the problem is likely to be that the "oracle database thread size was set to 4 Gb"; not that the ZFS buffer cache size has been restricted.

What was mdb showing when Oracle failed?
this is current mdb status

Code:
root@hrms-zones #echo "::memstat" | mdb "-kw"
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     360511              2816    4%
ZFS File Data              457370              3573    6%
Anon                       132190              1032    2%
Exec and libs                7571                59    0%
Page cache                  27998               218    0%
Free (cachelist)            70049               547    1%
Free (freelist)           7152269             55877   87%

Total                     8207958             64124
Physical                  8190943             63991

Yes oracle database thread size was set to 4 Gb and they want to increase that. while trying to increase thread size only they are getting error
# 13  
Old 06-22-2015
They cannot assign the memory to oracle after the zfs arc line in /etc/system and there is a lot of free memory during that operation ?
If so, take a look how that user is setuped, especially projects. Solaris uses projects to impose various limits to users projects -l

What is your SGA ?
Are you running your database as a user ? (oracle?)
Are you using zfs filesystems for your database or ASM ?

Zones also have a limit system regarding memory and cpu which is defined in zone configuration file.

This is fairly well documented on oracle site regarding setup of solaris OS for oracle database (global and non-global zones).
Numbers in that documentation are subject to your environment needs.

For instance, in documentation parameter project.max-shm-memory is
4294967295 which is equivalent to 4 GB. This parameter should probably be increased in real life scenario to much higher value (again, depending on your workload, but looks like the errors are coming from there...)

As you might notice, me, as well as others, are guessing
That is not nice from your side, and time consuming from ours.

Hope that clears things out
Regards
Peasant.
# 14  
Old 06-22-2015
Quote:
Originally Posted by Peasant
They cannot assign the memory to oracle after the zfs arc line in /etc/system and there is a lot of free memory during that operation ?
If so, take a look how that user is setuped, especially projects. Solaris uses projects to impose various limits to users projects -l

What is your SGA ?
Are you running your database as a user ? (oracle?)
Are you using zfs filesystems for your database or ASM ?

Zones also have a limit system regarding memory and cpu which is defined in zone configuration file.

This is fairly well documented on oracle site regarding setup of solaris OS for oracle database (global and non-global zones).
Numbers in that documentation are subject to your environment needs.

For instance, in documentation parameter project.max-shm-memory is
4294967295 which is equivalent to 4 GB. This parameter should probably be increased in real life scenario to much higher value (again, depending on your workload, but looks like the errors are coming from there...)

As you might notice, me, as well as others, are guessing
That is not nice from your side, and time consuming from ours.

Hope that clears things out
Regards
Peasant.
Hi There is no project is created in server.

Code:
system
        projid : 0
        comment: ""
        users  : (none)
        groups : (none)
        attribs:
user.root
        projid : 1
        comment: ""
        users  : (none)
        groups : (none)
        attribs:
noproject
        projid : 2
        comment: ""
        users  : (none)
        groups : (none)
        attribs:
default
        projid : 3
        comment: ""
        users  : (none)
        groups : (none)
        attribs:
group.staff
        projid : 10
        comment: ""
        users  : (none)
        groups : (none)
        attribs:

and there is no cpu/memory cpping implemented from zone level.
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