LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2009, 05:03 PM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Rep: Reputation: 30
cpanel and top give different amounts of RAM free


In my cpanel, it reports the RAM on my server as:
Physical used 17.31%
768MB Free (928MB Total)

yet when I use top I only have 88Mb free:
Code:
Mem:    950568k total,   862464k used,    88104k free,    91072k buffers
Swap:   522072k total,      136k used,   521936k free,   604752k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2906 root      15   0 93228  14m 3372 S  0.0  1.5   0:07.22 python
27229 squid     34  19 14892  10m 2280 S  0.0  1.1   0:00.84 squid
Any ideas what's causing the difference?

Last edited by qwertyjjj; 08-20-2009 at 05:05 PM.
 
Old 08-20-2009, 07:16 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
A guess says cpanel is only counting kernel procs.
Linux always uses all the RAM it can find, unused RAM is wasted RAM. As long as your swap is minimal (and it is) don't worry.
You'll find lots of similar qns in LQ, although not mentioning cpanel, just queries about the 'apparent' lack of free RAM in Linux.
Try the search box at the top of the page.
 
Old 08-20-2009, 07:49 PM   #3
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by chrism01 View Post
A guess says cpanel is only counting kernel procs.
Linux always uses all the RAM it can find, unused RAM is wasted RAM. As long as your swap is minimal (and it is) don't worry.
You'll find lots of similar qns in LQ, although not mentioning cpanel, just queries about the 'apparent' lack of free RAM in Linux.
Try the search box at the top of the page.
So, squid...and other applications, allocate themselves a set amount of RAM even if they're not using it...in advance?
 
Old 08-20-2009, 07:56 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
No, its down to the OS; progs request(!) a certain amt of 'memory' and the OS decides which is RAM and which will be swap (if insufficient RAM).
That's the whole point of the 'virtual memory' concept; the app doesn't need to know what's avail, or manage it, the kernel vm module handles it all invisibly.
http://en.wikipedia.org/wiki/Virtual_memory
 
  


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
Swap space used: Why does free and top show different amounts compared to ps doublefrangelico Linux - Newbie 1 06-23-2009 02:50 PM
Cpanel/WHM Died at /usr/local/cpanel/Cpanel/Hulk.pm line 92. liang3391 Linux - Software 1 06-22-2009 03:02 PM
free alternatives to whm/cpanel steve51184 Linux - Server 2 03-24-2008 02:18 PM
Free CPanel Alternative newuser455 Programming 2 06-25-2005 04:11 PM
Free Cpanel? jollyjoice Linux - Networking 4 06-15-2005 05:35 PM


All times are GMT -5. The time now is 12:58 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration