RE: cache_mem at version 1.1.14

From: Larmour, Jonathan <Jonathan.Larmour@dont-contact.us>
Date: Wed, 10 Sep 1997 19:40:19 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

From: Thomas Krause
Sent: 10 September 1997 18:49
To: Larmour, Jonathan; 'squid-users@nlanr.net'
Subject: Re: cache_mem at version 1.1.14

>Von: Larmour, Jonathan <Jonathan.Larmour@uk.origin-it.com>

[snip]
Memory usage for squid via mallinfo():
        Total space in arena: 144845 KB
        Ordinary blocks: 103692 KB 61694 blks
        Small blocks: 0 KB 0 blks
        Holding blocks: 656 KB 3 blks
        Free Small blocks: 0 KB
        Free Ordinary blocks: 41152 KB
        Total in use: 104348 KB 72%
        Total free: 41152 KB 28%
[snip]
        Pool for in-memory object 12288 x 4096 bytes = 49152 KB (
18784
free)
        Total Accounted = 97208 KB

So as you can see, for a cache_mem setting of 48Mb (which sets the
size of the pool of in-memory objects), the total accounted,as
recognised by squid, is nevertheless 97Mb due to the other things
like URL strings and information about each cache object, etc.

In addition due to memory fragmentation, there's another 41Mb of free
memory, as reported by mallinfo(). The reason for this is better
explained as an example: Memory pages for linux are allocated in 4096
byte chunks. What can happen is if you allocate 1 byte of memory, the
next 4095 are obviously unused. Similarly if you allocate 1 bytes,
followed by 8190 bytes followed by 1 byte, and then free the 8190
bytes, then you get 8192 bytes being used to store 2 bytes. In
practice, situations similar to the latter situation happen a lot
over time.

Again, a way to reduce this wastage would be turning memory_pools off
- - but if you say speed is of the essence, then it has to be a
hardware upgrade :-(. You could always just try it and see! I don't
think the performance degradation will be marked.

Jonathan L.

Origin,323 Cambridge Science
Park,Cambridge,England.Tel:+44(1223)423355
 --[ It is impossible to enjoy idling thoroughly unless one has ]--
 -----------[ plenty of work to do - Jerome K. Jerome ]------------
Fight spam! http://spam.abuse.net/ The
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBNBbpXoYLUv2rigzBEQLgwwCg9gYkVs/aIrPuEi4gZO4+0rHAm0kAnA5q
y32hAwT7bu4NhBH3a7Z1NQKg
=6HT1
-----END PGP SIGNATURE-----
Received on Wed Sep 10 1997 - 11:46:01 MDT

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