On 2005-02-12 21:31+0100, Ryan Schmidt wrote:
> On 11.02.2005, at 21:53, Igor Hjelmstrom Vinhas Ribeiro wrote:
>
> > Reading from /dev/random takes an undefined amount of time.
> >/dev/random is a source of "true random" numbers in Linux - the
> >timing of some events like keyboard manipulation is used for
> >producing these numbers and, if there is nobody doing stuff that is
> >used to feed this random number generator it simply blocks until it
> >happens.
> >
> > Try removing /dev/random (or moving it to something else) and
> >creating a link from /dev/urandom to /dev/random. /dev/urandom is a
> >pseudo random number generator that always returns a number
> >immediately.
> >
> > * Just as an experiment: try doing your stuff while someone
> >furiously plays with the keyboard on the machine in which the
> >process is stopping. You will see that the wait will be *very*
> >reduced.
>
> Hold up. I gotta ask about this. I didn't understand a word the OP
> said... what are we talking about? Are we saying that subversion uses
> /dev/random, and that this takes a long time unless someone is banging
> on the keyboard on the server?
On certain cases, i.e. when creating a new repository, SVN needs a
source of "randomness". It uses for this on Linux and on other systems
when present, /dev/random device, which is a "true random source",
which will block if it's empty.
If you don't have on your server enough events which generate
randomness, you have a couple of choices:
- Recompile APR with --with-devrandom=/dev/urandom
- If you have a resent enough kernel and a hardware with random
generator, Install rng-tools and compile to the kernel (2.6.x) following
feature: CONFIG_HW_RANDOM
After that rngd will feed your /dev/random from /dev/hw_random, so
there are more "randomness" there.
BR, Jani
--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Feb 12 21:56:32 2005