Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a recent version of HAProxy 1.5 (dev15), and I've noticed that after HAProxy has been running for a while, its memory usage creeps up from initially 0.9% of the total memory to 1.9% and stays there even when there is no more incoming requests.

The thing is that since my site is new, and it goes up and down, I'm pretty sure that almost no request is made to it except for those from my own testing. My tests usually last about 10 - 20 mins, and I shut down the servers behind HAProxy when finished and leave HAProxy running. In other words, the extra 1% of memory is probably caused by handling my requests during the tests, but shouldn't HAProxy release them when the servers is shut down and no one is making requests anymore?

Can someone please explain the likely cause(s) for this memory consumption by HAProxy?

share|improve this question
up vote 1 down vote accepted

No, it shouldn't. The operating system will allocate physical memory as it can best be used regardless of whether the application tells it to or not. Specifically releasing the memory would just add overhead in using the memory again as the application would have to request it from the operating system.

By simply doing nothing, the application retains the memory so long as the operating system has no better use for it. And it can use it again without having to make a specific call to the operating system. The operating system can still use it for some other purpose should it be needed. So this is the best situation all around.

share|improve this answer
thanks for the useful info on memory allocation behavior of the OS, I wasn't thinking along that line. – MLister Feb 28 '13 at 8:40

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.