You need to keep track of some threads metrics to watch your Varnish Cache. Is it running out of OS resources or is it functioning well.
varnishstat -1 | grep "threads\|thread_queue_len\|sess_queued"
MAIN.threads 100 . Total number of threads
MAIN.threads_limited 1 0.00 Threads hit max
MAIN.threads_created 3715 0.00 Threads created
MAIN.threads_destroyed 3615 0.00 Threads destroyed
MAIN.threads_failed 0 0.00 Thread creation failed
MAIN.thread_queue_len 0 . Length of session queue
MAIN.sess_queued 2505 0.00 Sessions queued for thread
If thread_queue_len
isn't 0 it means that Varnish is out of resources and have started to queue requests. This will decrease performance of those requests. You need to investigate why.
Watch also out for threads_failed
. If this increases it means your server is out of resources somehow. Increasing numbers in threads_limited
means you might need to increase your servers thread_pool_max
.