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

Re: Deltas?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-03-10 14:52:32 CET

"Stefan Boberg" <sboberg2@team17.com> writes:

> SVN no longer generates massive amounts of log data, which was the
> main problem in my previous tests. However, it doesn't appear as though
> deltas are currently used? Whenever I commit even minute changes (like a
> single modified line for example), it appears as though the database
> grows by the size of the entire modified file on every commit!

SVN does the same thing RCS does: the latest version of a file is
stored as fulltext, and all previous versions are stored as deltas.

But to understand what's happening, you need to understand how
Berkeley DB works. When you commit a one-line change to a file,
here's what happens:

   * the one-line change moves over the network
   * the change is applied to the latest version of the file.
   * the new version of the file is written as fulltext
   * the previous version of the file is converted from fulltext to a
     delta against the new fulltext.

Now, all of this writing is happening in the *.db files in the
repository. If you look at their sizes, they should barely grow at
all -- just by the size of the one-line delta.

But because Berkeley is transacted, all writes are journaled in the
*.log files. This allows Berkeley to replay transactions and recover
itself to particular checkpoints. So what you're seeing is that the
logfile grows by the size of the newly-written fulltext.

Log-file management is the real issue here. Once a log-file grows to
10 megs, a new log file is created, and the Berkeley tools usually
will tell you that the old 10 meg file can be thrown away. (Another
thread has discussed the possibility of having the svn-repository
automatically delete old logfiles.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 10 14:50:33 2002

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