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

Re: svn ci performance hit with hotcopy as post-commit hook

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2006-11-01 23:56:17 CET

On 11/1/06, Mark Kempster <mark@kempster.org> wrote:
> Howdy -
>
> I'm attempting to implement a warm backup strategy with two machines
> and no shared storage using 'svn hotcopy' as a post-commit hook, something
> like so:
>
> commit happens
> svnadmin hotcopy /live/repos/ /backups/repos/
> commit returns
>
> time passes...
> cron wakes up and runs
> rsync --checksum /backups/repos/ backupmachine:/live/repos/
>
> When the svn server fails, we can mangle dns, start apache on
> backupmachine: and be up and running inside 10 minutes. That's the
> plan, anyway. Test runs bear this out to a greater or lesser degree,
> so I think the theory is sound for a first pass. (If this ends up proving
> workable, I may work towards real failover, but first thing's first.)
>
> My biggest problem is the post-commit hook calling svnadmin hotcopy.
> The repository (fsfs) only weighs in at 120MB, but it's taking between
> 20 and 30 seconds for the hotcopy to come back, with the client's
> checkin transaction dutifully waiting. I fear this pause will be too
> long for users.

You don't need your clients to wait 20-30 secs iff you detach the
hotcopy process from the one doing the commit by issuing in your
post-commit:

svnadmin hotcopy ... >/dev/null 2>/dev/null &

(ie, redirect both stdout and stderr)

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 1 23:56:55 2006

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