Quantcast

From the category archives:

Caching

Varnish and squid, *again*

by allspaw on June 24, 2008

Just listened to Artur railing against squid and preaching the virtues of varnish. He quoted what most people quoted, which is how varnish performs serving out of *memory*.

It must be nice to have a working set that small. Until someone can show me numbers of disk-intensive (meaning, full caches, LRU eviction churning all the time) varnish numbers, then squid does us quite fine.

{ 7 comments }

Thanks to Mark, squid’s got a patch I’ve been wanting for a gazillion years: time-to-serve statistics that don’t include the client’s location

http://www.squid-cache.org/bugs/show_bug.cgi?id=2345

Normally, squid’s kept statistics that included the “time” to serve an object, whether it be a HIT, MISS, NEAR HIT, etc. The clock starts for this time when the first headers are received by the client that are validated as a legit squid request, but then doesn’t stop until the client has every last bit of the response.

What this means is that if you have servers in the US and your traffic pattern follows the NY/SF pattern (peaks from around 9am-4pm) and your overseas traffic (i.e. clients really far from your boxes) has a pattern the inverse of that, then you might see ‘time-to-serve’ in squid to be worse during your lowest traffic. Which is confusing, to say the least. :)

This patch changes the stopwatch to start at the same time (when squid’s received headers from the client) but stop when squid’s preparing the headers for the response. This measures ONLY the time that squid had the object in its hands, for a hit or a miss, which IMHO is a much better measure of how squid is actually performing with the hardware’s resources.

Yay! Thanks Mark.

{ 0 comments }

Tool update: WTF is inside filesystem cache ?

March 27, 2008

Awhile back, I said I’d love to have a tool that would allow me to peek inside filesystem cache and tell me what files (or pages of files) are inside. Well Peter Zaitsev points to the fincore tool, which comes pretty damn close: you give it a file, and it will tell you which pages [...]

Read the full article →

Slides from ‘Capacity Planning for LAMP’ talk at MySQL Conf 2007

April 27, 2007

This was a fun talk. I saw a lot of nods in the audience when I mentioned things pertaining to social applications (unpredictable usage, etc.). A lot of folks ask questions about how we use ganglia at Flickr.
A PDF of my slides are here. If anyone can tell me how to get Keynote2 slides [...]

Read the full article →

Caches and Eviction Policies

February 3, 2007

Caching systems are finite in size. So what happens when your cache is filled with objects ?
No more objects ? Game over ?
Hopefully, no. Most modern caches have some form of replacement or eviction policy. What means that based on some criteria, it’ll figure out what objects to throw out the window so it [...]

Read the full article →

Varnish and the state of web caching

December 16, 2006

So there’s lots of excitement around Varnish, which is a caching proxy that is built to be first and foremost a reverse-proxy, as opposed to squid, which does both forward and reverse. Acceleration (reverse-proxying) is obviously important to us at Flickr, as we use squid extensively.

Read the full article →

memory fragmentation in squid and some solutions….

December 12, 2006

Taking a look here, it seems like linking squid against TCmalloc could be pretty damn beneficial.
UPDATE: done, and tested.  not in production yet, we’ll see if I can get to it soon.

Read the full article →