How to optimise a high-performance Squid proxy

Written by chad anderson
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to optimise a high-performance Squid proxy
Supercharge your Squid proxy server with a few tweaks. (Mike Kiev/iStock/Getty Images)

The Squid proxy server is one of the most popular Web proxy and cache servers around. When deployed correctly, Squid drastically reduces the load times and bandwidth usage for commonly accessed websites. On a small scale, Squid is easy to configure and control, but as the server's usage expands, you may need to implement a few optimisation techniques. With a few tweaks in the Squid server's configuration files, you can optimise your Squid server for high-performance.


  1. 1

    Open your "/etc/squid/squid.conf" file in a text editor, such as Notepad. You will need to be root to access the file.

  2. 2

    Change the "cache_mem" option from 8MB, the default, to 32MB. If your machine has memory available, raising this cache memory option can really improve performance. Some people will set this as high as 100MB or more.

  3. 3

    Add the "half_closed_clients" option and set it to "Off" in the configuration file. Also, change the "maximum_object_size" option to "1024KB" for minor improvements.

  4. 4

    Specify your DNS name servers using the "dns_nameserves" option. This is important since Squid gets held up with DNS lookups.

  5. 5

    Add both the "cache_swap_low" and "cache_swap_high" options that help determine when Squid will begin to prune the cache. This is important for keeping the cache within reasonable, quickly-accessible limits.

  6. 6

    Set the "memory_pools" option to "Off" so Squid will release any RAM the server isn't using back into the memory pool.

Tips and warnings

  • Using the best hardware, such as 7200 RPM hard drives, for your Squid caches is important. However, using a journal file system like ReiserFS for your cache partitions can increase performance by 20 per cent as well. Consider buying new hardware or changing your file system type if you've applied configuration tweaks and the results aren't quite what you were expecting.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.