LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-01-2007, 04:27 PM   #1
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Rep: Reputation: 30
Linux isn't using all of its RAM


I have an Novell OES SP3 server (kernel = 2.6.5-7.244-smp) running on a SMP Dell PowerEdge 2550. The install seemed to go fine and the system boots up fine, however it appears that Linux isn't using all of
it's 1 gig of available physical RAM.

See below:

ServerA:~ # free -m
total used free shared buffers cached
Mem: 1009 313 696 0 30 168
-/+ buffers/cache: 115 894
Swap: 511 5 506


...You'll notice the "used" column only shows its using 313 RAM. Normally the "used" amount should be much closer to "total" as Linux tries to useall of its available memory at all times.

I ran memtest on the box for 2 days and it didn't detect any physical memory errors.

Any idea what could be stopping Linux from using the other ~700 megs of
RAM?
 
Old 06-01-2007, 04:30 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
How long did you let it go before you checked it? Since it's using the free RAM as buffer/cache, it takes a while to use it all. The more programs you run and more times data is accessed, the more of the RAM it will use.
 
Old 06-01-2007, 05:00 PM   #3
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez
How long did you let it go before you checked it? Since it's using the free RAM as buffer/cache, it takes a while to use it all. The more programs you run and more times data is accessed, the more of the RAM it will use.
it will sit there for days only using between 200-350 RAM.
 
Old 06-01-2007, 05:14 PM   #4
DirkDiggler
Member
 
Registered: May 2007
Location: Florida/USA
Distribution: Ubuntu Feisty Fawn, Fedora 7, Windows XP
Posts: 91

Rep: Reputation: 16
Hey,

Linux has much better memory management than Windows. As soon as you boot up, before you use any programs, you're already using virtual memory with Windows. Not the case with Linux.

Regards,

Brandon
 
Old 06-01-2007, 05:31 PM   #5
czarherr
Member
 
Registered: Sep 2003
Location: Suwon, Korea
Distribution: Slackware 13
Posts: 288

Rep: Reputation: 32
Check the /proc/meminfo file. If it is not reporting all your memory in total memory, make sure your kernel is compiled with High Memory support, set at at least 4Gigs.

Edit: Oh, I see that you already have memory reporting correctly. I'll have to agree, what you are seeing is just the great memory management of linux.

Last edited by czarherr; 06-01-2007 at 05:32 PM.
 
Old 06-01-2007, 05:36 PM   #6
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by DirkDiggler
Hey,

Linux has much better memory management than Windows. As soon as you boot up, before you use any programs, you're already using virtual memory with Windows. Not the case with Linux.

Regards,

Brandon

I understand that, however, run "free -m" on your system. the "used" will always be close to "total" amount because of the way the kernel handles memory.
 
Old 06-01-2007, 05:38 PM   #7
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by czarherr
Check the /proc/meminfo file. If it is not reporting all your memory in total memory, make sure your kernel is compiled with High Memory support, set at at least 4Gigs.

Edit: Oh, I see that you already have memory reporting correctly. I'll have to agree, what you are seeing is just the great memory management of linux.
The server preforms like it only has 200 megs of RAM. The "used" should always be close to "total" when typing "free -m" or have I always thought this and am crazy?

Last edited by rsmccain; 06-01-2007 at 06:08 PM.
 
Old 06-01-2007, 05:40 PM   #8
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Original Poster
Rep: Reputation: 30
here is the output from /proc/meminfo

MemTotal: 1034228 kB
MemFree: 696084 kB
Buffers: 46856 kB
Cached: 172272 kB
SwapCached: 2912 kB
Active: 118640 kB
Inactive: 179724 kB
HighTotal: 131008 kB
HighFree: 240 kB
LowTotal: 903220 kB
LowFree: 695844 kB
SwapTotal: 524280 kB
SwapFree: 518180 kB
Dirty: 116 kB
Writeback: 0 kB
Mapped: 116048 kB
Slab: 24820 kB
Committed_AS: 659884 kB
PageTables: 1044 kB
VmallocTotal: 114680 kB
VmallocUsed: 7784 kB
VmallocChunk: 106692 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 4096 kB

..when i typed that nothing substantial was running on the server other than sshd and other things.
 
Old 06-01-2007, 05:45 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,445

Rep: Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068
If you have nothing substantial running, why would it be using memory ???.
Normally you might expect a server would be using more cache than that - what does this return
Code:
cat /proc/sys/vm/swappiness
 
Old 06-01-2007, 05:49 PM   #10
DirkDiggler
Member
 
Registered: May 2007
Location: Florida/USA
Distribution: Ubuntu Feisty Fawn, Fedora 7, Windows XP
Posts: 91

Rep: Reputation: 16
I think you're misunderstanding the command. The command is 'free -m', it displays your current memory usage. That's why 313 is under 'used'. Meaning, you're only using 313MB of your total RAM. Which is 1GB. Try running the command 'top'. This will tell you what each program is using in RAM. It's possible it could be 'tops', but most likely is 'top'. This is kind of like task manager for Windows.

Regards,

Brandon
 
Old 06-01-2007, 05:51 PM   #11
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by syg00
If you have nothing substantial running, why would it be using memory ???.
Normally you might expect a server would be using more cache than that - what does this return
Code:
cat /proc/sys/vm/swappiness
Because Linux always uses as much memory as possible. It's a bit misleading when "free -m" shows that Linux is using too much memory.

Type "free -m" on an idle box and see what you get.

<--SNIP-->
To see how much memory you are currently using, run free -m. It will provide output like:
total used free shared buffers cached
Mem: 90 85 4 0 3 34
-/+ buffers/cache: 46 43
Swap: 9 0 9

The top row 'used' (85) value will almost always nearly match the top row mem value (90). Since Linux likes to use any spare memory to cache disk blocks (34).

The key figure to look at is the buffers/cache row used value (46). This is how much space your applications are currently using. For best performance, this number should be less than your total (90) memory. To prevent out of memory errors, it needs to be less than the total memory (90) and swap space (9).

<--SNIP-->

More here:

http://rimuhosting.com/howto/memory.jsp

Last edited by rsmccain; 06-01-2007 at 05:57 PM.
 
Old 06-01-2007, 05:53 PM   #12
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by DirkDiggler
I think you're misunderstanding the command. The command is 'free -m', it displays your current memory usage. That's why 313 is under 'used'. Meaning, you're only using 313MB of your total RAM. Which is 1GB. Try running the command 'top'. This will tell you what each program is using in RAM. It's possible it could be 'tops', but most likely is 'top'. This is kind of like task manager for Windows.

Regards,

Brandon
I don't think you understand how Linux handles memory, unless I'm crazy. What does "free -m" report on an idle machine for you?

see here: http://www.novell.com/coolsolutions/feature/18990.html
 
Old 06-01-2007, 05:55 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
It wouldn't be something silly like a kernel parameter that tells
the machine not to use more than that piddly amount? Check your
grub/lilo config. It certainly doesn't look right, and no, it's
not "Linux' great memory management at work".


Cheers,
Tink
 
Old 06-01-2007, 05:58 PM   #14
rsmccain
Member
 
Registered: Apr 2004
Location: Louisiana
Distribution: SUSE
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by syg00
If you have nothing substantial running, why would it be using memory ???.
Normally you might expect a server would be using more cache than that - what does this return
Code:
cat /proc/sys/vm/swappiness
swappiness = 60
 
Old 06-01-2007, 06:00 PM   #15
DirkDiggler
Member
 
Registered: May 2007
Location: Florida/USA
Distribution: Ubuntu Feisty Fawn, Fedora 7, Windows XP
Posts: 91

Rep: Reputation: 16
I stand corrected, if that site is correct then that is weird. What does 'top' yield for you? Unfortunately, I can't do anything with my system as I am at work right now. We don't have Linux here.

Regards,

Brandon
 
  


Reply

Tags
cpu, memory, top


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
RAM: Does linux require as much ram as Windows XP? hanzj Linux - Newbie 48 04-18-2007 01:14 AM
256 ram shows as 183284 total ram phreakshew Linux - Hardware 6 08-21-2006 03:37 PM
Win98SE Pentium166MMX/64MB RAM vs Linux AthlonXP+ 3000/512MB RAM : Lucent LT WinModem t3gah Linux - Software 2 04-22-2005 02:01 PM
how much ram does linux use? capybara Linux - Hardware 4 05-26-2004 10:43 PM
linux with 32 mb of ram curos Linux - Newbie 6 03-29-2004 10:17 AM


All times are GMT -5. The time now is 07:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration