Back to Proxy management cache configuration page
As configuring cache settings for Squid is a complex topic, this page lists some real-world configuration examples for the web proxy in IPFire. Note that depending on the configuration squid, may use a large amount of memory.
A rule of thumb for memory allocation is: Cache size in memory + 20 MB per GB cache size on harddisk + number of filter processes * 4 MB .
Cache adjustment variations
Example # | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|
No. Clients | 3-5 | 10 | 3-5 | 2-5 | 70 | ? |
--- | --- | --- | --- | --- | --- | --- |
No. Filter procs (1.) | 7 | 30 | 7 | 42 | 50 | 10 |
--- | --- | --- | --- | --- | --- | --- |
CPU / RAM(GB) | ALIX 2D13 / 256Mb | Atom D330 / 2 | AMD Sempron 2100+ / 2 | Intel Core2 Duo 2.4GhZ / 4 | Intel Celeron G1610 / 8 | VM (4 cores on Xeon 5520) / 4 |
--- | --- | --- | --- | --- | --- | --- |
RAM used by Squid (MB) | 53 | 95 | 580 | 300 | 950 | ? |
--- | --- | --- | --- | --- | --- | --- |
Bandwidth (Mbps) | 6 | 50 | 50 | 5 | 10 | 50 |
--- | --- | --- | --- | --- | --- | --- |
No. File descriptors | 4096 | 256 | 4096 | 4096 | 1024 | 16384 |
--- | --- | --- | --- | --- | --- | --- |
Memory cache Size (MB) | 25 | 512 | 100 | 1024 | 2048 | 1965 |
--- | --- | --- | --- | --- | --- | --- |
Min. Object size (KB) | 1 | 0 | 0 | 0 | 0 | 0 |
--- | --- | --- | --- | --- | --- | --- |
Max Object size (KB) | 4096 | 4096 | 4096 | 153600 | 131072 | 51200 |
--- | --- | --- | --- | --- | --- | --- |
No. level 1 subdirs | 16 | 16 | 16 | 16 | 16 | 64 |
--- | --- | --- | --- | --- | --- | --- |
Memory replacement policy | heap LFUDA | heap GDSF | heap GDSF | heap GDSF | heap GDSF | LRU |
--- | --- | --- | --- | --- | --- | --- |
Cache replacement policy | heap LFUDA | heap LFUDA | heap LFUDA | heap LFUDA | heap LFUDA | LRU |
--- | --- | --- | --- | --- | --- | --- |
HDD cache size (GB) | 0 | 1 GB | 20 GB | 153600 | 8 GB | 60 GB ?! |
--- | --- | --- | --- | --- | --- | --- |
1. Depending on the squid addons enabled, such as SquidClamAV and the URL Filter, a high number of filter processes may be required on an otherwise small system.