System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Memory is being used much in linux

 
SOLVED
Go to solution
Highlighted
Super Advisor

Memory is being used much in linux

Hi

We are running "3comm" application (epic center) in Redhat Linux AS 4.

This server is running in one of the AS400 partition.

2GB memory is allocated for this server.

The memory is being utilized almost all.

But if we restart the server, we can get 75% free memory.

But after one or two days the whole memory is being userd again.

Output of top command:

top - 07:09:54 up 1 day, 21:50, 3 users, load average: 0.00, 0.00, 0.00
Tasks: 150 total, 2 running, 148 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.4% us, 0.7% sy, 0.0% ni, 96.2% id, 1.5% wa, 0.2% hi, 0.9% si
Mem: 2025420k total, 1340796k used, 684624k free, 48892k buffers
Swap: 522104k total, 236k used, 521868k free, 923236k cached

PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
454 root 15 0 1 15:04.17 3.3 0 0 0 S bswlogprc
4615 root 15 0 1 3:52.49 7.6 181m 150m 24m R emis
1 root 16 0 0 0:00.12 0.0 1860 572 492 S init
2 root RT 0 0 0:00.04 0.0 0 0 0 S migration/0
3 root 34 19 0 0:00.25 0.0 0 0 0 S ksoftirqd/0
4 root RT 0 0 0:00.04 0.0 0 0 0 S migration/1
5 root 34 19 0 0:00.25 0.0 0 0 0 S ksoftirqd/1
6 root 5 -10 0 0:00.00 0.0 0 0 0 S events/0
7 root 5 -10 0 0:00.01 0.0 0 0 0 S events/1
8 root 5 -10 0 0:00.00 0.0 0 0 0 S khelper
9 root 5 -10 0 0:00.33 0.0 0 0 0 S kblockd/0
10 root 5 -10 0 0:00.37 0.0 0 0 0 S kblockd/1
11 root 25 0 0 0:00.00 0.0 0 0 0 S khubd
39 root 15 0 0 0:00.02 0.0 0 0 0 S rtasd
40 root 20 0 0 0:00.00 0.0 0 0 0 S pdflush
41 root 15 0 0 0:17.66 0.0 0 0 0 S pdflush
42 root 15 0 0 0:00.19 0.0 0 0 0 S kswapd2
43 root 15 0 0 0:00.18 0.0 0 0 0 S kswapd1
44 root 16 0 0 0:00.68 0.0 0 0 0 S kswapd0
45 root 6 -10 0 0:00.00 0.0 0 0 0 S aio/0
46 root 5 -10 0 0:00.00 0.0 0 0 0 S aio/1


Pls find the attachment for the detailed report.


I think two process are taking memory that "bswlogprc" and "emis".

Pls explain about "3.3" and "7.6" under %MEM for those two process.

How to solve this process.



5 REPLIES 5
Highlighted
Honored Contributor
Solution

Re: Memory is being used much in linux

Please see this thread:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1029490
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Highlighted
Trusted Contributor

Re: Memory is being used much in linux

Indeed, Linux is designed since its early releases to take all available memory for buffers until for example an application needs some memory pages.
Highlighted
Super Advisor

Re: Memory is being used much in linux

Hi All,

As i searched, In linux almost all the memories are reserved by Linux kernel as buffer and cache memory.

So the top and free commands are showing the same like there are very less free memories available in Linux some time after starting the Linux server.

So At this situation. can we use below command to find the percentage of total memory utilization and top 3 memory utilizing process.

1)percentage of total memory utilization.

[root@epiccenter2 ~]# ps -eo user,pid,pmem,comm | awk '{x += $3} END {print x}'
43.4


2)top3 memory utilizing process:

[root@epiccenter2 ~]# ps -eo user,pid,pmem,comm | sort -nrbk3 | head -3
root 4581 12.2 java.bin
root 4563 6.5 emis
root 4513 2.9 bswlogprc


So can we use above commands to find the percentage of total memory utilization and top 3 memory utilizing process.

Please give your suggestions.
Highlighted
Frequent Advisor

Re: Memory is being used much in linux

When trying to see where your memory is being used, IGNORE any numbers reported for
cache as that is the amount of memory used to cache open files. When you close them the memory frees up, which explains why it all comes back when you reboot. When linux does need more memory one of the places it will take it from the cache.

As a previous note states, linux is designed to work this way. If you had 256GB memory and opened enough files you would still have the same situation you currently have.

Try running collectl and read (but not close) a large file. You'll be able to see your cache grow and stay at that size. Then delete the file and watch the cache shrink.

-mark
Highlighted
Exalted Contributor

Re: Memory is being used much in linux

Shalom,

Linux leaves spare memory in the buffer. You really have no problem unless you start seeing high memory use and low amount of buffer.

In contrast to HP-UX, Linux can quickly move memory from buffer to other uses.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com