LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux is using all my RAM (https://www.linuxquestions.org/questions/linux-newbie-8/linux-is-using-all-my-ram-44163/)

QCompson 02-05-2003 06:18 AM

Linux is using all my RAM
 
I'm a new linux user, and I recently installed Redhat 8.0 on a PIII 866 mhz with 512 mb ram. The install was a breeze, and it appears to be running properly, but I noticed that after the computer has been booted up about an hour, it is using 97% or 100% of my memory. It will stay at this 97%/100% threshold until I reboot, at which point it drops back down to 27% or something and begins (as I open programs) it's steady ascent all over again to 97%. The memory usage is confirmed in 'top' as well.

I have been trying to pinpoint a particular program that may have a memory leak, but this seems to happen no matter which programs I have open. At no time is there any process in top using more than a fraction of the memory, and the swap memory remains untouched.

It's not particularly debilitating to my system; everything still seems to run well despite all the mem usage, and I don't really notice any slowdown, but it just seems a little excessive to be using all that ram the whole time.

Is this normal?

Any help is appreciated.

Mara 02-05-2003 06:21 AM

It's normal. In fact, not the whole memory is used, it's just ready to use. If it's not swapping too much (it shouldn't), everything's OK.

whansard 02-05-2003 06:42 AM

Linux is using all the ram as hard drive
cache, until you need it for something else.
under top
you can check the entry for cached, to see
how much it is using for cache at that time.

QCompson 02-05-2003 05:16 PM

Thanks for the help, it all makes sense now.

VioLaToR 05-05-2003 04:12 AM

Is it safe to assume that this is also true in Slackware 9?

I have 1 gig of RAM and after about a day of running, it's using about 900MB of my RAM. I figured this woutd be causing major heat issues if it was actually "using" the RAM. I felt my DIMMs and they are as cool as they ever are.

They are just ready and waiting? is that correct?

trickykid 05-05-2003 09:03 AM

Quote:

Originally posted by VioLaToR
Is it safe to assume that this is also true in Slackware 9?

I have 1 gig of RAM and after about a day of running, it's using about 900MB of my RAM. I figured this woutd be causing major heat issues if it was actually "using" the RAM. I felt my DIMMs and they are as cool as they ever are.

They are just ready and waiting? is that correct?

Yes, like stated before and many other times, Your RAM being used is a good thing.. Why have 1 GB of RAM and only 128 Megs are being used at any maximum time, that would be a waste of memory and you might as well only use a 128 MB stick of RAM right? But no worries, Slackware last time I checked was Linux and they all work the same way with utilizing your RAM in your system.

whansard 05-05-2003 09:48 AM

the ram is generating the same amount of heat
whether it is utilized not. at each refresh "all" the
ram is refreshed, whether it has all zero's in it or not.

Athlon_Jedi 05-05-2003 01:16 PM

HIGH RAM USAGE
 
OK the reason for the way linux is "using" so much ram is that unlike the way windows manages memory(by putting it into a wait state untill its used, hence bsod and similar problems) linux ACTIVELY manages the memory in a particular system meaning it puts a flag into the first byte of every MEGABYTE of memory in the system that tells the kernel what is in "use" and what is not. The kernel then in turn knows how much memory is available for things like disk cache, apps and so forth so it doesnt have to change the state of memory from a wait state to an active(i.e. useable) state. because it is ALL active all the time. This is why apps and such run better under linux because they dont have to wait on the memory they require to"wake up". the kernal can place data into memory DIRECTLY. its also why the unix version of pre-emtive multitasking is more stable than the MS version.

mydini 05-05-2003 03:37 PM

so should I be throwing ram at my machine, or is there a limit?
(I have no hassles with my speed, just interested)

Athlon_Jedi 05-08-2003 02:23 PM

well as with any system the more memory you have the better off you will be. as far as the theroretical limit linux can handle i have no idea

aherm 05-08-2003 11:40 PM

Linux is more efficient in utilizing RAM than windows. A 256 MB is plenty for average desktop usage with linux. 128 is enough with GUI and 512 is more than enough. Don't worry to throw more RAM -> the more the merrier ;-)

Unlike windows, even if you have 1GB of RAM the disk swaping is still intense for some apps -> this slows down the performance since RAM is much faster than HDD. Try open an run as many applications simultaneously as you can ;-)

Currenly the 32-bit version of linux can handle 64GB of RAM, how much your motherboard can handle, 4GB? Don't ask the 64-bit version yet, I don't know.


Have a lot of fun :-)

Athlon_Jedi 05-10-2003 11:18 AM

** update **

the 64 bit version can handle up to 18 EXABYTES which is 3 times the amount of words EVER spoken by the entire human race!!!!!

but it is unlikly ANYONE could EVER afford that much memory unless you build a HUGE beowolf cluster, like say 2000 nodes or better. ;)

fancypiper 05-10-2003 11:57 AM

See your memory usage:

Code:

[phil@tinwhistle phil]$ free -m
            total      used      free    shared    buffers    cached
Mem:          376        368          7          0        45        216
-/+ buffers/cache:        106        269
Swap:          133        25        108
[phil@tinwhistle phil]$

Working it hard with running a bunch of stuff while compiling a program
Code:

[phil@tinwhistle phil]$ free -m
            total      used      free    shared    buffers    cached
Mem:          376        370          5          0        65        190
-/+ buffers/cache:        114        261
Swap:          133        25        108
[phil@tinwhistle phil]$


robik 12-17-2003 07:13 PM

I'm running slackware 9.0 and have some really strange problem. The ram usage is growing in steps of 30 kb every 10 secs.
I have no services running( only sendmail and sshd and system processes like atd and so on) and no users(fresh install).
Im using 256 ddr ram. Is it s it normal, cause i think in a couple of hour it will take all my ram.
What i need to do. Thanks to all.:newbie:

whansard 12-17-2003 09:05 PM

if you look under
top
you'll probably see that the ram is used as "cached"
that's drive cache and it's good. it will be released
if a program needs it.

qwijibow 12-17-2003 09:14 PM

Quote:

linux is using all my memory
yeah, i have half a gig of ram, and fedora uses somthing like 90% or more all all times.
isnt it great !!!!


All times are GMT -5. The time now is 09:59 AM.