pfsense:squid:optimizing_squid
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
pfsense:squid:optimizing_squid [2020/03/14 12:47] – created peter | pfsense:squid:optimizing_squid [2020/04/09 13:13] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PFSense - Squid - Optimizing Squid ====== | ||
- | For the most part, Squid is quite dynamic in handling varying loads but there are some key things to consider. | ||
- | |||
- | The most performance affecting attribute about Squid is the cache itself. | ||
- | |||
- | If the cache is located on a slow device then the performance of all content will be dependent on this limitation. | ||
- | |||
- | For this reason, it is advised that you run your cache on the fastest Read/Write medium that you can. | ||
- | |||
- | If your disk is performing other Read/Write operations it can slow the performance of surfing the net. | ||
- | |||
- | Another thing to consider is this; the cache is particularly useful when bandwidth is slow or expensive because it can prevent the repetitive download of data, but if your network speed exceeds the I/O performance of your cache media, it will slow the experience down. In cases where network speed exceeds cache-disk I/O, some people run Squid cacheless. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Cacheless ===== | ||
- | |||
- | This is useful if the performance of your cache disk is outstripped by the bandwidth of your ISP. | ||
- | |||
- | There may be slowness in your proxy server as a result of the cache not being able to write fast enough to disk. | ||
- | |||
- | |||
- | ==== Test your disk speed ==== | ||
- | |||
- | Ensure that you have sufficient space in the directory of your cache (/ | ||
- | |||
- | You will need just over 10GB of space to do this test (or you can change the test to do a smaller amount). | ||
- | |||
- | <code bash> | ||
- | df -h | ||
- | </ | ||
- | |||
- | It is best to perform this test when the usage is low. Perform the following write test: | ||
- | |||
- | <code bash> | ||
- | dd if=/ | ||
- | </ | ||
- | |||
- | You should get results similar to this: | ||
- | |||
- | <code bash> | ||
- | 10240000+0 records in | ||
- | 10240000+0 records out | ||
- | 10485760000 bytes (10 GB) copied, 84.292 s, 124 MB/s | ||
- | </ | ||
- | |||
- | The results will show the write speed of data to your directory. | ||
- | |||
- | If the speed of the internet at your location outstrips the ability to write data in the cache, you may need to set up a no-cache option. | ||
- | |||
- | As a typical rule of thumb, your cache to bandwidth ratio needs to perform at a factor of 16:1. | ||
- | |||
- | For example, if your disk speed is 100MB/s (800Mb/s) you can perform well with a 50Mb/s pipe. | ||
- | |||
- | If you have a 100Mb/s pipe, your disk performance must exceed 200MB/s. | ||
- | |||
- | In this example, the drive performs at 124 MB/s which means that it should be sufficient for a 62 Mb/s ISP download pipe. | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | </ | ||
- |
pfsense/squid/optimizing_squid.1584190046.txt.gz · Last modified: 2020/07/15 09:30 (external edit)