Solaris Process Managment


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris Process Managment
# 1  
Old 06-22-2011
Question Solaris Process Managment

Hi gurus,
Please advice me in case such a process is taking too much of memory what are the necessary steps we need to do. Please explain with detailed.

Thanks | P.BharathirajaSmilie
# 2  
Old 06-23-2011
You mean too much VM, or too much RAM? What is your symptom?

If a locally written program, mistakes like not free()ing dynamically allocated space before the pointer variable is lost or reloaded (memory leaks) are a common culprit. What flies in JAVA/C# is very bad in C/C++.

Mistakes in declarations can also hurt (arrays larger than needed), and bad tactics can require much memory (sorting big files in memory, for instance, or using DOM not SAX to parse XML.

Usng mmap() can use more RAM and less swap, which can be a problem or solution.
This User Gave Thanks to DGPickett For This Post:
# 3  
Old 06-24-2011
Solaris Process Management

Dear DGPickett,
Thank you for your valuable letters. I just want to know (any case... VM, or too much RAM). What are the steps we need to do... which are the place we need to look... as i am newbie plz apologies in case it is stupid Q.....

Thanks | P.Bharathiraja.Smilie
# 4  
Old 06-24-2011
Well, leaks mean that programs use an increasing amount of swap, show a larger vm size on ps and may eventually bomb. Every malloc()/calloc()/realloc()/new must be to a pointer not overwritten or out of scope before a corresponding free()/delete, except if you exit(). If a subroutine returns a new object or dynamically allocated space, the caller may inherit the obligation to delete or free() when out of use, if not exit(). You may be calling other people's libraries that put this obligation on you.

Declaring excess or VM intensive choices is a more subtle, architectural problem.

The mmap()/mmap64() facilities are unique, allowing you to map files (or swap or copy to swap on write) creating memory spaces you can just reference for accessing values or to write (persistent) variable values, no read or write, just =, memcpy() and such. If you write a file and mmap() the file, not malloc and fill an array, you are still using as much RAM, and address space, but no swap space to provide rollout space for the array (sometimes, swap allocation is delayed until first rollout). If you run out of address space, you can munmap() some old space and mmap() a new chunk, so you have infinite VM (and potential RAM use) in just a 32 bit app. You can even do huge sparse arrays with seek, write -- ufs will not allocate blocks for null spaces never written, and mmap64() the whole sparse array. I wrote a fgrep that used open(), mmap(), string search, munmap(), close(). When testing, I did a search of every file, and rolled every app on the system out as I paged in files totaling more than the system RAM size, temporarily freezing every other application and user. Even after you close and munmap(), the file is available in RAM for the next mmap(), until it ages out. This is great for /lib/libc.so or moving your windows into files around, but not so great for private files in huge numbers.

What, exactly, is your concern?

Last edited by DGPickett; 06-24-2011 at 11:32 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Configuration of Linux cluster managment on Red Hat 5.x server

Hi Experts, I have question regarding linux cluster managment on Red Hat 5.x server. When I try to install 'luci' or 'ricci' in one of our linux servers it is giving me below error:- yum install luci Loaded plugins: katello, product-id, rhnplugin, security, subscription-manager Updating... (0 Replies)
Discussion started by: Amey Joshi
0 Replies

2. UNIX for Dummies Questions & Answers

Linux managment system

Hello Folks so i have a question, we have about 1000 linux machines in our org and would like to be able to manage all of them, what type of software would i use, any suggestions? i heard of puppet, what else do we have available? (1 Reply)
Discussion started by: hookitup
1 Replies

3. Red Hat

Quota Managment - Virtual Users - VSFTPD

Hi guys. I have configured Vsftpd with virtual users using Berkley DB. it is running fine. But how can we implement disk quotas for virtual users? (1 Reply)
Discussion started by: majid.merkava
1 Replies

4. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

5. AIX

HMC - craring new Managment Resource Role

Hello, I need help with creating Managment Resource Role on HMC v7. I can assignee whole machine to new role but I can't do this with single LPAR. I can't even open list of LPARs, i can see only list of machines connected to this HMC. Do you know how I can solved this problem. I have to create... (3 Replies)
Discussion started by: plechu
3 Replies

6. IP Networking

Trafic Managment on the Ubuntu Server 8.04 HOW TO?

I need help, how to set traffic management on the ubuntu server with the real life situation. For example, I would like to set the lowest priority or the "Best-Effort Traffic" for the ports in the range from 35000-37000 only on the TX(transmit) and I would like that same port range has... (1 Reply)
Discussion started by: loopdemack
1 Replies

7. UNIX for Advanced & Expert Users

Memory managment - linux

Hi, I having problem with my linux machine it have 6Gb physical memory and somehow it always almost coming to the bottom neck and than it start writing to the swap memory you can see that there is more than 4G in cahce, is there any way to clean the cache or to limit it to 2Gb? host1... (6 Replies)
Discussion started by: Igal Malka
6 Replies

8. AIX

volume managment

Can anyone tell me why its a bad idea to have rootvg span multiple physical drives i.e. hdisk0 00014861356a3c77 rootvg hdisk1 0001486111354c7c rootvg hdisk2 00014861fcef6a5d rootvg hdisk3 none None thanks (1 Reply)
Discussion started by: csaunders
1 Replies
Login or Register to Ask a Question