Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
My memory over time just gets eaten up and never released.
I have 2x 256 MB DIMMS and a AMD K6-2 400 Mhz which are recognized by the OS Redhat 7.2, and this memory works fine in a Windows machine. After time, the memory keeps getting used and never gets released, after a certain amount of memory usage around 80% I know I start getting errors. Crontabs at night start having failures. The swap file never gets used, and I am not running anything custom which would have memory leaks.
I can manually produce the effect by compiling standard programs. Eventually, I can stop these errors which don't indicate they are memory just generic errors of failure. I stop them by rebooting which clears the memory. In a few days I have to repeat the process. I actually tried this with two different sets of physical memory.
Wish it were that easy, but various processes will just fail with different errors. I have a 2.4.9 kernel, but I am think of compiling a new kernel as there are some messages on another site which indicate it might be memory management.
Next time this happens run the command 'free'. To the right of where it says "+/- buffers/cache" is the actual amount of RAM that is used by programs. As long as this value is small (Depending on what you do, probably around 100MB) this is perfectly normal. How much RAM is listed as being cached? Buffers??? Cached is stuff from your hard drive that is stored into RAM to make access quicker later. Depending on what you are compiling there might be a lot of disk IO that is filling up the cached area. When more RAM is needed the beffers and cached areas are cleared out for the programs to run in. If you are running Gnome, I know that Nautilus is a big memory hog.
Honestly I haven't come across any app that would test video memory on linux machine, but I am thinking of running one of the www.madonion.com apps such as 3DMark through wine, I haven't tried it yet, it mightn't work, but still it's worth the shot; probably you will get errors running DirectX tests, but who knows.
I believe your X freezes are related to the RAM failure. See if substitution of RAM fixes the problem.
Also take a look at vidtune, just be carefull with this app (search www.google.com/linux for vidtune, you might have it installed on your system as well).
ayhopkins: There is no problem from the data that you posted. At the time you ran 'free' you only had 47MB RAM used, the rest (about 368MB) was in hard drive caching. (files that you used, stored in RAM for faster use later) I know it looks bad with only 3MB RAM free but this is just how Linux does it.
is there a way to stop Linux from caching the disk data to RAM cos at a given point we may not use all that the system has cached, alternatively can is there a way to move this cached data from RAM to SWAP area such that we have as much free RAM as possible
Originally posted by PimpNasty ayhopkins: There is no problem from the data that you posted. At the time you ran 'free' you only had 47MB RAM used, the rest (about 368MB) was in hard drive caching. (files that you used, stored in RAM for faster use later) I know it looks bad with only 3MB RAM free but this is just how Linux does it.
you're right about this one... but what I am worried about is that the Swap stays empty... what u should try is to finger your swap.
try running tonnes of different processes and see what it does..
on one certain point your memory will be full and it will start writing to the swap.. if it doesnt it's something else.
Originally posted by aaronsols is there a way to stop Linux from caching the disk data to RAM cos at a given point we may not use all that the system has cached, alternatively can is there a way to move this cached data from RAM to SWAP area such that we have as much free RAM as possible
Sync (info sync or alt+sysrq+s if enabled). Kinda uhhh, syncs mem with the disks :-]
Caching strategy can be changed somewhat by changing sysctl(8) values like vm.bdflush, vm.buffermem, vm.pagecache, vm.freepages, etc etc. Documentation for this is in /usr/src/<kernelversion>/Documentation/vm.txt.
AFAIK Linux only does swap out when forced, and there's no need/way to do it manually, like on the Space Shuttle there ain't no one gonna visual check if the gears went down right :-]
I've seen a thread like this on another forum and it turned out that the amount of memory u have totally has nothing to do with how much u keep free.
this is the same with windows machines... I saw clients with 750megz of ram and they had 400 used... and all they did was booting up windows and maybe use 3 or 4 apps. nothing unusual.
And the swap will be released when needed..
never forget, linux is a caching and logging whore. which is good
Don't worry about trying a new kernel if thats your only problem. You will have the exact same "problem" with the new kernel. It just uses uneeded RAM for cache and buffers and gives that RAM up when more RAM is needed to run a program in. Moving the cache and buffers to swap would be pointless because that is on a hard drive with the rest of your data.
It looks bad but it actually isn't. Thats just how linux does it.