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.
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.
I have a dedicated web server running apach 2, php4, and mysql4 (celeron 1.3, 1gb of ram). When I first boot up the system and users start browsing the website, my memory usage is about 200-300mb. After a few hours though, with the same number of users browsing the website, the memory usage just keeps going up and up until the server crashes. I look at top, but it doesn't make sense to me because the memory usage by the processes doesn't add up to anywhere near what it says is being used.
For example, here is the top command sorted by memory usage:
It says that 1gb of memory is being used but look at the memory for the actual processes - they add up to like 100mb! What is causing all the other memory usage? What is going on?
Memory is cached and used efficiently in Linux. This is normal, don't start worrying until swap starts getting used heavily. Also, this is asked all the time about memory in Linux, you should try searching for more detailed explanations.. I've answered it so many times myself, I don't feel like going into those details myself.
There are many other articles telling to change Maxrequestsperchild to 20-25 and in httpd.conf
I have to still try them though initial tries did not help.
Let me know if you tried any solution successfully.
My problem is specially due to dynamic content served with mysql . apache processes start wiht 39MB keep growing and then hand the server. Mysql processes also eat a lot. I had 380MB ram before and increased to 1GB and still its happening.
I think this problem is common and there should be tested solutions instead of trials suggested in most articles.
I appreciated that RAM should be used but not FREE !
My case is similar installed FC3, the free memory is little (mostly) out of 512MB.
However, I found my cache is sometimes not much (32MB e.g.).
so I check the ps and seen most memory is being used by around (usually) 20 httpd (each 6% total mem) processes.....
Questions:
1) is this also normal ?
2) why httpd not free up mem (the memory limit is 16M shown in phpinfo.php)
3) if not normal, how to config the solution for this ?
(meant I want each httpd use less memory and maximize them (allow more httpd processes)) ?
(but not just keep mem free).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.