[RHEL5] Squid server is slower than expected. What parameters can be used to improve performance?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux Workstation release 5.7

Issue

  • The squid server works very slower than normal. Even after update all packages the service doesn't work as expected. What parameter can be used to improve squid performance?

Resolution

     There is a parameter related to cache_dir that needs to be changed from ufs to aufs. It can improve performance due it works asynchronously.
     Basicaly, the aufs parameter works the same that the ufs, but works asynchronously as definition bellow:

"The 'aufs' scheme has evolved out of the very first attempt to improve Squid's disk I/O response time. The "a" stands for asynchronous I/O. The only difference between the default ufs scheme and aufs is that I/Os  aren't executed by the main Squid process. The data layout and format is the same"

Source: Squid: the definitive guide - By Duane Wessels - First Edition/2004

The change consists in changing cache_dir line from:

cache_dir ufs /home/user/cachesqd 5000 16 256

       To:

cache_dir aufs /home/user/cachesqd 5000 16 256

     After change this parameter you need to restart the service and remake the cache using command bellow:

# service squid restart ; squid -k reconfigure ; squid -z

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments