1833758 Members
2668 Online
110063 Solutions
New Discussion

memory problem

 
SOLVED
Go to solution
szhiyong
Frequent Advisor

memory problem

Hi,

I meet one tricky memory problem in my system. After I restarted the workstation, the background process uses 19% physical memory(700MB). I have one program that uses 350MB memory.I run this program for 16 hours. Then I KILL this program. I check the memory, I found that the background process used up 60% memory now.

I do not think this is because of my program.The reseaon is that the program died, all the resouce that the program used are released.

Would someone tell me if there is other reason for this problem?

Thanks a lot.

zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: memory problem


There is not enough data to answer your question. This could be perfectly normal or you could have a memory leak. It's not clear whether this is code that you have written or if it is a program that you merely execute.

Is the background process related to this program? One possible explanation is that the code is using shared memory and that is not being detached and removed. You must provide more data.

If it ain't broke, I can fix that.
szhiyong
Frequent Advisor

Re: memory problem

Hi,A.Clay Stephenson,

Thanks for your help.

I check "malloc" in my program, they all have dmalloc. I also do not use shared memory in my program. The program does not relates to the background process.

In my workstation, glance is expired. The type of workstation is 10.20 B180L. is there any other way to get more information about memory?

Thanks a lot! I appreciated it.

zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
Patrick Wallek
Honored Contributor
Solution

Re: memory problem

You say that you KILLed the program. How did you kill it? Did you actually do a 'kill -9'? Is some remnant of the program still running?
szhiyong
Frequent Advisor

Re: memory problem

Hi,

My program include java interface and C network code. There is exit button in the interface, I click that exit button, the whole program will exit. I uses "ps -ef", I do not find the program process.

Thanks a lot for help.

zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
Bill Hassell
Honored Contributor

Re: memory problem

Type this to sort processes by memory usage:

UNIX95= ps -e -o vsz,ruser,pid,args | sort -rn | more

You may find CDE or some other Xwindow processes have grown in size, or you may see an SNMP process has grown to hundreds of megs. If you don't need SNMP processes running, you can turn all for the SNMP processes off in /etc/rc.config.d, or get the patches for the big memory leak.


Bill Hassell, sysadmin
szhiyong
Frequent Advisor

Re: memory problem

Hi,Bill,

Thansk a lot for help.

I check the information about process before restart workstation and after restart workstation. I do not find much difference. The result are attached. One part of file is called "beforeReboot", this file contains the process information which i run the program for 18 hours and background process occupy 60% memory after I exit the program. Another part of file is called "afterReboot" which contains the information after reboot and background process occupy 19% memory.

Thanks a lot for your help.

zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
Sajid_1
Honored Contributor

Re: memory problem

hello,

Memory usage of 19% and 60% will be normal if there are online processes running on the system. How did you check the memory usage ? Did you check it through GlancePlus? Glance will give you the exact amount and percentage. If you are concerned about some process, then check the process resource usage and total running process at a time. Check your kernel parameter dbc_max_pct and reduce it to a lower value (10%) if it is set to the default (50%). Also while killing the process, start from kill -15 instead of a sudden death - kill -9. Check all background processes running on the system when there is a high memory usage. I would defenitely concerned if there is swapping and paging
learn unix ..
Frank Slootweg
Honored Contributor

Re: memory problem

Like Sajid also mentioned, I think your memory usage percentages come from the Glance "Mem Util" line. Correct?

If so, then that is *not* the memory used by the process(es).

HP-UX uses main memory (RAM) like a cache and a good cache is always full. In order to allow small processes to start quickly, HP-UX keeps memory nearly full, at around 95% or less. I.e. a "Mem Util" of (around) 95% is *good*, not bad.