Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is bizarre. I posted something in Security forum not too long ago about this, thinking I had a virus, thought it cleared up, but its still an issue.
Running Debian on a P2 266 with 160MB of physical RAM, 500mb swap.
The second I boot up the box and check free, I typically have between 1.5MB and 5.2MB free.. Before I started having this problem, I would have about 80 or 90mb free. I'm running apache, mysql, ssh, and one or two other items (now also clamav).
I installed clamav and ran it.. found and cleaned two viruses, went back to about ~60mb free. Thought the problem was fixed. I haven't used the box for two or three weeks. Fired it up tonight and I'm back down to 1989K free.
So what do I do now? I really don't want to reformat and start from scratch. I'm fairly new to this, so be gentle. :O
What viri did you find then, since they can't do a thing on a Linux box? I don't think virusses are an issue.
Let Linux handle the memory. If you execute a program and close it after a while you will have more free memory temporarily, till the system uses it again for other programs or system cache. Nothing is wasted on Linux.
This shows the amount of memory and swap in Megabytes.
It shows I have 7 megs free.
I have a total of 248 and used 241 which is 7 remaining free.
Below that I have used 112 M in Buffers/cache. if you subtract 112 from 248 it says there is 136 free. This means that if there was no cache/buffers being used in the memory you would have that much free. Buffer/cache get move out of memory as other programs require memory. If you are confused show us your output of "free -m".
If you are still concerned something is taking too much memory use the command "top" and then hit 'm' to sort by memory usage.
Originally posted by syg00 Go and find a real problem to worry about.
High memory usage is a design objective of Linux. Memory is fast and it's (relatively speaking) expensive.
Best ROI is to use it - simple as that.
Do some searching - this has been addressed ad nauseam.
Silly me for wasting my time. I thought this forum was designed to ask questions and learn.. considering the domain name and all.
The only reason I have a concern is because I was running for months at "normal usage" (60mb or so in use) and overnight (literally) I check the server and I'm running at 2 or 3mb avail...
Just doesn't seen normal to me. And it IS a real problem because when I have 2mb or 3mb avail, no one can connect to the server (its a webserver)..
This shows the amount of memory and swap in Megabytes.
It shows I have 7 megs free.
I have a total of 248 and used 241 which is 7 remaining free.
Below that I have used 112 M in Buffers/cache. if you subtract 112 from 248 it says there is 136 free. This means that if there was no cache/buffers being used in the memory you would have that much free. Buffer/cache get move out of memory as other programs require memory. If you are confused show us your output of "free -m".
If you are still concerned something is taking too much memory use the command "top" and then hit 'm' to sort by memory usage.
If you look at the number below it you have 125 MB free if you did not include the buffer/cache in the memory. If that starts moving closer to zero then something is really starting to eat memory. Buffers/cache get moved out of memory as needed so no need to worry about that eating memory.
If you include your swap space you actually have 479 MB free.
Originally posted by sspiro
Silly me for wasting my time. I thought this forum was designed to ask questions and learn..
Search first then ask. If you have a particular problem include all the relevant info.
Quote:
The only reason I have a concern is because I was running for months at "normal usage" (60mb or so in use) and overnight (literally) I check the server and I'm running at 2 or 3mb avail...
Just doesn't seen normal to me. And it IS a real problem because when I have 2mb or 3mb avail, no one can connect to the server (its a webserver)..
This is more useful - should have been in the initial post.
You need to get some comparative numbers for when the problem - particularly users being bounced - is occuring.
The 2.6 kernel introduced a "swappiness" control that might be useable. But it could affect disk response time by force releasing the disk cache. Might get you around a "bombardment" against the webserver that could cause a lot of data to be read constantly, and fill cache.
Do your logs show any such events ???.
Re: Re: Re: Re: Still having Free memory issues..?
Quote:
Originally posted by benjithegreat98 If you look at the number below it you have 125 MB free if you did not include the buffer/cache in the memory. If that starts moving closer to zero then something is really starting to eat memory. Buffers/cache get moved out of memory as needed so no need to worry about that eating memory.
If you include your swap space you actually have 479 MB free.
Quote:
Originally posted by syg00 Search first then ask. If you have a particular problem include all the relevant info. This is more useful - should have been in the initial post.
You need to get some comparative numbers for when the problem - particularly users being bounced - is occuring.
The 2.6 kernel introduced a "swappiness" control that might be useable. But it could affect disk response time by force releasing the disk cache. Might get you around a "bombardment" against the webserver that could cause a lot of data to be read constantly, and fill cache.
Do your logs show any such events ???.
OK. I'm going to continue to keep an eye on it. I can connect to the IP just fine right now, so its all OK. I'll re-run these commands and see what's going on when I have connectivity issues.
Right now the logs don't really show anything out of the ordinary.. I guess its just a learning curve for me really.
I got more physical memory and installed. I'm at 390mb now, so its running better.. but still running odd. With 390mb physical, I'm using now 170mb and have the balance free. Although I stil have half available and its running good, I still can't find a reason for 170mb to be in use..
when you can't connect to your server it's most likely not a problem with memory
that is a very small amount of memory and a small swap space fror a server
if you were actually having memory problems you would show all the swap being used
and then lock up/crash i think
i agree with what others have posted -- you are confused about the way linux uses memory and are possibly trying to apply windows concepts where they are not valid.
repeat this over and over
all memory in Linux is virtual
all processes have acces to 100% of available RAM 100% of the time
i agree with what others have posted -- you are confused about the way linux uses memory and are possibly trying to apply windows concepts where they are not valid.
repeat this over and over
all memory in Linux is virtual
all processes have acces to 100% of available RAM 100% of the time
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.