RE: cache_mem at version 1.1.14

From: Larmour, Jonathan <>
Date: Wed, 10 Sep 1997 19:40:19 +0100

Hash: SHA1

From: Thomas Krause
Sent: 10 September 1997 18:49
To: Larmour, Jonathan; ''
Subject: Re: cache_mem at version 1.1.14

>Von: Larmour, Jonathan <>

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%
        Pool for in-memory object 12288 x 4096 bytes = 49152 KB (
        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
 --[ It is impossible to enjoy idling thoroughly unless one has ]--
 -----------[ plenty of work to do - Jerome K. Jerome ]------------
Fight spam! The
Version: PGP for Personal Privacy 5.0
Charset: noconv

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