tag:blogger.com,1999:blog-1016709139053396535.post5757289475693492941..comments2024-03-18T17:34:35.079+00:00Comments on A Smackerel of Opinion: Intel rdrand instruction revisitedColin Ian Kinghttp://www.blogger.com/profile/06458723239721015750noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1016709139053396535.post-45800501887276879592020-10-20T10:17:06.632+01:002020-10-20T10:17:06.632+01:00Can confirm.
I'm just working on improving di...Can confirm.<br /><br />I'm just working on improving dieharder. The problem of random WEAKs is due to https://github.com/rurban/dieharder/issues/6<br />the Multiple testing problem, which dieharder does by default not mitigate against. Therefore it is currently recommended to use -Y1 in all cases when WEAK results are returned. This will retry such WEAK results with a different seed for some time and checks if it will get better. A better idea would be to subtract the expected number of bad p-values, the alpha, or to check for outliers, as we do with smhasher.<br /><br />I also got crazily slow rdrand benchmarks on my AMD Ryzen 3, with 72 ints/second, not 36000 as expected on Intel. But I'm really torturing rdrand, without any buffer.<br /><br />I also got extremely bad test results with dieharder. Intel uses a good AES_CBC-MAC, wonder what AMD uses. https://software.intel.com/content/www/us/en/develop/articles/intel-digital-random-number-generator-drng-software-implementation-guide.html?wapkw=rdrand64_step<br /><br />Reini Urbanhttps://www.blogger.com/profile/05895715181237297006noreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-25411835296208733192014-04-09T10:22:04.172+01:002014-04-09T10:22:04.172+01:00I have a question regarding practical use of rdran...I have a question regarding practical use of rdrand: is it better to use rdrand instead of C rand() function? will I get better performance? I need this for simple, not critical apps likes games, animations.fenbfhttp://www.bfilipek.comnoreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-70176319826331703002014-04-05T10:01:52.658+01:002014-04-05T10:01:52.658+01:00This is described in note BV54 in http://www.intel...This is described in note BV54 in http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/3rd-gen-core-desktop-specification-update.pdfColin Ian Kinghttps://www.blogger.com/profile/06458723239721015750noreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-75735041020681384662014-04-05T04:29:29.266+01:002014-04-05T04:29:29.266+01:00There is a bug on some Ivy Bridge processors that ...There is a bug on some Ivy Bridge processors that cause rdrand to signal an illegal instruction exception. My new laptop has that problem and I am not happy. I would actually have a very particular use for that instruction.SeanVNhttps://www.blogger.com/profile/05967727000105480078noreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-56450322900237617882014-02-03T22:14:55.275+00:002014-02-03T22:14:55.275+00:00On IVB, 800MiBytes/s is the limit (100MHz x 64bits...On IVB, 800MiBytes/s is the limit (100MHz x 64bits), imposed by the bus local to the DRNG. From my perspective, the CPU core is way over there on the other side of the chip. I don't care how fast it is, it's not getting more that 800MiB/s :) Anonymoushttps://www.blogger.com/profile/05627631587370230775noreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-10701437974449970142014-01-06T23:41:51.544+00:002014-01-06T23:41:51.544+00:00Looks from the graph like, until the RNG bottlenec...Looks from the graph like, until the RNG bottleneck is hit at 99.6 MHz, it's taking 9 cycles per read. Chrishttps://www.blogger.com/profile/03639445454370696616noreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-86764250309933975092012-10-29T16:54:22.000+00:002012-10-29T16:54:22.000+00:00Good point, with this (gross) patch I manage to ge...Good point, with this (gross) patch I manage to get ~10MB/s on that X230, but doing the write every 64 bits is quite a bad idea :)<br /><br />http://paste.debian.net/204718/Corsachttp://www.corsac.netnoreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-59693074719084789702012-10-26T18:33:13.286+01:002012-10-26T18:33:13.286+01:00rdrand-test simply dumped the rdrand64() reads to ...rdrand-test simply dumped the rdrand64() reads to stdout, it's quite trivial.Colin Ian Kinghttps://www.blogger.com/profile/06458723239721015750noreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-54133842923880587282012-10-26T17:37:01.653+01:002012-10-26T17:37:01.653+01:00On my Core i7-3520M (on same X230) I top at ~42M r...On my Core i7-3520M (on same X230) I top at ~42M rdrand/s at 4 threads.<br /><br />It seems you didn't commit rdrand-test on the same repository, I'd be interested too.Corsacnoreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-17754774195153502372012-10-19T10:51:53.278+01:002012-10-19T10:51:53.278+01:00I'm sure with some careful optimization I can ...I'm sure with some careful optimization I can get some more performance out of the test rig I hacked up.Colin Ian Kinghttps://www.blogger.com/profile/06458723239721015750noreply@blogger.comtag:blogger.com,1999:blog-1016709139053396535.post-51801491499709212332012-10-19T05:00:24.333+01:002012-10-19T05:00:24.333+01:00You can rest assured that I ran the DRNG's out...You can rest assured that I ran the DRNG's output though dieharder a few times during its development. The thing with dieharder is that on perfectly random data, it will randomly throw up some 'weak's . Do it a second time and you will get a different set of weak results. If you take enough P values, some of them will land in the margins.<br />6.374GBits/s is 796.75MBytes/s which is closer to the theoretical maximum of 800MBytes/s than I achieved (I got about 780). So well done.<br />Anonymoushttps://www.blogger.com/profile/05627631587370230775noreply@blogger.com