From owner-cvs-all Sun Oct 15 22:51:33 2000 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 821) id 586DA37B670; Sun, 15 Oct 2000 22:51:29 -0700 (PDT) Date: Sun, 15 Oct 2000 22:51:29 -0700 From: John DeBoskey To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Cc: Mark Murray , DougB@gorean.org Subject: Re: cvs commit: src/etc rc rc.shutdown src/etc/defaults rc.conf Message-ID: <20001015225129.A12949@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG There appears to be a raw vs. blocked data size issue with /dev/random. The following patch to /etc/rc provides a serious performance boost when booting up without a /entropy file: Index: rc =================================================================== RCS file: /home/ncvs/src/etc/rc,v retrieving revision 1.235 diff -u -r1.235 rc --- rc 2000/10/16 04:44:35 1.235 +++ rc 2000/10/16 05:33:11 @@ -201,10 +201,10 @@ # XXX temporary until we can get the entropy # harvesting rate up # Entropy below is not great, but better than nothing. - (ps -gauxwww; iostat; vmstat; sysctl -a; dmesg) > /dev/random 2> /dev/random + (ps -gauxwww; iostat; vmstat; sysctl -a; dmesg) | /bin/dd of=/dev/random bs=4k ( for i in /etc /var/run ; do cd $i ; ls -al ; cat * - done ) > /dev/random 2> /dev/random + done ) | /bin/dd of=/dev/random bs=4k fi fi ;; It is worth noting that the first subshell generates about 21k worth of data sent to /dev/random. The for loop generates about 576k of data. On a 200Mhz Pentium Pro system the above diff runs the seeding process in 63 seconds. Increasing the blocksize has no more effect while decreasing it increases runtime. bs=1k == 130 seconds... Question: do we need 1/2 meg of seed data? Most of it is static... Comments welcome! -John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message