At what point does the push model degrade?

Matt Mackall mpm at selenic.com
Fri Nov 16 18:47:54 UTC 2007


On Fri, Nov 16, 2007 at 11:45:22AM -0500, Ezra.Smith at bentley.com wrote:
> Hello all,
> 
> We're looking to change over to Mercurial because we like a lot of the
> benefits. But we're suffering from a "last mile" problem. Most of the
> plan is obvious to us, but we're not entirely sure how to maintain our
> central repository (note: we definitely do need one). Although we have a
> lot of developers, the most working on any given repository isn't that
> large, maybe 50-100. Will a push model scale to that size? Does anyone
> have experience with pushing to a central repository with a lot of
> developers? And at what point do you think that a centralized push
> system will break down?

When you have two or more users pushing at similar rates, each can
expect to have to do a pull and merge before every push.

The locking breakdown point is dependent on two numbers:

l = arrival rate
T = service time

According to queueing theory, the average number of people waiting to
push is simply:

 N = lT

If N gets > 1, you basically fall off a cliff as every single person
has to push/pull/merge/push and can expect to be stuck in that cycle
indefinitely.

The number you really care about, the average number of push loops
(let's call that P), is a bit trickier to derive and depends on the
arrival distribution. But P is obviously asymptotic because it goes
from zero to infinity as N goes from zero to one. You'll feel pain
well before that, probably starting around when N = .5.

The above is not specific to Mercurial, of course, but Mercurial
changes a couple things relative to, say, CVS. Typically the arrival
rate is higher because people will spend less time waiting for other
facets of the SCM and sync their work more often. And secondly, the
service time tends to be shorter for equivalent networks (push and
pull are fast).

Further, as P gets higher, l tends to naturally drop. With CVS, people
just tend to put off their checkins for long periods of time. With
Mercurial, people instead continue to commit, but push larger and
larger batchs. In both cases, l gets smaller and T rises a bit,
causing N and P to shrink somewhat. But this effect is fairly small,
so once you hit this point, the brick wall is not too far off.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list