[squid-users] Tuning Squid / Memory usage

From: Janno de Wit <Wit@dont-contact.us>
Date: Wed, 09 Jun 2004 16:49:40 +0200

Hi list,

I've got a question about memory usage of squid.
In a box here I chained squid1 -> dansguardian -> squid2.

squid1 = squidIdent
squid2 = squidBack (for caching).

squidIdent contains a whitelist ~ 70000 domains/url's
dansguardian contains ~ 850000 blacklist domains and around 10000 weighted words.
squidBack is only for caching.

Output of top is as follows:

top - 16:35:35 up 2 days, 2:29, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 76 total, 1 running, 75 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1031848k total, 1004332k used, 27516k free, 81304k buffers
Swap: 2032056k total, 30308k used, 2001748k free, 273452k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25898 proxy 16 0 445m 438m 3092 S 0.0 43.5 36:48.19 squidIdent
25852 proxy 16 0 91768 85m 2352 S 0.0 8.5 2:40.93 squidBack
25873 dansguar 16 0 40148 32m 2660 S 0.0 3.2 0:11.98 dansguardian

squidIdent has memory setting:
> cache_mem 64 MB
and cache_dir:
> cache_dir null /null

SquidIdent has around 1681 users defined, authentication is via ident.
SquidIdent has around 64977 domains defined

Domains are internally in squid defined as dstdom_regex:
acl l_site_list-whitelist dstdom_regex "/usr/local/fss/squid-2.5r5/etc/ACL/accesslist-1-DOMEIN"
acl l_url_list-whitelist url_regex -i "/usr/local/fss/squid-2.5r5/etc/ACL/accesslist-1-URL"

accesslist-1-DOMEIN contains rules like:
zwevegem.be
zweven.nl
zwg.atlas.tripod.com
zwier.lifeline.nl

and accesslist-1-URL contains like:
/abcoude\.com\/loenen\/hervkloe\.htm/
/ace\.axis\.nl\/ace/

I use regular expressions because i need to match someting like urls:
tweakers.net/nieuws

Question is: why is squidIdent using so much memory? something is going wrong and can be better...

Is there a better way to match URL's / domains?
Thanks in advance for any tips.

Janno.

Janno de Wit
DNA services B.V.
Received on Wed Jun 09 2004 - 08:48:01 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:02 MDT