Re: memory mapped store entries

From: Stephen R. van den Berg <srb@dont-contact.us>
Date: Tue, 25 Aug 1998 04:31:08 +0200

Alex Rousskov wrote:
> How much memory do you save with mmapped files? Sorry if I miss that
>info in your description.. Assuming sizeof(StoreEntry) on your system is S:

> mem = S * #entries;
> mmapped = 28*#entries + X*#entries;

> mmapped/mem = S / (28 + X) = ??

X = 44
S probably is 28+44+the overhead to allocate separate cache_key keys.

The savings are not in userspace memory alone here. The savings appear
when you add userspace and kernelspace memory together.
What also helps is the reduced fragmentation (even though that is already
minimised by the squid 1.2 mempool arrangement).

>If we are talking less than ~20MB for, say, 20GB cache, then, maybe, the
>savings are negligible considering the price. Also, does the "packing" of
>entries introduce any processing overheads?

No, with packing I didn't mean "packing the struct fields", but packing
the structs into an array (in the file). Sorry about the confusion.
Anyway, there's more than memory savings alone, there's "instant" restarts
and "kill -9" terminatable squids (God's gift to developers running beta-
squids on production machines :-).

-- 
Sincerely,                                                          srb@cuci.nl
           Stephen R. van den Berg (AKA BuGless).
This signature third word omitted, yet is comprehensible.
Received on Tue Jul 29 2003 - 13:15:52 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:52 MST