Memory Usage at its max but box not doing anything?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Memory Usage at its max but box not doing anything?
Hi, were are noticing that one of our servers sitting in a DR site is doing nothing but has a memory usage of 95% sitting idle. Here is some top output:
PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
14970 root 16 0 0 0:00.55 0.0 3316 1000 780 R top
1 root 16 0 0 0:00.96 0.0 2060 508 432 S init
2 root RT 0 0 0:03.30 0.0 0 0 0 S migration/0
3 root 34 19 0 0:00.19 0.0 0 0 0 S ksoftirqd/0
4 root RT 0 0 0:02.72 0.0 0 0 0 S migration/1
5 root 34 19 0 0:00.13 0.0 0 0 0 S ksoftirqd/1
6 root RT 0 0 0:02.23 0.0 0 0 0 S migration/2
7 root 34 19 0 0:00.09 0.0 0 0 0 S ksoftirqd/2
8 root RT 0 0 0:02.44 0.0 0 0 0 S migration/3
9 root 34 19 0 0:00.10 0.0 0 0 0 S ksoftirqd/3
Could this be because the box has been up for so long? This is a Redhat system that basically serves a web server. We only use it one or twice a year to perform DR test. What could be causing such high memory usage?
Hi, were are noticing that one of our servers sitting in a DR site is doing nothing but has a memory usage of 95% sitting idle. What could be causing such high memory usage?
When a program releases memory Linux just doesn't throw the old memory contents away. It keeps the memory contents available in case anyone wants to use the memory again. So after Linx has been running a while memory usage always approaches 100% even though some of the supposedly used memory is simply free memory that nobody is using. Once memory is fully used then the kernel meets new memory allocation requests by freeing memory that has not been actually used for a while and allocating it to the new request.
So the answer is that all Linux systems run with high memory usage whether the memory is currently being actively used or not. The only exception is immediately after boot when you will find a lot of free memory available because it has not been used and released yet.
Thanks for the insanely fast reply. Is there any tool we can use to free up this unused memory to the state that it was in before the process occupied that chunk of memory rather than just rebooting? Some what like flushing the memory space?
Linux will release the memory as needed. It had me baffled also when I started analyzing memory stats, but it works just fine as is.
I don't know of a tool to release it so that it will show as unused.
There is no need - as explained, the memory is already "free". For a better idea of what is actually in use by "programs", use "free -m".
Look at the "used" number in the "-/+ buffers/cache" line.
This gets asked all the time - search for other threads.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.