<p>We have a rather large SVN repository. Doing SVN updates are taking longer and longer the more we add code. We added <code>svn:externals</code> to folders that were repeated in some projects like the <a href="http://en.wikipedia.org/wiki/CKEditor" rel="noreferrer">FCKeditor</a> on various websites. This helped, but not that much.</p>

<p>What is the best way to reduce update time and boost SVN speed?</p>

[{'answer_id': 65155, 'author': 'ceejayoz', 'author_id': 1902010, 'author_profile': 'https://Stackoverflow.com/users/1902010', 'pm_score': 2, 'selected': False, 'text': "<p>Sounds like you've got multiple projects in one repository. Splitting them up where appropriate will give you a big boost.</p>\n\n<p>Supposedly Git is much faster than Subversion due to the way it stores/processes changes, but I have no first-hand experience with it.</p>\n"}, {'answer_id': 65183, 'author': 'Yann Ramin', 'author_id': 9167, 'author_profile': 'https://Stackoverflow.com/users/9167', 'pm_score': 2, 'selected': False, 'text': '<p>There are some common performance tweaks. SVN is very I/O heavy, so faster hard disks are an option (on both ends). Add more memory to your server. Make sure your clients have a defragmented hard disk (for Windows). </p>\n\n<p>What access method you use also matters. Repositories stored on remote filesystems (using file:/// access) are going to be much slower than either svnserve or Apache with mod_svn. Consider using one of the latter if you have the repository on a simple file share.</p>\n'}, {'answer_id': 65186, 'author': 'WildJoe', 'author_id': 9052, 'author_profile': 'https://Stackoverflow.com/users/9052', 'pm_score': 2, 'selected': False, 'text': '<p>Make sure your connection to the server is a fast as can be (gigabit ethernet).\nMake sure the server has fast disks in an array.\nAnd, of course, only check out what you need.</p>\n'}, {'answer_id': 65248, 'author': 'Erik Forsberg', 'author_id': 8675, 'author_profile': 'https://Stackoverflow.com/users/8675', 'pm_score': 3, 'selected': False, 'text': '<p>Not really an answer, but it may be interesting to know that one of the reasons svn is so I/O-heavy is the fact that it stores one extra copy of each file in the .svn/text-base directory. This makes local diff operations fast, but eats lot\'s of harddisk space and I/O.</p>\n\n<p><a href="http://subversion.tigris.org/issues/show_bug.cgi?id=525" rel="noreferrer">http://subversion.tigris.org/issues/show_bug.cgi?id=525</a> has the details.</p>\n'}, {'answer_id': 65257, 'author': 'Alister Bulman', 'author_id': 6216, 'author_profile': 'https://Stackoverflow.com/users/6216', 'pm_score': 5, 'selected': True, 'text': '<p>If it\'s an older SVN repository (or even quite new, but wasn\'t setup optimally), it maybe using the older BDB style of repository database.  <a href="http://svn.apache.org/repos/asf/subversion/trunk/notes/fsfs" rel="noreferrer">http://svn.apache.org/repos/asf/subversion/trunk/notes/fsfs</a> has notes on the new one.  To change from one to another isn;t too hard - dump the entire history, re-initialise it with the new svn format of file system and re-import. It may also be useful at the same time to filter the repo-dump to remove entire checkins of useless information (I, for example, have removed 20MB+ tarball files that someone had checked in).</p>\n\n<p>As far as general speed goes - a quality (speedy) hard-drive and extra memory for OS-based caching would be hard to fault in terms of increasing the speed of how SVN will work.</p>\n\n<p>On the client side, if you have tortoisesvn setup through PuttyAgent for SSH access to an external repository machine, you can also enable SSH compression, which can also help.</p>\n\n<p><strong>Edit:</strong> SVN v1.5 also has the <a href="http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.fsfsreshard" rel="noreferrer">fsfs-reshard.py</a> tool which can help split a FSFS based svn repository into a number of directories - which can themselves be linked onto different drive spindles.  If you have thousands of revisions, that can also help - if for no other reason than finding one file among thousands takes time (and you tell tell if thats a problem by looking at the IOwait times)</p>\n'}, {'answer_id': 65325, 'author': 'noetic', 'author_id': 9198, 'author_profile': 'https://Stackoverflow.com/users/9198', 'pm_score': 0, 'selected': False, 'text': '<p>If you have many folders in the root of repository and your local copy reflects the repository, then try to slit monolithic local copy into many separated downloadable folders and update these folders separately too, It will be really faster than one big folder.</p>\n'}, {'answer_id': 65823, 'author': 'nickf', 'author_id': 9021, 'author_profile': 'https://Stackoverflow.com/users/9021', 'pm_score': 1, 'selected': False, 'text': '<p>I\'ve found in my own experience (ie: not through any <em>actual</em> tests) that, especially if the SVN repo server is remote, using externals seems to slow things down. If you\'ve got duplicated code (like your FCK editor) in multiple places, I would tend to stick to using externals since keeping those files synchronised and manageable is more important than update speeds - though, you could look at using symbolic links to bring in duplicated code instead. (If you\'re using Windows XP, you can use <a href="http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx" rel="nofollow noreferrer">junction points</a>).</p>\n'}, {'answer_id': 66813, 'author': 'Vladimir', 'author_id': 9641, 'author_profile': 'https://Stackoverflow.com/users/9641', 'pm_score': 1, 'selected': False, 'text': "<p>We've split our code base into several sibling modules and wrote the Ant scripts so that one developer can work on one module at a time without bothering too much about what's happening in the other modules.</p>\n\n<ul>\n<li>a top-level build script triggers all modules build scripts</li>\n<li>external libraries are <strong>not</strong> stored in Subversion but rather pulled from a network drive using Apache Ivy. (think of it like an in-house Maven repository).</li>\n<li>dependencies between modules are also managed using Ivy.</li>\n</ul>\n\n<p>Typically, developers will need to update their entire tree a couple times a week but it can easily be done before going to lunch/coffee break.</p>\n"}, {'answer_id': 67221, 'author': 'James A. N. Stauffer', 'author_id': 6770, 'author_profile': 'https://Stackoverflow.com/users/6770', 'pm_score': 2, 'selected': False, 'text': '<p>TotoiseSVN by default looks at file changes in the background and I have seen that slow down my machine.  I changed the config to exclude everything and then only include the directories where I have checkouts.  You can also turn off the background checks.  Both of these settings are in the Icon Overlays settings node.</p>\n'}, {'answer_id': 2188282, 'author': 'Lee Englestone', 'author_id': 156446, 'author_profile': 'https://Stackoverflow.com/users/156446', 'pm_score': 3, 'selected': False, 'text': '<p>Disable virus checking on folders that contain working copy code. This caused my updates to become twice as fast.</p>\n'}, {'answer_id': 14255997, 'author': 'anonymous', 'author_id': 1385006, 'author_profile': 'https://Stackoverflow.com/users/1385006', 'pm_score': 1, 'selected': False, 'text': '<p>Using read-access rights (i.e. restricting read access to certain persons/groups) will slow down the repository a lot. Especially when the authentication is done in some special way, e.g. against a windows domain.\nThe same holds true for write access rights, of course, but writing is less frequent then reading. And restricting write access can be more important than restricting read access</p>\n'}, {'answer_id': 42898682, 'author': 'Vasily Redkin', 'author_id': 1654778, 'author_profile': 'https://Stackoverflow.com/users/1654778', 'pm_score': 2, 'selected': False, 'text': '<p>Sometimes slow svn operation, especially with many externals, is DNS-related.\nIt looks like svn performs DNS lookup per every svn:external, even for relative ones.\nAdding your svn server hostname to /etc/hosts or fixing resolv.conf can be useful.</p>\n'}]
['https://Stackoverflow.com/questions/65135', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9140/']