memory "leak" in 2.6

I was never particularly happy describing this as a

"leak", since the memory gets freed up again. Turns

out that I would have been right not to, since this

has never been a leak.

Thanks to John Leadeham, Pete Durst, Robert Alexander,

Buddy Lumpkin, David Spence and Dennis Martens for

their replies. I think Pete Durst's reply explained

this best, and I'm just going to quote it directly:

> You are not seeing a memory leak, but in fact seeing

> how memory is being used by the system. Your

> observations were right on. The systems maintain

> a minimum number of pages of memory in a free memory

> pool. While the system has more memory available

> than this level, it does nothing to replenish the

> pool. Once the level falls below the minimum

> threshold, it goes out and gets the un-used memory

> and puts it back into the pool.

> The threshold is set to 1/64th of total memory, and

> this will explain the differences between systems.

> The reality of the system is this: You can never

> really, truly know how much memory is free, as the

> system only looks for free memory when required

> (less than the threshold) and stops looking once it

> has more than the threshold. So, in most cases, you

> will see the system hover around the value of the

> threshold. (The value you see is the number of

> pages available, and needs to be multiplied by

> `pagesize` to see the actual size of the free memory

> pool). Adrian Cockcroft's Sun and Performance

> Tuning book is an excellent resource to have close

> at hand.

Original question:

>Admins,

>

>I've seen this issue on a number of 2.6 machines, and

>am trying to find out where the problem is coming

>from.

>

>While gathering information for system

>troubleshooting I will often run simple resource

>monitoring scripts.

>In this case:

>

> while true

> do

> date >> vmstat.out

> vmstat >> vmstat.out

> echo >> vmstat.out

> sleep 900

> done

>

>What I've seen on a number of 2.6 systems is that

>used virtual memory will steadily increase to a

>certain threshold - different values on different

>systems - and then drop back to zero(ish) again.

>This doesen't seem to have any impact, but it happens

>on systems at various patchlevels, I can't find

>anything on Sunsolve (though I'm maybe looking for

>the wrong thing) and there don't seem to be any

>processes growing apace. I'd just like to find out

>if someone knows where this "leak" originates from.

Thanks again,

Stuart Whitby.

__________________________________________________

Do You Yahoo!?

Talk to your friends online and get email alerts with Yahoo! Messenger.

http://im.yahoo.com/

[3719 byte] By [CodeProf.com] at [2007-12-25 9:59:00]