Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-22-2009, 01:45 PM   #1
Registered: Jul 2009
Posts: 52

Rep: Reputation: 15
Real Memory Usage


How come my TOP says I have used 3GB of 3.2GB RAM, but my kernel says I only uses 30% = 0.96GB? How do I find out my real memory usage? I know Linux likes to cache some memory...

top - 13:45:51 up 4 days,  5:34,  1 user,  load average: 1.03, 0.69, 0.41
Tasks:  89 total,   2 running,  87 sleeping,   0 stopped,   0 zombie
Cpu(s): 22.6%us,  1.0%sy,  0.0%ni, 76.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3226300k total,  3099616k used,   126684k free,   187388k buffers
Swap:  7960168k total,        0k used,  7960168k free,  2058128k cached

             total       used       free     shared    buffers     cached
Mem:       3226300    3094856     131444          0     187388    2058156
-/+ buffers/cache:     849312    2376988
Swap:      7960168          0    7960168
Old 07-22-2009, 01:47 PM   #2
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 272Reputation: 272Reputation: 272
I use free -lm and look at the "-/+ buffers/cache" line. It will tell you what RAM is available/used by applications.

EDIT: from your "code" post that showed up, it looks like you have something like 850MB used and 2.4 GB free.
Old 07-22-2009, 02:03 PM   #3
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194
Side topic: I assume you have 4GB of ram physically plugged into your motherboard. Have you tried to get use of all 4GB?

To use all 4GB, you need:
A motherboard chipset that supports more than 4GB physical address space. Most do, but a few don't.
A BIOS that supports more than 4GB of physical address space. Most do.
The correct BIOS settings, which aren't consistently named from one BIOS to another, that enable memory remapping.
A PAE kernel.

32 bit Windows limits you (by license restriction) to 3.2GB of ram even if you have all of the above details covered. So maybe you expected 32 bit Linux to be no better. But 32 bit Linux can support a full 4GB or even more of physical ram.

If you have a BIOS setting wrong or the wrong kernel for a full 4GB of ram, that is worth correcting. If it is a motherboard hardware restriction it can't be fixed without a new motherboard.

As for memory use (your actual question) see my answer at:
That gives just a bit more info than the usual answer such as pljvaldez posted above
Old 07-22-2009, 02:14 PM   #4
Registered: Jul 2009
Posts: 52

Original Poster
Rep: Reputation: 15
The motherboard only supports up to 3.2GB I have 4GB installed. It's running Ubuntu Server
Old 07-22-2009, 06:08 PM   #5
Registered: Jul 2009
Posts: 52

Original Poster
Rep: Reputation: 15
Question, how do I see how much RAM is available to mysqld?


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
X hangs after prolonged usage ... memory usage goes upto 195MB duryodhan Slackware 18 05-10-2007 06:16 PM
Memory Usage Spaw Usage Swappiness Issues joelunch Linux - Software 3 01-04-2006 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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:47 PM.

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