Re: Poor RNG performance on Ryzen

2017-07-24 Thread Jan Glauber
On Sat, Jul 22, 2017 at 02:16:41PM -0400, Theodore Ts'o wrote: > On Fri, Jul 21, 2017 at 04:55:12PM +0200, Oliver Mangold wrote: > > On 21.07.2017 16:47, Theodore Ts'o wrote: > > > On Fri, Jul 21, 2017 at 01:39:13PM +0200, Oliver Mangold wrote: > > > > Better, but obviously there is still much room

Re: Poor RNG performance on Ryzen

2017-07-22 Thread Theodore Ts'o
On Fri, Jul 21, 2017 at 04:55:12PM +0200, Oliver Mangold wrote: > On 21.07.2017 16:47, Theodore Ts'o wrote: > > On Fri, Jul 21, 2017 at 01:39:13PM +0200, Oliver Mangold wrote: > > > Better, but obviously there is still much room for improvement by reducing > > > the number of calls to RDRAND. > > H

Re: Poor RNG performance on Ryzen

2017-07-21 Thread Gary R Hook
On 07/21/2017 09:47 AM, Theodore Ts'o wrote: On Fri, Jul 21, 2017 at 01:39:13PM +0200, Oliver Mangold wrote: Better, but obviously there is still much room for improvement by reducing the number of calls to RDRAND. Hmm, is there some way we can easily tell we are running on Ryzen? Or do we be

Re: Poor RNG performance on Ryzen

2017-07-21 Thread Oliver Mangold
On 21.07.2017 16:47, Theodore Ts'o wrote: On Fri, Jul 21, 2017 at 01:39:13PM +0200, Oliver Mangold wrote: Better, but obviously there is still much room for improvement by reducing the number of calls to RDRAND. Hmm, is there some way we can easily tell we are running on Ryzen? Or do we believ

Re: Poor RNG performance on Ryzen

2017-07-21 Thread Theodore Ts'o
On Fri, Jul 21, 2017 at 01:39:13PM +0200, Oliver Mangold wrote: > Better, but obviously there is still much room for improvement by reducing > the number of calls to RDRAND. Hmm, is there some way we can easily tell we are running on Ryzen? Or do we believe this is going to be true for all AMD de

Re: Poor RNG performance on Ryzen

2017-07-21 Thread Jeffrey Walton
On Fri, Jul 21, 2017 at 3:12 AM, Oliver Mangold wrote: > Hi, > > I was wondering why reading from /dev/urandom is much slower on Ryzen than > on Intel, and did some analysis. It turns out that the RDRAND instruction is > at fault, which takes much longer on AMD. > > if I read this correctly: > > -

Re: Poor RNG performance on Ryzen

2017-07-21 Thread Oliver Mangold
On 21.07.2017 11:26, Jan Glauber wrote: Nice catch. How much does the performance improve on Ryzen when you use arch_get_random_int()? Okay, now I have some results for you: On Ryzen 1800X (using arch_get_random_int()): --- # dd if=/dev/urandom of=/dev/null bs=1M status=progress 8751415296 b

Re: Poor RNG performance on Ryzen

2017-07-21 Thread Jan Glauber
On Fri, Jul 21, 2017 at 09:12:01AM +0200, Oliver Mangold wrote: > Hi, > > I was wondering why reading from /dev/urandom is much slower on > Ryzen than on Intel, and did some analysis. It turns out that the > RDRAND instruction is at fault, which takes much longer on AMD. > > if I read this correc