[Csync2] generating pre-shared keys very slow

Christian Wiese morfoh at opensde.org
Wed Dec 17 15:37:52 CET 2008


Hi Art,

thanks for the reply! I can confirm that /dev/random is the problem, see
my other mail where I tested to use /dev/urandom instead of /dev/random.
It might be reasonable to check if /dev/urandom is available only
using /dev/random as fallback. Do you see any problem there?

Cheers,
Chris

Am Wed, 17 Dec 2008 15:14:50 +0100
schrieb Art -kwaak- van Breemen <ard+csync2 at telegraafnet.nl>:

> On Wed, Dec 17, 2008 at 02:49:53PM +0100, Christian Wiese wrote:
> > I am really wondering why 'csync2 -k keyfile' is dog slow on every
> > system I tested it. I doubt that it is supposed to be normal
> > operations, that generating a key takes > 30min. 
> It does:
> open("testfile", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 3
> open("/dev/random", O_RDONLY|O_LARGEFILE) = 4
> read(4, "<", 1)                         = 1
> write(3, "8", 1)                        = 1
> ...
> close(4)                                = 0
> close(3)                                = 0
> 
> That reading from /dev/random is your problem. You probably have
> a system without entropy, or a lot of entropy consumers.
> What does:
> ard at c32791:~$ cat /proc/sys/kernel/random/entropy_avail
> 3609
> say on your system?
> 
# cat /proc/sys/kernel/random/entropy_avail 
185



More information about the Csync2 mailing list