[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Enable downstream caching of versioned GET responses

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: Thu, 14 Jun 2012 16:09:50 +0200

On Thu, Jun 14, 2012 at 2:06 PM, Justin Erenkrantz
<justin_at_erenkrantz.com> wrote:
> I checked the wireshark traffic on a checkout and it looks like all
> the right headers are set - with this patch, we now have
> Cache-Control, ETag, and Last-Modified all set.  When mod_deflate is
> run, it'll set the appropriate vary headers so that should all just
> work too.  -- justin

I enabled the httpd caching locally (mod_disk_cache) on my laptop and
ran some quick tests.

Below are 'time' output for a checkout of SVN trunk and the server CPU
usage as reported by mod_status.

To be clear, this leveraging of the caching isn't specific to httpd -
you could also stick varnish or even Fastly or some other CDN in front
of it if you really wanted to spread the load. But, given that
mod_dav_svn is an httpd module, this allows the origins to have their
I/O reduced. -- justin

No mod_cache:
Client timing: svn co svn-age-1 1.77s user 2.97s system 16% cpu 28.070 total
Server CPU usage: CPU Usage: u2.98 s.59 cu0 cs0 - 6.87% CPU load
(2.98s of user time plus .59 seconds of system time.)

Cold mod_cache:
Client timing: svn co svn-age-1 1.88s user 3.27s system 14% cpu 36.004 total
CPU Usage: u3.39 s2.58 cu0 cs0 - 3.34% CPU load
(The sys% increase is due to writing out the cache files to disk.)

Warm mod_cache:
Client timing: svn co svn-age-1 1.66s user 2.70s system 24% cpu 17.454 total
Server CPU Usage: u1.24 s.72 cu0 cs0 - 4.26% CPU load
(Note the decreased user time.)

httpd config notes:

# Enable mod_deflate - add within appropriate <Location> block
  SetOutputFilter DEFLATE
# Enable mod_disk_cache
CacheEnable disk /svn-test-work/repositories
CacheRoot /tmp/cacheroot
# Turn on CPU tracking within mod_status
ExtendedStatus on
<Location /server-status>
SetHandler server-status
</Location>
Received on 2012-06-14 16:10:28 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.