Tuning Subversion over HTTP

Use HTTP keep-alive

A simple svn cat https://... can generate something like 278 packets going over the wire. This may be due to a sub-optimal configuration of the Apache web server. If the network traffic contains a lot of SYN/SYN Ack packets then a simple tweak in the Apache config file can give a big gain in performance: The KeepAlive option tells Apache to allow a connection open after the requested page has been server. That way a client can request a new page without going through the TCP handshaking process. A sensible configuration might look like:

# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
KeepAlive On

# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
MaxKeepAliveRequests 100

# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 15

With this simple trick I could drop the number of packets from 278 to 100.

SVNPathAuthz

If path-based authorisation is not needed, then the "SVNPathAuthz off" config option helped to drop further packets.

More tuning tips

I would like to publish here more tuning tips; if some tips are missing, please mail them to <tehpeh-web@tty1.net>.