Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1235004

Re: [PATCH 1/3] Make /dev/urandom scalable

From Austin S Hemmelgarn <ahferroin7@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] Make /dev/urandom scalable
Date 2015-09-29 14:10 +0200
Message-ID <qe1Tj-620-1@gated-at.bofh.it> (permalink)
References (6 earlier) <qckdJ-3Kz-33@gated-at.bofh.it> <qcl9M-55S-7@gated-at.bofh.it> <qczFM-h5-7@gated-at.bofh.it> <qcGxz-1U9-9@gated-at.bofh.it> <qcHMZ-3Ev-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 2015-09-25 16:24, Theodore Ts'o wrote:
> On Fri, Sep 25, 2015 at 03:07:54PM -0400, Austin S Hemmelgarn wrote:
>>
>> Interestingly, based on what dieharder is already saying about performance,
>> /dev/urandom is slower than AES_OFB (at least, on this particular system,
>> happy to provide hardware specs if someone wants).
>
> Yeah, not surprised by that.  We're currently using a crypto hash
> instead of AES, which means we're not doing any kind of hardware
> acceleration.
>
> Crazy applications that want to spend 100% of the CPU generating
> random numbers instead of you know, doing _useful_ work
> notwithstanding, /dev/urandom never had high performance as one of its
> design goals.  The assumption was that if you needed that kind of
> performance, you would use a user-space cryptographic random number
> generator.
While I do understand that, it's abysmal performance compared to any of 
the others I tested.  Part of the standard testing in dieharder is 
reporting how many random numbers it can source from the generator per 
second (it's some bit-width of integers, I just don't remember which). 
Here's the actual numbers I got:

         AES_OFB|  1.11e+07
   random-glibc2|  6.11e+07
         mt19937|  3.30e+07
    /dev/urandom|  6.53e+05

That much difference in speed is kind of interesting, and reinforces my 
statement that you should just use /dev/urandom for seeding other RNG's, 
just for a different reason than my original statement.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] Make /dev/urandom scalable Andi Kleen <andi@firstfloor.org> - 2015-09-23 01:20 +0200
  [PATCH 2/3] random: Make input to output pool balancing per cpu Andi Kleen <andi@firstfloor.org> - 2015-09-23 01:20 +0200
  Re: [PATCH 1/3] Make /dev/urandom scalable Andi Kleen <andi@firstfloor.org> - 2015-09-23 01:30 +0200
  Re: [PATCH 1/3] Make /dev/urandom scalable Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-09-23 12:40 +0200
    Re: [PATCH 1/3] Make /dev/urandom scalable Andi Kleen <andi@firstfloor.org> - 2015-09-24 00:00 +0200
  Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-23 21:50 +0200
    Re: [PATCH 1/3] Make /dev/urandom scalable Andi Kleen <andi@firstfloor.org> - 2015-09-24 01:30 +0200
      Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-24 13:40 +0200
        Re: [PATCH 1/3] Make /dev/urandom scalable Theodore Ts'o <tytso@mit.edu> - 2015-09-24 15:20 +0200
          Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-24 18:10 +0200
            Re: [PATCH 1/3] Make /dev/urandom scalable Jeff Epler <jepler@unpythonic.net> - 2015-09-24 19:00 +0200
              Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-24 21:20 +0200
                Re: [PATCH 1/3] Make /dev/urandom scalable Jeff Epler <jepler@unpythonic.net> - 2015-09-24 22:10 +0200
                Re: [PATCH 1/3] Make /dev/urandom scalable Theodore Ts'o <tytso@mit.edu> - 2015-09-24 22:20 +0200
                Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-25 13:50 +0200
                Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-25 21:10 +0200
                Re: [PATCH 1/3] Make /dev/urandom scalable Theodore Ts'o <tytso@mit.edu> - 2015-09-25 22:30 +0200
                Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-29 14:10 +0200
                Re: [PATCH 1/3] Make /dev/urandom scalable Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-29 14:00 +0200
  Re: [PATCH 1/3] Make /dev/urandom scalable Theodore Ts'o <tytso@mit.edu> - 2015-09-23 23:20 +0200
    Re: [PATCH 1/3] Make /dev/urandom scalable Andi Kleen <ak@linux.intel.com> - 2015-09-23 23:30 +0200

csiph-web