LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-29-2008, 01:52 PM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
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:

op - 14:44:33 up 252 days, 6:00, 3 users, load average: 0.00, 0.00, 0.00
Tasks: 75 total, 1 running, 74 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1% us, 0.0% sy, 0.0% ni, 99.9% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 2074920k total, 1951568k used, 123352k free, 395588k buffers
Swap: 4192956k total, 0k used, 4192956k free, 1365392k cached

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?


Thanks
 
Old 01-29-2008, 02:02 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,893

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Quote:
Originally Posted by keysorsoze View Post
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.

----------------------
Steve Stites
 
Old 01-29-2008, 02:10 PM   #3
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
jailbait,


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?
 
Old 01-29-2008, 02:24 PM   #4
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
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.
 
Old 01-29-2008, 02:28 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,722

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
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.
 
Old 01-29-2008, 04:45 PM   #6
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Ok thanks for the help guys once again another problem solved by the gurus.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find max memory usage for process in Linux by command line kashameni Linux - Newbie 9 06-01-2007 01:39 AM
X hangs after prolonged usage ... memory usage goes upto 195MB duryodhan Slackware 18 05-10-2007 06:16 PM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration