Re: [Server-devel] Squid tuning recommendations for OLPC School Server tuning...

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 25 Sep 2008 00:15:15 +1200

Henrik Nordstrom wrote:
> On ons, 2008-09-24 at 10:18 +0200, Henrik Nordstrom wrote:
>
>> For on-disk objects about 100 bytes.
>>
>> In-memory objects obviously uses a lot more. Probably something like 1kb
>> + the object size rounded up to 4k pages.
>>
>> Also disable the client db unless you need to use the maxconn acl
>>
>> client_db off
>>
>> And don't configure with too many filedescriptors. The default 1024 is
>> probably reasonable for the environment. (Note: configure flag in
>> squid-3, squid.conf option in 2.7)
>
> A quick inspection using nm also reveals that there is some data
> elements which can easily be trimmed down
>
> size type name
> 131072 b queried_keys
> 131072 b queried_addr
> 131072 b queried_keys
> 262144 B server_pconn_hist
> 262144 B client_pconn_hist
>
> The first three is used by ICP and can be ripped out if you do not need
> to support ICP. But if you need ICP then they are needed (but can be
> shrunk down a bit by limiting the ICP id range).
>
> The second two histograms is purely informational statistics. Should be
> fine to set PCONN_HIST_SZ to something much smaller such as 64, or
> disable this part of the code entirely as not used other than for
> statistical information available via cachemgr.
>
> There probably is a lot more junk being allocated runtime which can be
> trimmed, especially if you build with ssl support. But the fd_table
> seems to be the only big one and can not be significantly trimmed by
> other means than limiting the number of concurrent connections
> (filedescriptors).
>
> Regards
> Henrik

I've had a suspicion since I first heard Squid was in use for OLPC, that
we would be needing to soon provide configure options to remove features
such as ICP which they and perhapse others in the *WRT mini-device areas
don't need.

On that train --disable-htcp and --disable-wccp may be useful if you
don't use those features.

Theres a small project for someone, adding default-enabled configure
macros back into squid ;-)

Maybe an overall option like --disable-peering, to wholesale drop
cache_peer and all its related features for slimline stand-along Squid.
Theres a good (estimated) 15% of the app footprint gone.

One feature I'm uncertain of utility-wise is the netdb cache
(--enable-icmp). It may be beneficial for schools on flakey links which
need to ensure fast retrieval of data from a set of stable peers before
the link dies. Though that does add more memory for the NetDB itself and
some baseline ICMP load to the link.

Amos

-- 
Please use Squid 2.7.STABLE4 or 3.0.STABLE9
Received on Wed Sep 24 2008 - 12:15:29 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 24 2008 - 12:00:06 MDT