On 2014-02-14 12:02, Alex Rousskov wrote:
On 02/13/2014 03:01 PM, Rajiv Desai wrote:
When using LargeRock, what doe the io pattern correspond to? 16KB
random reads if slot size is 16KB?
I am not 100% sure the reads are always 16KB. Squid may request less if
Squid knows that the object ends sooner than the slot. You can check
using strace or some such.
I am also curious why you seem to be ignoring disk writes. In general,
there are more disk writes than disk reads in a forward proxy
environment. And it is disk writes that create the most problems for
Squid.
Also, can I increase the slot size to a higher value at the expense
lower granularity?
You can increase the slot size up to 32KB. IIRC, you cannot increase it
higher without adjusting a hard-coded value in Squid, because the
shared
memory pages are hard-coded to be 32KB in size and worker/disker
communication is done using those pages.
Please make sure you actually need to increase it. It is possible that
with 80KB mean object size, 80% of your objects are smaller than 10KB
so
increasing slot size may hurt rather than help...
We do not yet automatically calculate the required metrics in Squid. But
if you have existing traffic you can scan the access.log and graph the
count of object sizes in each 512byte sized bracket (assume a few
uhundred more bytes for headers).
This will show you where the object size spikes are, you can then tune
the memory and disk caches to work together for even more performance
than tuning the disk cache alone.
For example, on a small reverse proxy serving up simple web content we
can see...
a spike in the 10-16 byte range (IMS traffic):
9- 16: 13 0%
17- 32: 2534 0%
33- 64: 595 0%
a small amount of steady traffic 64b-1KB (small pages and error
messages):
65- 128: 694 0%
129- 256: 1898 0%
257- 512: 1923 0%
513- 1024: 3237 0%
a spike in the 1KB-3KB object size range (main pages and scripts):
1025- 2048: 3443530 95%
2049- 4096: 119135 3%
a small amount of much larger objects (small image media mostly):
4097- 8192: 10672 0%
8193-16384: 22517 1%
16385-32768: 0 0%
However, the cache overview reports:
Mean Object Size: 33.95 KB
Because ~99% the above traffic is served out of memory cache. They often
expire long before needing to be pushed to disk cache. The disk only
really stores and serves up the >16KB objects.
Amos