Hi!

On 20/02/06, Hannah Schroeter <[EMAIL PROTECTED]> wrote:
> Hello!
>
> On Sat, Feb 18, 2006 at 03:40:48PM +0000, Constantine A. Murenin wrote:
> >I have a box with 512MB of RAM, which is running a snapshot from 2006-02-13.
>
> >The box does not get used much, so most of the RAM stays still, i.e.
> >not used by the userland.
>
> >I am now quite surprised why OpenBSD does not use all of this RAM for
> >disc cache etc.
>
> Because nobody has submitted code that actually gets it right. There
> was code for unified VM/buffer cache in the tree once, but got reverted
> a few weeks later when it showed itself that there were significant
> problems with it.
>
> Just one "effect" you have to care for, on Linux (which *has* a unified
> VM/buffer cache system) we mkdir many directories (e.g. hashed buckets
> like squid uses them, just a few more, 256 * 256, to be precise). It was
> quite long (at least into the Linux 2.4 series) that that worked like
> this: mkdir completed quite fast until the memory was filled with dirty
> blocks, then the box *hung* completely until all the dirty blocks were
> actually written to disk. This isn't acceptable. And it's not acceptable
> for something like grep foo (a list of names of long files) pages out
> every program.
>
> Just two things where it shows how difficult it can be to get things
> right. It's much easier to get it right as it is in OpenBSD.

Yes, there is always some compromise. But in this specific case we
have much less than even a fifth of memory actually being used for
programmes and kernel etc. Some of the rest is used for cache, but it
still stops at around 3/4 or even 4/5 of the memory being wasted for
nothing.

We are not dealing here with a case of someone wanting to use the
remaining 64MB for disc cache on a 2GB server (assuming the rest of
memory being already utilised for cache): -- this is a case of a 512MB
machine behaving as if it was a 128MB one, not using the extra 3/4 of
available memory. I assume that even if I put the extra 1G in, the
proportion of wasted memory will only increase.

And 512MB, I must add, is the de facto minimum today for any machine,
making this even lack of tune-up even more unacceptable.

Cheers,
Constantine.

Reply via email to