LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-25-2009, 03:48 PM   #1
kc3
Member
 
Registered: Jun 2009
Distribution: Linux from Scratch
Posts: 172

Rep: Reputation: 35
RAM Question


Okay, I have 4GB of RAM and a new slackware install and I use WindowMaker, but for some reason some tools show very little ram used (which I'd tend to believe more) but a couple others including the processes list shows like 80 or 90% of my RAM being used with *nothing* else loaded, but if I load up a virtual machine and dedicate a gig of ram to it, my % used barely goes up at all and doesn't seem to nomatter what I open. Is there something used by spare ram for system stuff or anything? Just curious, not a huge deal but it'd be good to know why it's doing that. I do have a power saver feature that underclocks my processor to only 1.8GHz until more is needed than my processor speed increases, this is just to save energy, is it possible my RAM has something like this also?

Oh and another detail, I've yet to use any of my swap space.

Last edited by kc3; 06-25-2009 at 03:50 PM.
 
Old 06-25-2009, 04:12 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
What you're seeing is exactly what is supposed to happen. Linux views RAM as something to be used, so it will fill it up with system processes if it isn't being used for other things. As other programs, like your VM, start using it, the system stuff will get shunted to swap if needed. The fact that your swap isn't being used is just proof that memory is being managed efficiently.
 
Old 06-25-2009, 04:15 PM   #3
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
If you open a terminal and type the
free
command, you'll see the actual memory usage in your system. It looks like this:

teddy@freakinwork ~$ free
total used free shared buffers cached
Mem: 509820 491360 18460 0 72864 167448
-/+ buffers/cache: 251048 258772
Swap: 1052248 3072 1049176

The line that reads -/+ buffers/cache: shows the amount of memory used by the applications, and, you can see, some memory is cached or used for buffering (for example, in disk IO operations). You can count the buffered and cached memory as free. It will be freed on demand when an application requests it.

So, what does free show in your system?
 
Old 06-25-2009, 04:22 PM   #4
kc3
Member
 
Registered: Jun 2009
Distribution: Linux from Scratch
Posts: 172

Original Poster
Rep: Reputation: 35
Quote:
Originally Posted by Uncle_Theodore View Post
So, what does free show in your system?
I'll check when I get home, as for the other answer, that really does help but yeah I'll try free when I go home.

[update] Just got home, yeah it looks good now, thanks

Last edited by kc3; 06-25-2009 at 07:10 PM.
 
Old 06-26-2009, 06:45 AM   #5
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by kc3 View Post
Okay, I have 4GB of RAM and a new slackware install and I use WindowMaker, but for some reason some tools show very little ram used (which I'd tend to believe more) but a couple others including the processes list shows like 80 or 90% of my RAM being used with *nothing* else loaded, but if I load up a virtual machine and dedicate a gig of ram to it, my % used barely goes up at all and doesn't seem to nomatter what I open. Is there something used by spare ram for system stuff or anything? Just curious, not a huge deal but it'd be good to know why it's doing that. I do have a power saver feature that underclocks my processor to only 1.8GHz until more is needed than my processor speed increases, this is just to save energy, is it possible my RAM has something like this also?

Oh and another detail, I've yet to use any of my swap space.
one thing you should be aware of
when you use a 32bit system the maximum RAM seen by
the system is 3GB
type in this

# cat /proc/meminfo | head -n1

and you'll what I mean
If you want to have your whole 4GB recognized by the system
you need to rebuild the kernel by enabling the PAE option
(provided your machine can work with PAE)
after
# make oldmenuconfig

when you get to the maximum amount of memory
you should select 64GB instead of 4GB otherwise the
PAE option won't appear
in other words in your resulting kernel config you should
have these

CONFIG_X86_PAE=y
# CONFIG_NOHIGHMEM is not set
# CONFIG_HIGHMEM4G is not set
CONFIG_HIGHMEM64G=y
CONFIG_HIGHMEM=y
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
 
Old 06-26-2009, 07:56 AM   #6
kc3
Member
 
Registered: Jun 2009
Distribution: Linux from Scratch
Posts: 172

Original Poster
Rep: Reputation: 35
Quote:
Originally Posted by vonbiber View Post
one thing you should be aware of
when you use a 32bit system the maximum RAM seen by
the system is 3GB
type in this

# cat /proc/meminfo | head -n1

and you'll what I mean
If you want to have your whole 4GB recognized by the system
you need to rebuild the kernel by enabling the PAE option
(provided your machine can work with PAE)
after
# make oldmenuconfig

when you get to the maximum amount of memory
you should select 64GB instead of 4GB otherwise the
PAE option won't appear
in other words in your resulting kernel config you should
have these

CONFIG_X86_PAE=y
# CONFIG_NOHIGHMEM is not set
# CONFIG_HIGHMEM4G is not set
CONFIG_HIGHMEM64G=y
CONFIG_HIGHMEM=y
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
I know, there isn't enough addresses for more then 4GB on 32 bits, usually how much is available though depends on the hardware. 4GB is the max but the hardware will reserve a portion of it for other things so your available RAM for the OS can be anywhere from 3GB to 3.5GB (seems to depend on the OS) As far as I know any method of getting a 32 bit system to pickup more RAM won't actually make more available just make it detect more. I don't believe there's an actual software way around that unless you switch to 64 bit.

This should be the same for any OS.

Last edited by kc3; 06-26-2009 at 07:57 AM.
 
Old 06-26-2009, 08:48 AM   #7
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
If you use this command you can look at all of your processes.

top
 
Old 06-26-2009, 08:56 AM   #8
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by hitest View Post
If you use this command you can look at all of your processes.

top
That's not completely true - you can use top to see as many processes as will fit in your terminal.
Code:
top -b -n1 | less
will output all your processes to less. Otherwise, there's ps, which is a powerful beast.

Alternatively, grab htop, and scroll up and down through your processes with the cursor keys.

OT and pedantic, I know
 
Old 06-26-2009, 09:19 AM   #9
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
As far as I know any method of getting a 32 bit system to pickup more RAM won't actually make more available just make it detect more. I don't believe there's an actual software way around that unless you switch to 64 bit.
As far as I know that's not quite right. I believe PAE allows up to 64Gb to be accessed. The wikipedia page stays this is due to allowing 36bit address lines to be used. Here is the wiki entry on PAE. I'm no hardware expert but as far as I recall PAE won't allow blocks of memory to exceed the normal 32 bit rules but will page more than 4Gb in and out. Someone more clued up than me on PAE may chime in on this !

In any case I believe running a PAE enabled kernel will benefit when running with 4Gb of RAM. Personally I only run with 3Gb - which itself is reported back a bit strangely by some OS tools. For example "free -m" reports 3041 MB to me when I thought 3GB was 3072MB. Top reports 3114084KB total memory - which again seems to be 3041MB by my reckoning. Hmm...
 
Old 06-26-2009, 10:11 AM   #10
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Smile

Quote:
Originally Posted by pwc101 View Post

OT and pedantic, I know
Good post. Not off topic at all. The top command will give a general indication of running processes. Your post filled in the gaps.
Thanks.
 
Old 06-26-2009, 10:16 AM   #11
kc3
Member
 
Registered: Jun 2009
Distribution: Linux from Scratch
Posts: 172

Original Poster
Rep: Reputation: 35
Quote:
Originally Posted by bgeddy View Post
As far as I know that's not quite right. I believe PAE allows up to 64Gb to be accessed. The wikipedia page stays this is due to allowing 36bit address lines to be used. Here is the wiki entry on PAE. I'm no hardware expert but as far as I recall PAE won't allow blocks of memory to exceed the normal 32 bit rules but will page more than 4Gb in and out. Someone more clued up than me on PAE may chime in on this !

In any case I believe running a PAE enabled kernel will benefit when running with 4Gb of RAM. Personally I only run with 3Gb - which itself is reported back a bit strangely by some OS tools. For example "free -m" reports 3041 MB to me when I thought 3GB was 3072MB. Top reports 3114084KB total memory - which again seems to be 3041MB by my reckoning. Hmm...
Oh okay, but it looks like it's still the same as what I was saying, pretty much changing from 32 bit to 36 bit, didn't know that could be done, very good to know

I guess one way around the RAM limitations would be to like get a GC-RAMDISK which is a hard disk made of battery backup RAM so it can support another 4GB but it's just as fast as RAM (one of the fastest disks availble) and you could put your swap on there essentially adding 4GB of ram.

Last edited by kc3; 06-26-2009 at 10:21 AM.
 
  


Reply



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 question bigalexe General 4 09-06-2007 07:20 PM
Question about RAM Tortanick Linux - Hardware 9 12-17-2006 10:51 AM
question about RAM mikeyflynn Linux - Newbie 3 07-12-2005 07:40 PM
question about ram... zerojosh Linux - Hardware 1 06-17-2004 06:46 PM
RAM question... Thymox General 2 01-14-2002 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:51 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
Open Source Consulting | Domain Registration