[squid-dev] SMP scaling in no_daemon mode?

Andreas Weigel andreas.weigel at securepoint.de
Thu Jun 15 10:57:04 UTC 2017


Revised patch:

Fix option --foreground to implement expectable behavior and allow usage 
of SMP mode with service supervisors that do not work well with daemons.

Currently, --foreground behavior is counter-intuitive in that the launched
process, while staying in the foreground, forks another "master" process,
which will create additional children (Kids), depending on the number of
configured workers/diskers.

Furthermore, sending a SIGINT/SIGTERM signal to this foreground process
terminates it, but leaves all the children running.

The behavior got introduces with revno 14561.

 From discussion on squid-dev, the following behavior is implemented by 
this patch:

* -N: The initial process is a master and a worker process.
   No kids.
   No daemonimization.

* --foreground: The initial process is the master process.
   One or more worker kids (depending on workers=N).
   No daemonimization.

* neither: The initial process double-forks the master process.
   One or more worker kids (depending on workers=N).
   Daemonimization.

The Release Notes for v4 were updated to reflect the corrected behavior.

Kind Regards,
Andreas

-- 
Mit freundlichem Gruß / Best regards,

Andreas Weigel
UTM Backend Developer

Securepoint GmbH
Salzstrasse 1
D-21335 Lüneburg

https://www.securepoint.de

Tel.: +49(0)413124010
Fax: +49(0)4131240118

Geschäftsführer: Lutz Hausmann, Claudia Hausmann
Amtsgericht Lüneburg HRB 1776
USt.-ID-Nr.: DE 188 528 597

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_foreground.patch
Type: text/x-patch
Size: 7090 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20170615/27d97c20/attachment.bin>


More information about the squid-dev mailing list