Operating System - HP-UX
1752802 Members
5660 Online
108789 Solutions
New Discussion юеВ

Free memory from unused processes

 
SOLVED
Go to solution
Subentu
Frequent Advisor

Free memory from unused processes

Hi Guys,

Is there any way to free the memory allocated for processes that are not running?

Thanks in advance
10 REPLIES 10
Aneesh Mohan
Honored Contributor

Re: Free memory from unused processes

Hi,

Gracefully stop the process.

Aneesh
Subentu
Frequent Advisor

Re: Free memory from unused processes

But if I don't know which processes are running and which are idle, is there any way to do it?

I have a lot of oracle processes (about 100), and im sure some of them are idle. But there is no way to know which.
Dennis Handly
Acclaimed Contributor

Re: Free memory from unused processes

>Is there any way to free the memory allocated for processes that are not running?

What do you mean by "free"? The kernel will page out unused pages automatically.
The kernel won't give up the swap space.

What are you trying to solve?
Venkatesh BL
Honored Contributor

Re: Free memory from unused processes

What is the real issue? Are you facing memory crunch? What does 'glance' tell you?
Subentu
Frequent Advisor

Re: Free memory from unused processes

I have a lot of oracle processes running in my server, and i suspect that some of them are idle.

Is there any way to claim back the memory occupied by them? or the OS automatically claims back it?
Aneesh Mohan
Honored Contributor

Re: Free memory from unused processes

Hi,

>>I have a lot of oracle processes running in my server, and i suspect that some of them are idle.

My suggestion is don`t try to disturb any of the oracle process from OS ,it can make your database inconsistent .

You can advise you DBA to enable session timeout / kill snipped session to release the idle resources.


Aneesh

Dennis Handly
Acclaimed Contributor

Re: Free memory from unused processes

>or the OS automatically claims back it?

Yes, the kernel will reclaim memory (unless locked) but not swap.
Bill Hassell
Honored Contributor
Solution

Re: Free memory from unused processes

If a process is shown in ps then it is running. There is no concept of an 'idle' process. If a process is not necessary, then youe database administrator needs to determine what is not needed. A process may be waiting for someone to type on a keyboard but if you were to remove the memory used by the process, the process will crash.

Processes that are waiting for some event will be lowered in priority and eventually be deactivated automatically and paged out to your swap area but only if your system is running short of RAM. Note that if you are trying to solve error messages regarding out of memory, this is very likely not related to memory usage but instead due to limits set in your kernel that need to be increased, or perhaps increasing swap space. What if the output of:

swapinfo -tam


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Free memory from unused processes

>Bill: If a process is shown in ps then it is running.

I wouldn't exactly say that. It could be sleeping or waiting. My definition of running is using the CPU.
All you can tell if it shows in ps(1), is he's not dead, Jim. :-)