From: "Michael Büsch" <m@bues.ch>
To: lkml <linux-kernel@vger.kernel.org>
Subject: Huge amount of randomness with cuse and "urandompar"
Date: Fri, 14 Oct 2011 22:38:07 +0200 [thread overview]
Message-ID: <20111014223807.46b27038@milhouse> (raw)
Hi there,
from time to time I need huge amounts of reasonably strong random
data. I want to use /dev/urandom for this, as it seems to have received
enough testing and has various good sources of entropy and good
support by tools such as rngd.
However, /dev/urandom does not seem to benefit at all from multicore systems.
Large parts of the urandom read-codepath in the kernel seem to be completely
lockless, though. So my basic idea was to throw a lot of reader threads at it
while preserving the convenient character device interface. Which lead
to this proof-of-concept CUSE project:
http://bues.ch/gitweb?p=urandompar.git;a=summary
git://git.bues.ch/urandompar.git
So from a first look it doesn't seem too bad, performance wise.
It seems that it currently scales well enough up to 4 CPUs.
Here's a simple chart of a trivial benchmark on a 6-core CPU:
http://bues.ch/misc/urandomparscale.pdf
I didn't profile it with oprofile, yet, but my guess is that it
runs more and more into entropy_store spinlock contention with >4 CPUs.
This has to be verified, though.
An open question still is: What are the implications on the data quality?
Does this massive parallelism affect the urandom algorithms in any way?
Can the bottleneck, that prevents it from scaling properly, be fixed?
Searching for testers, comments and answers. :)
--
Greetings, Michael.
reply other threads:[~2011-10-14 20:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111014223807.46b27038@milhouse \
--to=m@bues.ch \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox