Discussion:
[squid-users] Squid.conf Includes
Cheadle, Edward
2018-08-10 15:51:09 UTC
Permalink
I am very new to squid and have been trying to research an issue with the squid.conf file. I see you can split the squid.conf file into different a number of different files using includes.

If I do split the rules up, does it increase the speed of processing the rules? I was told it does, but in looking at information on the squid site, in how rules are processed, I can’t find anything that would lead me to believe that splitting out the rules into separate files would speed anything up.

The reason this is an issue, is because on AWS we have a load balancer and we spin up an instance and if it takes too long it tends to stop the instance.

IMPORTANT NOTICE: This communication, including any attachment, contains information that may be confidential or privileged, and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message is strictly prohibited. Nothing in this email, including any attachment, is intended to be a legally binding signature.
Amos Jeffries
2018-08-10 16:04:04 UTC
Permalink
Post by Cheadle, Edward
I am very new to squid and have been trying to research an issue with
the squid.conf file.  I see you can split the squid.conf file into
different a number of different files using includes.
 
If I do split the rules up, does it increase the speed of processing the
rules?    I was told it does, but in looking at information on the squid
site, in how rules are processed, I can’t find anything that would lead
me to believe that splitting out the rules into separate files would
speed anything up.
It does not speed up config loading AFAIK. It just simplifies
administration of certain installation and policy designs.

Amos
Alex Rousskov
2018-08-10 16:08:00 UTC
Permalink
Post by Cheadle, Edward
If I do split the rules up, does it increase the speed of processing the
rules?
If by "processing" you mean applying configured rules to traffic at
runtime, then the answer is "no". At runtime, Squid uses compiled rules,
and compiled rule application/checking speed does not depend on where
the rule were loaded/compiled from.
Post by Cheadle, Edward
I was told it does, but in looking at information on the squid
site, in how rules are processed, I can’t find anything that would lead
me to believe that splitting out the rules into separate files would
speed anything up.
If the deployment environment loads/reads few large files slower than it
loads/reads many small files, then it is possible that using many small
configuration files will speed up Squid configuration.

Also, loading lots of ACL values/parameters from a file might be faster
than loading lots of ACL values/parameters embedded in squid.conf
(because it might be easier for Squid to find where each value
starts/ends in an external parameter file), but I have not tested that
theory, and, again, this theory only applies to Squid (re)configuration
delay, not runtime processing/performance.
Post by Cheadle, Edward
The reason this is an issue, is because on AWS we have a load balancer
and we spin up an instance and if it takes too long it tends to stop the
instance.
What is the approximate total size of your Squid configuration,
including all the external files that Squid has to load/parse while
configuring itself? What is the current startup delay with a
trivial/small rule set? What is the additional startup delay from
parsing all those rules?

Alex.

Loading...