[master] ddac7e41b Add a watchdog to worker pools.

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Oct 4 06:35:33 UTC 2018


--------
In message <9d359f86-d238-b243-a481-8720e3e0fe8d at uplex.de>, Nils Goroll writes:

>We could reserve a number of threads for [...]

Adding magic reserve-regiments of threads does not solve the problem:

If you schedule a request from the pool-queue, the only situation
where you can be 100% sure it is not going to sleep the thread for
a long time, is if the clients TCP connection is already dead.

In theory we could add magic code to purge the pool queue of requests
where the client TCP connection is dead, but that is not going to free
up any threads, it just makes the queue shorter.

The only way to truly solve this, is to have (very complex) code
to deduce a similarity between the requests which have tied up
threads and then a) blacklist any future such requests and b) hunt
the ones already in progress down and close their client TCP
connection.

That is not happening, unless very heavy real-world evidence emerges
that it would solve a big operational problem for a lot of users.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the varnish-commit mailing list