pass uses higher cpu than hit

kioto mitsubisi reader_1000 at hotmail.com
Thu May 21 18:30:04 CEST 2015


Hi
________________________________
> From: perbu at varnish-software.com 
> (the worst email quoting I've even seen :-) 

Sorry, I am trying to learn to post maillist and not very good at it :)

>  
>  
> The reason why Varnish uses more CPU when pass'ing requests is because  
> it is a lot more work. A cache hit is delivered directly from (virtual)  
> memory - in most cases physical memory. So, a cache hit is just a  
> writev() and that is it, more or less. 
>  
> With a pass you have to fetch it over the network and that involves  
> another TCP connection, talking to a remote server, parsing stuff,  
> storing it memory and then dumping it onto the connection. 
>  
> So this behavior is expected. 

I was confused  because when running tests without Varnish, Apache used a lot less CPU than Varnish but it seems that same things apply there, it is serving a static file which cached by Linux filesystem. I also thought my VCL which works only for hit objects would have more overhead, but I was wrong. Thanks for explanation.
 		 	   		  


More information about the varnish-misc mailing list