Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- install:
- sudo apt-get update
- wget http://www.squid-cache.org/Versions/v4/squid-4.8.tar.gz
- tar xvzf squid-4.8.tar.gz
- cd squid-4.8
- sudo apt-get install build-essential
- sudo apt-get install autoconf g++ python2.7-dev
- sudo apt-get install libssl-dev
- ./configure --with-openssl --enable-ssl-crtd
- make
- sudo make install
- #It will install everything to /usr/local/squid
- CACHE_DIR: "cache_dir aufs Directory-Name Mbytes L1 L2 [options]"
- - install pthread for "aufs"
- sudo apt-get install libpthread-stubs0-dev
- - DIskd works perfectly on some OS'es, like Solaris, BSD.
- - Linux-based OS, AFAIK, works with diskd so slow. And AUFS is the best choise in this case. Depending system settings, of course.
- - "We should set L1 and L2 high enough so that directories at the second level don't have a huge number of files"
- - example with 50Gb cache: cache_dir aufs /squid_cache/ 51200 32 512
- + assume the average size of a cached object to be 16 KB --> 51200x1024รท(32x512x16) = 200 cached objects in each of the directories at the second level which is quite good.
- Cache object size limits:
- - "we can set the maximum limit to something around 100 MB, which will make sure that the popular software, audio/video content, and so on, are also cached, which may lead to significant bandwidth savings"
- - "minimum_object_size 0 KB"
- - "maximum_object_size 96 MB"
- Cache Swap:
- - The default is 90 and 95 %, which are good if the size of cache directory is low (like 10 GB). If we have a large amount of space for caching (such as a few hundreds GBs), we can push the limits a bit higher and closer
- - "cache_swap_low 96"
- - "cache_swap_high 97"
- - "cache_replacement_policy heap LFUDA" choose algorithm to delete object cache
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement