>> On Wed, May 26, 2010 at 05:53:17PM +0200, Paul Ebermann wrote:
>>
>> The problem now is that I have a quota limitation of 30000
>> files here (additionally to a size limit), and my svn repository
>> fills now about 1/6 of this, steadily growing, forcing me to
>> delete other files ...
>> 
>> Is there any way to reduce the file number of the repository
>> without throwing away information? As in, throw the changes in
>> revisions 0..999 together in one file (and this way even safe
>> some space for better compression)? (I don't care for worse
>> performance, as those old revisions are used only very seldom.)
> 
> -----Original Message-----
> From: Stefan Sperling [mailto:s...@elego.de] 
> Sent: 26 May 2010 17:11
>
> Yes, there is a way.
> 
> If your university does not yet have svn 1.6 installed, you'll need to
> install it somehow. Then upgrade your repository to 1.6 format using
> svnadmin upgrade, and use the svnadmin pack subcommand:
> 
>  $ svnadmin help pack
>  
>  pack: usage: svnadmin pack REPOS_PATH
>  
>  Possibly compact the repository into a more efficient storage model.
>  This may not apply to all repositories, in which case, exit.
> 
> This command is new in 1.6. It only works with FSFS repositories.
> It will make the repository use less inodes by collapsing every
> 1000 revisions into a single file.
> 
> If you want svn to collapse revisions more often, you'll need to
> re-compile Subversion after tweaking the 
> SVN_FS_FS_DEFAULT_MAX_FILES_PER_DIR
> constant in subversion/libsvn_fs_fs/fs_fs.c
> 
> Stefan
> 
This is why I love this list, something comes out of the blue you didn't
know you need but turns out to be useful!

For anyone interested, I just tried this on a repo I had handy: 1.5Gb on
disk with 1189 revs and got these results:

           |  Before pack  |  After pack   |
-----------|---------------|---------------|
Files      |            12 |            12 |
Folders    |         2,406 |         1,408 |
File Size  | 1,597,121,193 | 1,597,132,101 |
Disk Size  | 1,604,366,336 | 1,602,351,104 |
============================================

This is on a windoze XP system using NTFS.  Packing took ~four minutes:

D:\svn\test>date /t && time /t && svnadmin pack test.svn && time /t
27/05/2010
08:02
Packing shard 0...done.
08:07

D:\svn\test>svnadmin --version
svnadmin, version 1.6.11 (r934486)
   compiled Apr 18 2010, 23:12:22

Finally, as noted elsewhere, this is using v1.6 pack which does not pack
revprops (hence only 1/2 files packed) but 1.7 should pack those as
well...

Cheers,

~ mark c

Reply via email to