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

Re: HTTP network traffic of simple SVN commands

From: Karen Tracey <kmtracey_at_gmail.com>
Date: Fri, 11 Jan 2008 18:47:17 -0500

At 06:10 AM 1/11/2008, Thomas Pircher wrote:
>Hi,
>
>[this is probably a FAQ, but I could not find it in the Subversion FAQ.]
>A simple 'svn cat file' produces an incredible network traffic. For
>example, a
>svn cat http://svn.collab.net/repos/svn/trunk/BUGS
>produces over 70 packets over the network. When I do it on our internal
>SVN server (HTTP with authentication) I get the beauty of 278 IP packets
>transferred over the wire.
>
>The SVN client and our internal server are both on version 1.4.4 and are
>running on Linux.
>
>Is this due to a misconfiguration on my side? Is it possible to optimize
>the traffic? I'm accessing our internal SVN server through a _very_ slow
>VPN, so reducing the amounts of packets would give me a huge benefit.

Based on a wild guess and some experiments I just tried, the 70 vs.
278 packets is probably a result of your internal SVN server being
configured with KeepAlive Off. For my own server (where I use
https://) I get 86 packets for a small file cat with KeepAlive On and
343 with KeepAlive Off. So configuring KeepAlive On in the Apache
config for your internal server could help. (svn.collab.net is
apparently configured with it On)

Still, 70+ packets for a tiny-file cat seems like a lot. I took my
own packet capture for the BUGS file with a tool that could parse the
payloads and it shows that the SVN client issues 18 PROPFINDs before
finally sending the GET for the file. Each of these is sent in two
pieces, first the headers and than the xml of the content; the
response comes in a single packet. So that is 3*18 = 54 packets,
plus 2 for the actual GET and its response, plus 6 for typical
minimum TCP connection setup and teardown: 62 packets. In my trace
there were an additional 14 packets of TCP overhead from bare ACKs
that did not get piggypbacked on data, for a total exchange of 76 packets.

What are all those PROPFINDs? Oddly, 11 of them seem to be
duplicates of ones requested earlier in the exchange. I know nothing
of SVN internals, so I have no idea why it does this. There may be a
good reason, or I may be missing some subtle difference in the
requests. It may also be a case of this just not being an optimized
path -- after all, most often you are expected to be operating on
your working copy, and not going to the server at all. Update and
commit are the paths I would hope would be optimized, more than cat.

But, in case anyone is interested or could explain the behavior, I'll
append my breakdown of the "svn cat
http://svn.collab.net/repos/svn/trunk/BUGS" traffic below. There
seems to be a (6 times repeated) pattern of 3 PROPFINDs in sequence
where the 1st is always the same and the 2nd and 3rd start to vary
after three go-rounds.

Cheers,
Karen
-----

TCP overhead startup (SYN, SYN+ACK, ACK) -- 3 packets

Q#1 (2 packets, sum 5):
     PROPFIND /repos/svn/trunk/BUGS
     props: version-controlled-configuration,
            resourcetype,
            baseline-relative-path,
            repository-uuid

TCP overhead 2 bare ACKs for Q#1 packets, sum 7

A#1 (sum 8):
     version-controlled-configuration: /repos/svn/!svn/vcc/default
     resourcetype:
     baseline-relative-path: trunk/BUGS
     repository-uuid: 65390229-12b7-0310-b90b-f21a5aa7ec8e

Q#2 (2 packets, sum 10):
     PROPFIND /repos/svn/!svn/vcc/default
     props: checked-in

A#2 (sum 11):
     checked-in: /repos/svn/!svn/bln/28868

Q#3 (2 packets, sum 13):
     PROPFIND /repos/svn/!svn/bln/28868
     props: baseline-collection,
            version-name

A#3 (sum 14):
     baseline-collection: /repos/svn/!svn/bc/28868
     version-name: 28868

TCP overhead bare ACK for A#3, sum 15

Q#4 (2 packets, sum 17): repeat Q#1

TCP overhead bare ACK for Q#4, sum 18

A#4 (sum 19): repeat A#1

Q#5 (2 packets, sum 21): repeat Q#2

A#5 (sum 22): repeat A#2

Q#6 (2 packets, sum 24): repeat Q#3

A#6 (sum 25): repeat A#3

TCP overhead bare ACK for A#6, sum 26

Q#7 (2 packets, sum 28): repeat Q#1/Q#4

TCP overhead bare ACK for Q#7, sum 29

A#7 (sum 30): repeat A#1/A#4

Q#8 (2 packets, sum 32): repeat Q#2/Q#5

A#8 (sum 33): repeat A#2/A#5

Q#9 (2 packets, sum 35): repeat Q#3/Q#6

A#9 (sum 36): repeat A#3/A#6

TCP overhead bare ACK for A#9, sum 37

Q#10 (2 packets, sum 39): repeat Q#1/Q#4/Q#7

TCP overhead bare ACK for Q#10, sum 40

A#10 (sum 41): repeat A#1/A#4/A#7

Q#11 (2 packets, sum 43):
     (similar to Q#2 except Label: 28868 included in headers & different props)
     PROPFIND /repos/svn/!svn/vcc/default
     props: baseline-collection,
            version-name

A#11 (sum 44):
     baseline-collection: /repos/svn/!svn/bc/28868
     version-name: 28868

Q#12 (2 packets, sum 46):
     PROPFIND /repos/svn/!svn/bc/28868/trunk/BUGS
     props: version-controlled-configuration,
            resourcetype,
            baseline-relative-path,
            repository-uuid

TCP overhead bare ACK for Q#12, sum 47

A#12 (sum 48):
     version-controlled-configuration: /repos/svn/!svn/vcc/default
     resourcetype:
     baseline-relative-path: trunk/BUGS
     repository-uuid: 65390229-12b7-0310-b90b-f21a5aa7ec8e

TCP overhead bare ACK for A#12, sum 49

Q#13 (2 packets, sum 51): repeat Q#1/Q#4/Q#7/Q#10

TCP overhead bare ACK for Q#13, sum 52

A#13 (sum 53): repeat A#1/A#4/A#7/A#10

Q#14 (2 packets, sum 55): repeat Q#11

A#14 (sum 56): repeat A#11

Q#15 (2 packets, sum 58):
     PROPFIND /repos/svn/!svn/bc/28868/trunk/BUGS
     props: allprop

A#15 (sum 59): lots of props

TCP overhead bare ACK for A#15, sum 60

Q#16 (2 packets, sum 62): repeat Q#1/Q#4/Q#7/Q#10/Q#13

TCP overhead bare ACK for Q#16, sum 63

A#16 (sum 64): repeat A#1/A#4/A#7/A#10/A#13

Q#17 (2 packets, sum 66): repeat Q#11/Q#14

A#17 (sum 67): repeat A#11/A#14

Q#18 (2 packets, sum 69):
     PROPFIND /repos/svn/!svn/bc/28868/trunk/BUGS
     props: md5-checksum

A#18 (sum 70):
     md5-checksum: b19e94b798412ebf58d233b0a5f96b6d

TCP overhead bare ACK for A#18, sum 71

Q#19 (sum 72):
     GET /repos/svn/!svn/bc/28868/trunk/BUGS

A#19 (sum 73): file contents

TCP overhead connection takedown (FIN, FIN+ACK, ACK) -- total 76 packets

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-12 00:49:23 CET

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

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