Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i want to increase the log limit of the varnish cache server , as i see when i write the log to a file it only give me about 13k of requests , i want to increase it to something like 1 million for a high traffic site , so i can save the log every 10 mins .

i know varnish can run as Demon and write the logs on run time , but i don't need this

so is there anyway to increase the varnish log limit to a higher value ?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can set the size of Varnish shared memory log buffer with the -l shmlogsize parameter:

-l shmlogsize Specify size of shmlog file. Scaling suffixes like 'k', 'm' can be used up to (e)tabytes. Default is 80 Megabytes. Specifying less than 8 Megabytes is unwise.

You can read about Varnish startup parameters in the official varnishd documentation. Depending on your OS or Linux distribution you will either have to edit the /etc/init.d/varnish script or distribution specific config files (e.g. /etc/default/varnish on Debian).

Bear in mind that writing varnish logs to disk on a high traffic site will eventually produce a large amount of disk I/O, even if you write a huge log buffer every couple of minutes, this will produce load too. If you do not need full logging you can use a daemonized varnishlog process with a filter that selects only the requests you are interested in, thus reducing the need file I/O.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.