Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
When booting my Linux box, its memory usage was very high within 6 minutes. I have 256MB RAM on the thing, and 3MB or less was fee. It doesn't seem that a single application is using hundreds of MB of RAM so I'm not sure what's going on. Here's a "ps aux;uptime;free" dump:
Real-time stats available at kidindustries.net/servstat.php
See anything causing this? o_O Or maybe my RAM stick is messed?
I upgraded the RAM from 128 to 256 because of this problem, and in the time of 128 it had about 2 MB free with 0 swap used, now it's repeating on 256 except using more to fill the 256.
P.S. netstat -a also added to dump, just in case.
P.S.S. I also noticed MySQL using a bit of memory...
Linux tends to handle memory different than windows does. Are you using any large window manager, such as KDE or GNOME? Those can take up a large amount of memory easily. Also, linux will tend to fill up the memory, but that doesn't mean that you need more, it is just how system resources are handled. I don't think i can be anymore clear, because i haven't studied this yet; i just know that memory usage isn't something to worry about (especially with 256, which is a small amount these days...). I have 512MB of RAM on my laptop, and only between 0-50MB is free anytime i look. Yet it does not run slowly, it's just a different way of managing your computer's resources. Running servers such as apache, mysql, ftp can increase the amount of memory usage depending on how many outsiders are accessing your server. Are you running anything besides mysql?
What you want to watch is the swap. If it starts to using a !lot! of swap then you need more memory. 256Mb should be fine for most applications and just surfing the net.
The way Linux does is this: You open a app then close it. The app stays in memory unless you open another app that needs that memory. It caches the program. Note the "cached" part above in mine. Why, because the memory is faster to access than the hard drive, much faster in fact. Memory is faster than a SCSI drive even. Linux will keep caching data until it needs the memory for something else, or it has filled it up. This is also why Linux can find bad memory so well.
If you see a few megabytes of swap, that is OK. Even mine sometimes uses a little bit and I don't do any video stuff or anything that uses more memory than Mozilla or KDE. Mozilla can be a hog though.
I used to have 512Mbs of memory and upgraded to 1Gb. To be honest, I didn't see much difference. 256Mbs is good, 512Mbs is a bit better, any more than that for just surfing and such is overkill. I don't regret the upgrade but it did not really improve anything.
Hope that helps. This has been asked numerous times. I have even answered the question before.
By the way, this is a server instead of a client, so KDE/Gnome/Mozilla are out.
I'm running FTP, SSH, SMTP, HTTP, SQL, and IRC.
So basically the server is pushing aside memory but it's still available? Odd memory management ways, would make one unable to know how much memory is actually being used at a time.
Until it starts using a !lot! of swap space, like 100Mbs or so, which is a indication that it is out of memory, it is doing fine. As I said though, it may use a bit of swap from time to time. That is normal. I suspect that if you or I had 3Gbs of memory, it would still eventually use some swap. Just may take longer to get there.
You should be fine though. Memory management in Linux is much better than windoze. You close a app and it makes it available if it is needed. It is rare that I read of memory problems in Linux.
You are right though, it is hard to actually tell how much memory is really being used. You can use top and then hit the "m" key to sort by how much memory is being used. Just type in top and the command line. Hit "q" when you get ready to quit. It also shows memory usage at the top, cache and all. Hit "?" for help with the options.
Look at the line +/- buffers/cache in the free output. That tells how miuch memory is actually available. The files /proc/meminfo has more detail, and /proc/slabinfo shows you what the kernel slab allocator (internal kernel data structures) is allocating is quite nauseating detail. Besides, what's the point of buying RAM if your OS only uses it occasionally? Linux makes sure you get your money's worth on your RAM.
So mine would be 1034728000 - 185228000 - 206256000 - 255916000 which equals 387328000. That is what gkrellm shows, well pretty close anyway. My mozilla sucks up some memory. I have the Mozilla cache turned up a bit. Dial-up sucks. Mozilla uses 133Mbs on mine. I have seen it higher.
What is "dirty"? It shows that has 16kb. Just curious.
Oh, for the original poster, you ahve to cat those files. cat /proc/meminfo