You're taking a simplistic view of what is happening during your benchmark.
When you say "less then one minute" you are clearly overworking your
cache. This isn't when cache_mem fills up...this is when the overload
becomes convincingly apparent. Yes, there is better performance when
the benchmark first starts because of a number of factors, but cache_mem
is only a mildly determining factor unless you're using something
extremely low (even 8MB is fine for moderate workloads).
Note that the polygraph working set size grows with time, starting very
small. Until the working set is large enough to start forcing Squid to
go to disk to serve requests, the performance will be better--this isn't
when cache_mem fills up--your OS will be caching disk accesses to RAM
anyway. The higher your request rate, the faster the working set size
grows, thus the sooner Squid gets overwhelmed.
However, one minute is not early enough for the WSS to even matter.
You're either seeing statistically insignificant data (i.e. because the
test is just ramping up, you're seeing the average of just a few
requests), or you're seeing the dying gasp of a cache being heavily
overworked (i.e., it can hold on for a few seconds, but during all of
that time it is struggling to keep up). This is the reason that
Polygraph tests last hours...
Anyway to answer your question, cache_mem uses whatever algorithm you
specify. It defaults to an LRU just like the cache_dirs, but you can
use the heap types as well (it doesn't make much difference). cache_mem
stores recently retrieved objects, and flushes them based on their
relative popularity. Every object that is retrieved from an origin
server goes into cache_mem...it will be flushed immediately under some
circumstances. (Hopefully, Henrik will correct me if I misunderstand
how it works.)
Mihalis Tsoukalos wrote:
> Thanks for answering.
>
> I am running web-polygraph benchmarks on the squid server.
> What I understand is that at the beginning, until the data fill up the
> cache_mem memory, there is a better performance. This lasts less than one
> minute.
>
> What I would like to know is what kind of data the cache_mem holds.
> What algorithm determines the data to be stored and the data that will leave
> the cache_mem area?
>
> cheers,
> Mihalis.
>
> ----- Original Message -----
> From: "Henrik Nordstrom" <hno@squid-cache.org>
> To: "Mihalis Tsoukalos" <ekefe@freemail.gr>
> Cc: <squid-users@squid-cache.org>
> Sent: Monday, February 24, 2003 1:00 PM
> Subject: Re: [squid-users] cache_mem
>
>
>
>>m�n 2003-02-24 klockan 09.02 skrev Mihalis Tsoukalos:
>>
>>>Hello to everyone.
>>>
>>>I am doing some benchmarking and I want to ask something:
>>>
>>>I am putting the following values in the cache_mem parameter of
>
> squid.conf:
>
>>>1. 8 MB
>>>2. 32 MB
>>>3. 64 MB
>>>4. 128 MB
>>>
>>>but I don't see any real difference in the benchmarking results.
>>
>>What kind of benchmarks are you running?
>>
>>Changing this only have significant impacts on very specific workloads..
>>
>>For most normal proxy setups a value around 8-16MB is fine.
>>
>>--
>>Henrik Nordstrom <hno@squid-cache.org>
>>MARA Systems AB, Sweden
>
>
-- Joe Cooper <joe@swelltech.com> Web caching appliances and support. http://www.swelltech.comReceived on Wed Feb 26 2003 - 09:20:30 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:13:43 MST