Memory leak

My server freebsd has growing Active memory. It fills all the 3Gb in a day, ps statistics by process show that processes all together take about 1Gb.

What could it be? Where does the memory go?

Version is 7.1 upgraded from 6.1 with compat6x.
Services: nginx,apache22,mysql41,php,perl,munin

Thanks in advance.
 
Do note that the free memory will get used for file caching.
 
Do you ever run out of memory, or are you using a lot of swap? FreeBSD tends to reserve/preallocate almost all available memory, but it will always leave some free. For example, on a 1,25 GB RAM system, something like this is entirely normal:

Code:
Mem: 873M Active, 93M Inact, 241M Wired, 31M Cache, 112M Buf, 9232K Free

My system requires nowhere near this amount of RAM at the moment, but FreeBSD will just keep it 'under its wings'. Indeed, for caching purposes.
 
Current state is

Code:
up 0+16:15:17
Mem: 2461M Active, 649M Inact, 212M Wired, 127M Cache, 112M Buf, 59M Free
Swap: 4071M Total, 36K Used, 4071M Free

I haven't yet tested it for swap, i'll wait longer and make a post with results.
 
Keshkins said:
I haven't yet tested it for swap, i'll wait longer and make a post with results.

You can keep an eye on it with the vmstat command.
 
Thanks to everyone :)
I am just a little bit paranoid :)
When it reached 2,9 Gb, system transfered 1,5 G to inactive memory.
Swap was not even touched.
 
On a random note, this closely mirrors some reactions to Vista. :)
(It's better at using spare RAM for buffering than XP was, leading to exactly the same apparent issue.)
 
Be aware that FreeBSD doesn't even start tracking active vs inactive memory until it actually needs to. If there are boat loads of free memory, it doesn't bother tracking it. When there is memory pressure, then it'll track, classify and finally swap.
 
Djn said:
On a random note, this closely mirrors some reactions to Vista. :)
(It's better at using spare RAM for buffering than XP was, leading to exactly the same apparent issue.)

I think it would be more correct to say that ``XP is absolutely horrible at managing RAM , and Vista is slightly better''
</OtRant>
 
Back
Top