Optimize SVNAdmin Verify in SVN
Asked Answered
B

2

6

I have a large repository into a SVN Server in the enterprise i work. I need to verify the integrity of this repository everyday to check for some instability or rupture of the SGBD.

I'm using the prompt command line "svnadmin path_to_my_repository" to verify the integrity of my repository.

The problem is: how my repository is so large (about 23GB with 28.029 revisions), this operation takes a lot of time before finish.

The question is: How do i to optimize this operation to take less time than is taking actually? Or have some other way that can i use to verify the integrity of my repository with less time?

Some extra information:

  • The OS where the SVN Repository is installed is: Windows Server 2008
  • The SVN Server i'm using to store my repository is: VisualSVN Server Manager 2.5.7
  • The command "svnadmin path_to_my_repository" actually is taking about 18~24 hours.
Ballenger answered 21/3, 2013 at 13:48 Comment(0)
S
5

The "svnadmin verify" command takes a few different arguments. One of which is "--revision". So what you should do for each repository that you have, figure out a way to get the list of revisions modified in the last N days (maybe last 7 days if this runs daily), and only verify those.

List of files changed since a certain date using SVN

You should still do a full "svnadmin verify" for the entire repository regularly (weekly? monthly?). The frequency of the full check should be such that you can pull the broken revisions off of your backup set if you encounter issues.

Alternately, if you are using "svnadmin hotcopy" and pushing that hotcopy off to a 2nd set of spindles (or a second server), you could let the hotcopy be validated. Which would remove load off of the primary disks.

Surveillance answered 25/5, 2013 at 11:48 Comment(1)
Hey, that look fine! Maybe I can combine your suggestions with mine and optimize even more my task. Thanks.Ballenger
B
1

As a fastest solution i have found was code a script that parallelize the call of the svn command (svnadmin path_to_my_repository). Then for each thread i called the command "verify" for a different repository in my SVNServer. This isn't the solution that i'm looking for, but i reached some gain of performance with this. If someone knows the solution to optimize this task only using the svnadmin commands, please tell to us. Thanks.

Ballenger answered 22/3, 2013 at 16:57 Comment(1)
This should trigger a lot of HDD access on server and therefore in many case to slow down the global verify no ? At least, it should be useful to carefully limit the amount of parallel threads.Preteritive

© 2022 - 2024 — McMap. All rights reserved.