Review your favorite Linux distribution.
Go Back > Blogs > Pyplate
User Name


This blog is about the development of my various Linux based web sites, starting with, Banoffee Pi Server and Linux Web Servers.
Rate this Entry

Testing Varnish Cache on an Odroid U2

Posted 10-22-2013 at 01:05 AM by Pyplate

I've fixed the issue with my Odroid freezing. The kernel update fixed that.

I also got Varnish to work. Most of the documentation I found for Varnish refers to an earlier version, but it seems that the latest version has changed a lot, in particular there have been a lot of changes to the Varnish Configuration Language. Fortunately the Varnish compiler gives excellent error messages which tell you how to fix the problems it encounters.

I often make changes to pages after I publish them, so it's important for me to be able to update a page in cache. These two pages told me everything I needed to know on purging the cache:

I used Varnish top to analyse performance during tests with siege. At first, I didn't get a single cache hit.

Varnish doesn't cache pages with cookies, so I updated the vcl file to unset cookies on incoming requests. My server doesn't set cookies on the majority of pages on my site, so I don't really need to worry about outgoing cookies. There are cookies on my site, but they're set client-side in javascript, not by the server.

I also used the headers Apache module to generate cache control headers for static files so that Varnish knows what can be cached.

I tested with siege again, and got a lot of cache hits. I still need to do more testing to see if I'm getting a performance boost. Initial results suggest that there's a bottleneck somewhere. It's possible that the PC running siege isn't capable of generating enough requests to give an accurate impression of performance. It's also possible that the Odroid's 100Mb ethernet connection is maxed out.

In the mean time I've added the Odroid to my cluster. In the balancer manager I set the load factor on the Odroid to 8 so that it handles 8 times as many requests as the Raspberry Pi nodes.
Posted in Uncategorized
Views 812 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 07:17 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration