Personal tools
You are here: Home Members kedai's Home squid and zope
« June 2018 »
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Log in

Forgot your password?
Who - kedai (a) kedai . com . my
Where - Malaysia
What - we do zope/plone, linux solution for network, vpn, mail, etc
Document Actions

squid and zope

by kedai last modified Jun. 16, 04 05:16 PM

here's a note to self about using squid to accelerate zope. and to get combined log format. this is done with squid2.5stable5

armed with squid: the definitive quide, i went and installed squid to act as a http accelarator. here's what i did:

  • get squid source. where? of course.
  • patch with this patch; altered to ignore identd

    patch -p0

  • i'm running linux, and according to the benchmark done (in appendix of the squid book), aufs is faster than ufs and diskd. the fastest is coss, but that's too bleeding edge.
  • and since we're expecting squid to receive huge requests, we need to configure the file descriptors correctly. otherwise, we'll run out of file descriptors. on linux, do:
        ulimit -SHn 8192

and change the default __FD_SETSIZE in /usr/include/bits/typesizes.h (kernel 2.6) to 8192

  • do ./configure:
            ./configure --enable-store-io=ufs,aufs,diskd,coss --enable-async-io

and look for:

        With pthreads
        Store modules built: ufs aufs
        Removal policies built: lru
        Auth scheme modules built: basic
        unlinkd enabled

  • now do a make;make install

we're done. do the necessary with squid.conf, make sure we're using aufs for cache_dir. init our cache_dir (squid -z), and start (squid -sD)

look into cache.log,:

        2004/06/16 05:42:58| Squid Cache (Version 2.5.STABLE5): Exiting normally.
        2004/06/16 05:43:02| Starting Squid Cache version 2.5.STABLE5 for i686-pc-linux-gnu...
        2004/06/16 05:43:02| Process ID 19106
        2004/06/16 05:43:02| With 8192 file descriptors available
        2004/06/16 05:43:02| DNS Socket created at, port 32770, FD 5
        2004/06/16 05:43:02| Adding nameserver from /etc/resolv.conf
        2004/06/16 05:43:02| Unlinkd pipe opened on FD 10
        2004/06/16 05:43:02| Swap maxSize 2048000 KB, estimated 157538 objects
        2004/06/16 05:43:02| Target number of buckets: 7876
        2004/06/16 05:43:02| Using 8192 Store buckets
        2004/06/16 05:43:02| Max Mem  size: 20480 KB
        2004/06/16 05:43:02| Max Swap size: 2048000 KB

we're good. haven't yet put this live, so can't really say how the performance is.

we'll see

oh, and if anybody wondered, i ended up using fc2 and 1 gentoo :P. i guess familiarity with the OS is an important criteria.

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: