CollabNet
Submerged - CollabNet's Subversion Blog
CollabNet Community

Categories

  • Administration (7)
  • Client Tools (13)
  • downloads (2)
  • General (36)
  • Non-Developers (2)
  • Subversion Client (32)
  • Subversion Events (4)
  • Subversion in the Enterprise (24)
  • Subversion Server (19)
  • Web/Tech (1)

Past 6 Months

  • July 2009 (2)
  • June 2009 (2)
  • May 2009 (5)
  • April 2009 (2)
  • March 2009 (4)
  • February 2009 (2)

Archives

All Archives...
RSS Syndicate this blog

How Subversion conserves disk space

I wanted to share something from our March openCollabNet Technical Newsletter. If you do not get our newsletter yet, sign up for openCollabNet. It only takes a minute.

To keep the size of the repository as small as possible, Subversion uses deltification, also called "deltified storage". Deltification is the encoding of a chunk of data as a collection of differences against some other data. If two files are very similar, deltification results in storage savings because only the changes are stored, not the entire file.

This works differently depending on what filesystem back-end you use. In BDB (Berkeley Database) fulltexts are found at the tips of each distinct line of a file's history. When a change occurs, the new version is stored as fulltext, then the previous version is rewritten as a delta against that new version. FSFS stores deltas in the opposite direction so that old versions never need to be rewritten.  When a file is changed, the new version is stored as a delta against an older version.

Most source code files change frequently and Subversion's performance would degrade if it had to use every individual delta to re-create a file that has changed many times. Subversion uses "skip-deltas" to improve performance. Skip-deltas are deltas that are calculated not against the immediate next or previous version, but against a version that's closer in the chain of deltas to a fulltext representation of the file. This way the version of a file can be re-created using less deltas than when a delta for each individual change would be needed.

For repositories created with Subversion 1.4 or later, space savings increase further because the delta chunks are stored using a compression algorithm.

Guido Haarmans

About the Author

Guido Haarmans is Director Developer Relations at CollabNet, he works on openCollabNet and CollabNet technology partner programs.
Permalink
Categories: Subversion Server

Technorati Tags: CollabNet, Open Source, OpenCollabNet, Programming, Revision control, SCM, Software Configuration Management, Software development, Subversion, Version control

TrackBack

TrackBack URL for this post: http://www.typepad.com/services/trackback/6a00d834515ac169e200d83528f49353ef

Comments

There are no comments yet.

Post a comment

If you have a TypeKey or TypePad account, please Sign In

You are currently signed in as (nobody). Sign Out

  • ©2008 CollabNet Corporation
    • Site Feedback
    • Terms of Use
    • Privacy Policy
    • Copyright & Trademark