Re: [squid-users] squid performance tunning

From: Chen Bangzhong <bangzhong_at_gmail.com>
Date: Thu, 18 Aug 2011 23:58:46 +0800

Amos, I want to find out what is filling my disk at 2-3MB/s. If there
is no cache related information in the response header, will squid
write the response to the disk?

In squid wiki, I found the following sentences:

Responses with Cache-Control: Private are NOT cachable.

Responses with Cache-Control: No-Cache are NOT cachable.

Responses with Cache-Control: No-Store are NOT cachable.

Responses for requests with an Authorization header are cachable ONLY
if the reponse includes Cache-Control: Public.
The following HTTP status codes are cachable:

    200 OK
    203 Non-Authoritative Information
    300 Multiple Choices
    301 Moved Permanently
    410 Gone

My question is: If there is no Cache-control related information, such
as the following header

Server nginx/0.8.54
Date Thu, 18 Aug 2011 15:56:29 GMT
Content-Type application/json; charset=UTF-8
Content-Length 1218
X-Cache MISS from zw12squid.my.com
X-Cache-Lookup MISS from zw12squid.my.com:80
Via 1.0 zw12squid.my.com (squid/3.1.12)
Connection keep-alive

will squid save it to disk?

Can you give me a detailed description about when will squid save the
object to disk?

thanks a lot for your kind help.

2011/8/18 Amos Jeffries <squid3_at_treenet.co.nz>:
> On 19/08/11 02:10, Chen Bangzhong wrote:
>>
>> thanks.
>>
>> Before I try the gateway squid solution, I want to change one of my
>> squid to use memory cache only. I have 16GB RAM. now cache_mem is set
>> to 5GB.
>>
>> I will try to increase it to 12GB and set cache_dir to null schma. I
>> do this because I am sure that my hot objects can be saved in RAM,
>> non-hot objects created by robots will stale  and the memory will be
>> reused.
>>
>> Is that all I need to set squid to be a memory cache?
>>
>
> You have squid-3.1, so only comment out the cache_dir lines and set
> cache_mem to something large. null dir schema no longer exists.
>
>  Remember that cache_mem still has an index to account for and the usual
> active traffic buffering stays present. Also that reconfigure will wipe the
> RAM cache to empty.
>
> Amos
> --
> Please be using
>  Current Stable Squid 2.7.STABLE9 or 3.1.14
>  Beta testers wanted for 3.2.0.10
>
Received on Thu Aug 18 2011 - 15:58:52 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 18 2011 - 12:00:04 MDT