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. |
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.
|
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? |
Quote:
[update] Just got home, yeah it looks good now, thanks :) |
Quote:
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 |
Quote:
This should be the same for any OS. |
If you use this command you can look at all of your processes.
top |
Quote:
Code:
top -b -n1 | less Alternatively, grab htop, and scroll up and down through your processes with the cursor keys. OT and pedantic, I know ;) |
Quote:
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... |
Quote:
Thanks. :) |
Quote:
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. |
All times are GMT -5. The time now is 01:06 PM. |