[squid-users] Cache dir

Francesco Chemolli gkinkie at gmail.com
Fri Jan 10 08:25:28 UTC 2025


On Fri, Jan 10, 2025 at 7:22 AM Jonathan Lee <jonathanlee571 at gmail.com>
wrote:

>
> After trying every setting inside of Squid I thought I should ask I have
> 4bg ram and 128GB M.2 SSD onboard disk I am using a NVMe secondary Intel
> Optane M.2 drive for my cache.


What OS are you using? How many CPU cores do you want to dedicate to Squid?
How much memory?


> What is a good recommendation for Hard Drive Cache System I use UFS but
> AUFS


UFS is the slowest option; AUFS or rock are considered the fastest


> inside of the Squid definitive guide says it is way faster like formula
> one versus UFS the options I have are UFS AUFS DISKD, I have 16 Level 1
> directories


What filesystem are you using? For modern filesystems (ext4, btrfs, apfs)
this parameter is much less meaningful than 10 years ago as they store
directories as trees instead of lists.


> my memory replacement policy is LRU for memory cache it seems to run
> better with that, my options for memory replacement policy are HEAP GDSF I
> assume any HEAP will require more memory, HEAP LFUDF, HEAP LRU and just LRU.


I think so but shouldn't be significantly more


> I also have a Cache Replacement policy with the same options I have it set
> to Heap LFUDA that is the default. Squid Memory cache Size I have set to
> default 64MB with max object size 256kb for the memory, for disk I have
> 256GB available I only have it set to 32000MB or 3.2GB for fear of
> overloading the RAM when it fills up.


4gb is plenty of memory; what other workloads do you want to run on that
machine?  You can also tune these parameters after checking behaviour in
practice, no need to fix them once and for all now


> for level 1 directories I can have 4,8,16,32,64,128,256 each layer one
> containers 256 sub directories so this could hog memory if you did
> 256*256=65,536 I imagine not ok with only 4GB I have onboard memory I
> can’t make it any bigger. I use this with SSL intercept it does cache and
> works well I just want to get rid of the lag on news websites.


number of directories has no impact on memory use. Just be aware that if
you change it, you need to wipe and rebuild your cache.


> rewrite process children I have it set max 25  with process children
> startup at 12 and idle at 8
> SSL certificate deamon children I have it set to start 10


Sure.

it runs well I have tried many different things as you know from all the
> emails, I am sorry it is the most fascinating software to me. Code that
> runs as fast as the internet. Is there any thing I can do to make it go
> faster? Some website have a lag fox news yahoo only do on the SSL intercept
> devices the splice devices never have any issues, its lighting fast for
> them. I thought I should finally ask after 4-5 years of doing changes. I
> have got it to work as fast as I can on my own, time to ask the community.
>

I think it boils down mainly to how much memory you're willing to dedicate
to squid. More memory more performance. Apart from that, they main advice
is to chang from UFS to just about anything else

-- 
    Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20250110/bffa55ea/attachment.htm>


More information about the squid-users mailing list