Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a fresh installed Ubuntu 12.04 server, we don't used it yet, it has 2GB memory and I install Apache + MySQL.

The problem is when the server rebooted memory usage is lower than 320MB but when leave it for 2-3 day it grooved up and reach to 1.5 GB and move to reach all my 2GB without any usage of web and MySQL.

It is not to good, I have about 70 running process, where I can change to optimize the memory usage?

Also I have another server with same hardware running CentOS 6.3 with every program installed and in server VoIP user with Asterisk, MySQL, Web, but with this load its memory usage never goes above 350MB and it is even lower than it.

share|improve this question
Please, post the output of free -m. –  Eric Carvalho Dec 30 '12 at 13:42
Also, run top, press capital M (to sort by memory usage), take a screenshot and include it in your question. –  Eric Carvalho Dec 30 '12 at 13:46
What changes did you make to the Apache MPM (worker, prefork, ...) in the childs to spawn? By default a Prefork-MPM configuration can easily get a 2GB system out of memory with just 100+ open connections (each connection will be a 20MB fork with PHP for example). And what process is consuming all the memory? It can also be a MySQL buffer pool configured too big. See also this answer of me on unix.SE. –  gertvdijk Dec 30 '12 at 14:40
Also run vmstat 2 10 it shows how much of the memory usage is buffers and caches. –  McNisse Dec 30 '12 at 16:02
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.