Answer the question
In order to leave comments, you need to log in
Memory leak in Linux?
Hey Habr.
Such a problem, memory is leaking somewhere on the server.
top — 14:58:30 up 21 days, 16:05, 2 users, load average: 0.66, 0.50, 0.49
Tasks: 145 total, 2 running, 141 sleeping, 2 stopped, 0 zombie
Cpu(s): 15.9%us , 0.0%sy, 0.0%ni, 84.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 8194056k
total, 8109096k used, 84960k free, 921072k buffers
free, 6353068k cached
PHP 5.3.5-0.dotdeb.0 (fpm-fcgi) (built: Jan 7 2011 00:07:27)
Copyright © 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright © 2007-2010, by SektionEins GmbH
Answer the question
In order to leave comments, you need to log in
In my opinion, you didn’t understand the materiel and started hysterical.
You do not eat swap means the system has enough memory. Linux actively uses memory for the cache, and your memory is consumed, if the program needs memory, then Linux will free up memory for the program.
You should be afraid when swap used grows
Swap: 7815580k total, 764k used,
7814816k free,
6353068k
cached cached
And similar on servers with 24 gigs of RAM.
This is a regular cache of files in RAM. If necessary, it is cleared instantly.
And where are the leaks?
Linux has been using all available memory for cache for a couple of years now (921072k buffers)
Why are we panicking?
The htop utility will show the actual amount of memory used and the amount of this very cache.
Your memory is leaking here: 921072k buffers 6353068k cached
It's amazing how servers end up in the hands of such advanced specialists.
Most likely php5-fpm is eating away. It does not release the occupied memory. And with the growth of requests, she also produces daughters who do the same. Here is from your config:
pm.max_children = 50
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
In htop, it's better to see how much memory is occupied.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question