> But the machine has 4Gb ram so why not using 500MB ? > is it better to let squid increase if it's needed?
Linux will aggressively use free RAM to cache files. If Linux does most of the caching, it benefits the entire system, not just Squid, and Linux will dynamically adjust the amount of memory used to cache files based on current system memory needs, whereas Squid will always try to completely fill the memory alloted to it by cache_mem. Additionally, I don't think Squid will have any way of knowing if the memory allocated to it for cache_mem is swap and not RAM (perhaps Henrik or Robert can comment on this). That said, it is good to guarantee a small amount of memory for caching very "hot" objects; that is what cache_mem is for, and that is why it defaults to 8 MB. Adam
