mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Hardware (https://www.mersenneforum.org/forumdisplay.php?f=9)
-   -   Help to choose components for a Ryzen rig (https://www.mersenneforum.org/showthread.php?t=23227)

robert44444uk 2018-04-05 08:12

Help to choose components for a Ryzen rig
 
2 Attachment(s)
I'm trying to go for a decent rig to run a multi-threaded prime gap routine written in perl and I think I can afford a Ryzen 1800 series. Then it comes down to ensuring that all the other components will sing along sweetly and that I am not paying for stuff I don't need:

The current UK spec I am inching towards is:

[QUOTE]Processor: AMD Ryzen 7 1800X Eight Core CPU (3.6GHz-4.0GHz/20MB CACHE/AM4)
Motherboard: ASUS® PRIME X370-PRO (DDR4, 6Gb/s, CrossFireX/SLI)
Memory: 32GB Corsair VENGEANCE DDR4 3000MHz (2 x 16GB)
Graphics Card: 1GB NVIDIA GEFORCE 710 - DVI, HDMI, VGA
Hard Disk: 250GB Samsung 860 2.5" EVO SSD, SATA 6Gb/s
Power Supply: CORSAIR 350W VS SERIES™ VS-350
Processor Cooling: Corsair H80i V2 Hydro Series High Performance CPU Cooler
Thermal Paste STANDARD THERMAL PASTE FOR SUFFICIENT COOLING[/QUOTE]

The program I am planning to run is attached in two benchmark test forms for anyone with a Ryzen set up, who also has perl, who doesn't mind running the benchmarks.

I would be very grateful for any advice you hardware experts might have on this.

M344587487 2018-04-05 09:40

I have a 1700 and perl 5.22 (but don't use perl as you're about to see). Running "perl smallgaptest.pl" fails as it can't find Timer/Runtime.pm (missing the Timer::Runtime module). I install cpanm and try "sudo cpanm Timer::Runtime", which fails compilation maybe due to missing Time::Elapse. Trying to install Time::Elapse in the same way fails. I don't know enough about Perl to debug the problem or decipher google. Unless you have a magic fix, I tried :P

The motherboard is nice, maybe overkill for what you need. A good B350 board should be plenty, it's just the RAM compatibility you need to pay attention to. ASRock is meant to be solid. MSI and Gigabyte supposedly have lower quality VRMs especially in the cheaper boards. I would recommend a 1700 as it's much cheaper (£230), comes with a decent heatsink and can be overclocked to the same as the other two if really necessary. Ryzen+ comes out this month so you need to consider 2700 and 2700X too, benchmarks indicate a 10% performance boost and better RAM support, but as the new line they'll probably be expensive on launch.

robert44444uk 2018-04-05 10:09

[QUOTE=M344587487;484357]I have a 1700 and perl 5.22 (but don't use perl as you're about to see). Running "perl smallgaptest.pl" fails as it can't find Timer/Runtime.pm (missing the Timer::Runtime module). I install cpanm and try "sudo cpanm Timer::Runtime", which fails compilation maybe due to missing Time::Elapse. Trying to install Time::Elapse in the same way fails. I don't know enough about Perl to debug the problem or decipher google. Unless you have a magic fix, I tried :P
[/QUOTE]

Ahh, that's a shame. You could take out the

[CODE]use Timer::Runtime;[/CODE]

and instead add the following code at the start, after the "use" section

[CODE]
my $start_run = time();
[/CODE]

and at the end of the code:

[CODE]my $end_run = time();
my $run_time = $end_run - $start_run;
print "Job took $run_time seconds\n";
[/CODE]

The variable to play with in the benchmarking is [CODE]my $nthreads
[/CODE]
Good luck with this fix, and hopefully you can get some results for the benchmark.

[QUOTE]
The motherboard is nice, maybe overkill for what you need. A good B350 board should be plenty, it's just the RAM compatibility you need to pay attention to. ASRock is meant to be solid. MSI and Gigabyte supposedly have lower quality VRMs especially in the cheaper boards. I would recommend a 1700 as it's much cheaper (£230), comes with a decent heatsink and can be overclocked to the same as the other two if really necessary. Ryzen+ comes out this month so you need to consider 2700 and 2700X too, benchmarks indicate a 10% performance boost and better RAM support, but as the new line they'll probably be expensive on launch.[/QUOTE]

This is very helpful - thank you! Cost is a real issue, so saving money is really good!

Thomas11 2018-04-05 10:35

Assuming that you are running this in a Linux environment, you could simply take out the line:
[CODE]use Timer::Runtime;[/CODE]
(as suggested by Robert) and use the Linux "time" utility to get the timings, e.g.:

[CODE]
time perl smallgaptest.pl
[/CODE]

Thomas11 2018-04-05 10:40

[QUOTE=M344587487;484357]I have a 1700 and perl 5.22 (but don't use perl as you're about to see). Running "perl smallgaptest.pl" fails as it can't find Timer/Runtime.pm (missing the Timer::Runtime module). I install cpanm and try "sudo cpanm Timer::Runtime", which fails compilation maybe due to missing Time::Elapse. Trying to install Time::Elapse in the same way fails. I don't know enough about Perl to debug the problem or decipher google. Unless you have a magic fix, I tried :P
[/QUOTE]

Regarding the installation issues with the Perl modules, you could try the following:

[CODE]
sudo cpan
force install Time::Elapse
force install Timer::Runtime
[/CODE]

M344587487 2018-04-05 12:21

[QUOTE=Thomas11;484363]Regarding the installation issues with the Perl modules, you could try the following:

[CODE]
sudo cpan
force install Time::Elapse
force install Timer::Runtime
[/CODE][/QUOTE]
Thanks I figured it out, perl is installed by default on Ubuntu but either I hadn't configured it properly or it was outdated. Did an upgrade then forced the modules in with cpanm --force.

For the benchmarks I had to create an empty merits.txt, is that some sort of configuration file I'm missing? Here's the results, but note the CPU may not have been fully utilised for some of the testing:
[code]smallgaptest.pl Started: Thu Apr 5 12:37:17 2018
# 39 i * 167#/21534 (1..10000000) mingap 1346
18.791741 2890 PRP67 = 138067*167#/21534-1594
17.389811 2706 PRP68 = 849917*167#/21534-1382
18.318888 2854 PRP68 = 1024807*167#/21534-1516
18.570360 2896 PRP68 = 1192981*167#/21534-1438
17.069326 2670 PRP68 = 1915451*167#/21534-1374
18.040892 2824 PRP68 = 2143205*167#/21534-1338
18.617178 2918 PRP69 = 2627371*167#/21534-1296
17.913754 2808 PRP69 = 2664685*167#/21534-1306
18.160088 2848 PRP69 = 2876147*167#/21534-1446
18.200766 2856 PRP69 = 3143995*167#/21534-1438
21.276427 3340 PRP69 = 3354361*167#/21534-1642
18.265413 2868 PRP69 = 3480211*167#/21534-1522
16.605635 2610 PRP69 = 4073809*167#/21534-1324
18.639102 2930 PRP69 = 4159661*167#/21534-1556
19.536212 3072 PRP69 = 4373099*167#/21534-1706
17.621521 2772 PRP69 = 4649063*167#/21534-1338
18.039961 2840 PRP69 = 5245129*167#/21534-1338
18.271699 2880 PRP69 = 6358703*167#/21534-1286
18.168063 2866 PRP69 = 7230857*167#/21534-1374
16.999550 2682 PRP69 = 7373587*167#/21534-1396
17.260136 2724 PRP69 = 7762661*167#/21534-1286
17.717003 2796 PRP69 = 7717717*167#/21534-1348
19.690642 3108 PRP69 = 7928771*167#/21534-1592
20.459272 3230 PRP69 = 8196017*167#/21534-1388
18.227805 2878 PRP69 = 8328403*167#/21534-1546
16.779002 2650 PRP69 = 8710399*167#/21534-1318
17.282953 2730 PRP69 = 8918557*167#/21534-1398
21.966038 3470 PRP69 = 9026411*167#/21534-1724
17.762752 2806 PRP69 = 9025333*167#/21534-1348
18.737447 2960 PRP69 = 9038041*167#/21534-1338
18.036650 2850 PRP69 = 9399167*167#/21534-1382
19.476307 3078 PRP69 = 9652283*167#/21534-1436
18.654349 2948 PRP69 = 9601057*167#/21534-1374
19.273204 3046 PRP69 = 9701443*167#/21534-1348
smallgaptest.pl Finished: Thu Apr 5 12:39:07 2018, elapsed time = 00:01:49.629163[/code]

[B]CPU usage topped out at 400%[/B], indicating that only 4 threads were used (either 4 cores or worse 2 cores with SMT). For comparison mlucas shows up to 800% usage with 8 threads (with and without SMT), and up to 1600% usage for 8 cores with SMT.

edit: Accidentally did small twice, running med now.

robert44444uk 2018-04-05 12:51

My 4 core machine results for varying threads - in seconds

[QUOTE]4 259.2
5 252.6
6 245.4
7 230.6
8 225.5
2x4 222.1 - 2x4 is two instances of the software running concurrently.[/QUOTE]

this compares to your 109 secs.

What did you set your my $nthreads at? the variable is in the program, rather than set as a flag - the default in the program as I sent it to you is 4 - and with the Ryzen this can be set up to 16.

I'm sorry I forgot about the merits.txt file :(

Mark Rose 2018-04-05 12:53

[QUOTE=robert44444uk;484352]I'm trying to go for a decent rig to run a multi-threaded prime gap routine written in perl and I think I can afford a Ryzen 1800 series. Then it comes down to ensuring that all the other components will sing along sweetly and that I am not paying for stuff I don't need:

The current UK spec I am inching towards is:.[/QUOTE]

Can you wait two weeks? The new 2000 series desktop chips are due to be released April 19th. They have a few benefits:
[LIST][*]Better energy efficiency, i.e. higher clocks for the same watts.[*]Improved multi-core turbo (Precision Boost 2), but this requires a 400 series motherboard. The X470's should be out soon and there will be B450's later this year.[*]Higher officially supported memory of DDR4-2933.[*]Lower memory latency.[/LIST]
The new 2700X will be faster than the 1800X, consuming a few more watts. If you're trying to save money though, and you'll be running this system 24/7, I'd look at the 2700 (8 cores) or the 2600 (6 cores), both of which consume only 65 watts out of the box.

An early review of the new Ryzens: [url]https://wccftech.com/amd-ryzen-7-2700x-ryzen-5-2600x-cpu-review-published-online/[/url]

Prices leaked on Amazon: [url]https://wccftech.com/full-amd-ryzen-2000-lineup-listed-on-amazon-priced-cheaper-than-previously-reported/[/url]

If your program can only use 4 cores/threads and you can't change this, and you won't be using the machine for other purposes, I'd look at buying an i3-8100 or i3-8350k system instead. It would be cheaper. However, if you're buying a general purpose system, I'd stick with the 2000 series Ryzens.

robert44444uk 2018-04-05 13:02

[QUOTE=Mark Rose;484371]Can you wait two weeks? The new 2000 series desktop chips are due to be released April 19th. They have a few benefits:
[LIST][*]Better energy efficiency, i.e. higher clocks for the same watts.[*]Improved multi-core turbo (Precision Boost 2), but this requires a 400 series motherboard. The X470's should be out soon and there will be B450's later this year.[*]Higher officially supported memory of DDR4-2933.[*]Lower memory latency.[/LIST]
The new 2700X will be faster than the 1800X, consuming a few more watts. If you're trying to save money though, and you'll be running this system 24/7, I'd look at the 2700 (8 cores) or the 2600 (6 cores), both of which consume only 65 watts out of the box.


An early review of the new Ryzens: [url]https://wccftech.com/amd-ryzen-7-2700x-ryzen-5-2600x-cpu-review-published-online/[/url]

Prices leaked on Amazon: [url]https://wccftech.com/full-amd-ryzen-2000-lineup-listed-on-amazon-priced-cheaper-than-previously-reported/[/url]

If your program can only use 4 cores/threads and you can't change this, and you won't be using the machine for other purposes, I'd look at buying an i3-8100 or i3-8350k system instead. It would be cheaper. However, if you're buying a general purpose system, I'd stick with the 2000 series Ryzens.[/QUOTE]

Thank you Mark.

I can use any number for cores/threads with this program. As posted, it just means changing the $nthreads in the program. So I am certainly looking for lots of cores!!

M344587487 2018-04-05 13:28

Yes my bad, that small result is for threads set to 4. For all the tests the scheduler did a good job of not using SMT when there were cores available.

small 8 thread
[code]
smallgaptest.pl Started: Thu Apr 5 13:58:34 2018
# 39 i * 167#/21534 (1..10000000) mingap 1346
18.791741 2890 PRP67 = 138067*167#/21534-1594
17.389811 2706 PRP68 = 849917*167#/21534-1382
18.318888 2854 PRP68 = 1024807*167#/21534-1516
18.570360 2896 PRP68 = 1192981*167#/21534-1438
17.069326 2670 PRP68 = 1915451*167#/21534-1374
18.040892 2824 PRP68 = 2143205*167#/21534-1338
18.617178 2918 PRP69 = 2627371*167#/21534-1296
17.913754 2808 PRP69 = 2664685*167#/21534-1306
18.160088 2848 PRP69 = 2876147*167#/21534-1446
18.200766 2856 PRP69 = 3143995*167#/21534-1438
21.276427 3340 PRP69 = 3354361*167#/21534-1642
18.265413 2868 PRP69 = 3480211*167#/21534-1522
16.605635 2610 PRP69 = 4073809*167#/21534-1324
18.639102 2930 PRP69 = 4159661*167#/21534-1556
19.536212 3072 PRP69 = 4373099*167#/21534-1706
17.621521 2772 PRP69 = 4649063*167#/21534-1338
18.039961 2840 PRP69 = 5245129*167#/21534-1338
18.271699 2880 PRP69 = 6358703*167#/21534-1286
16.999550 2682 PRP69 = 7373587*167#/21534-1396
18.168063 2866 PRP69 = 7230857*167#/21534-1374
17.717003 2796 PRP69 = 7717717*167#/21534-1348
17.260136 2724 PRP69 = 7762661*167#/21534-1286
19.690642 3108 PRP69 = 7928771*167#/21534-1592
18.227805 2878 PRP69 = 8328403*167#/21534-1546
20.459272 3230 PRP69 = 8196017*167#/21534-1388
16.779002 2650 PRP69 = 8710399*167#/21534-1318
17.282953 2730 PRP69 = 8918557*167#/21534-1398
21.966038 3470 PRP69 = 9026411*167#/21534-1724
18.737447 2960 PRP69 = 9038041*167#/21534-1338
17.762752 2806 PRP69 = 9025333*167#/21534-1348
18.036650 2850 PRP69 = 9399167*167#/21534-1382
19.476307 3078 PRP69 = 9652283*167#/21534-1436
18.654349 2948 PRP69 = 9601057*167#/21534-1374
19.273204 3046 PRP69 = 9701443*167#/21534-1348
smallgaptest.pl Finished: Thu Apr 5 13:59:30 2018, elapsed time = 00:00:55.483178
[/code]

small 16 thread
[code]
smallgaptest.pl Started: Thu Apr 5 14:00:03 2018
# 39 i * 167#/21534 (1..10000000) mingap 1346
18.791741 2890 PRP67 = 138067*167#/21534-1594
17.389811 2706 PRP68 = 849917*167#/21534-1382
18.318888 2854 PRP68 = 1024807*167#/21534-1516
18.570360 2896 PRP68 = 1192981*167#/21534-1438
17.069326 2670 PRP68 = 1915451*167#/21534-1374
18.040892 2824 PRP68 = 2143205*167#/21534-1338
18.617178 2918 PRP69 = 2627371*167#/21534-1296
17.913754 2808 PRP69 = 2664685*167#/21534-1306
18.160088 2848 PRP69 = 2876147*167#/21534-1446
18.200766 2856 PRP69 = 3143995*167#/21534-1438
21.276427 3340 PRP69 = 3354361*167#/21534-1642
18.265413 2868 PRP69 = 3480211*167#/21534-1522
16.605635 2610 PRP69 = 4073809*167#/21534-1324
18.639102 2930 PRP69 = 4159661*167#/21534-1556
19.536212 3072 PRP69 = 4373099*167#/21534-1706
17.621521 2772 PRP69 = 4649063*167#/21534-1338
18.039961 2840 PRP69 = 5245129*167#/21534-1338
18.271699 2880 PRP69 = 6358703*167#/21534-1286
16.999550 2682 PRP69 = 7373587*167#/21534-1396
18.168063 2866 PRP69 = 7230857*167#/21534-1374
17.717003 2796 PRP69 = 7717717*167#/21534-1348
17.260136 2724 PRP69 = 7762661*167#/21534-1286
19.690642 3108 PRP69 = 7928771*167#/21534-1592
20.459272 3230 PRP69 = 8196017*167#/21534-1388
18.227805 2878 PRP69 = 8328403*167#/21534-1546
16.779002 2650 PRP69 = 8710399*167#/21534-1318
17.282953 2730 PRP69 = 8918557*167#/21534-1398
21.966038 3470 PRP69 = 9026411*167#/21534-1724
18.737447 2960 PRP69 = 9038041*167#/21534-1338
17.762752 2806 PRP69 = 9025333*167#/21534-1348
18.036650 2850 PRP69 = 9399167*167#/21534-1382
19.476307 3078 PRP69 = 9652283*167#/21534-1436
18.654349 2948 PRP69 = 9601057*167#/21534-1374
19.273204 3046 PRP69 = 9701443*167#/21534-1348
smallgaptest.pl Finished: Thu Apr 5 14:00:45 2018, elapsed time = 00:00:42.469672
[/code]

med 4 thread
[code]
medgaptest.pl Started: Thu Apr 5 14:18:17 2018
# 812 i * 6247#/21534 (1..200) mingap 36818
10.759297 66072 PRP2667 = 113*6247#/21534-30748
9.445520 58008 PRP2668 = 169*6247#/21534-24602
9.827430 60354 PRP2668 = 179*6247#/21534-31708
medgaptest.pl Finished: Thu Apr 5 14:25:59 2018, elapsed time = 00:07:41.586702
[/code]

med 7 thread
[code]
medgaptest.pl Started: Thu Apr 5 13:30:32 2018
# 812 i * 6247#/21534 (1..200) mingap 36818
10.759297 66072 PRP2667 = 113*6247#/21534-30748
9.445520 58008 PRP2668 = 169*6247#/21534-24602
9.827430 60354 PRP2668 = 179*6247#/21534-31708
medgaptest.pl Finished: Thu Apr 5 13:35:58 2018, elapsed time = 00:05:25.865843
[/code]

med 8 thread
[code]
medgaptest.pl Started: Thu Apr 5 14:01:57 2018
# 812 i * 6247#/21534 (1..200) mingap 36818
10.759297 66072 PRP2667 = 113*6247#/21534-30748
9.445520 58008 PRP2668 = 169*6247#/21534-24602
9.827430 60354 PRP2668 = 179*6247#/21534-31708
medgaptest.pl Finished: Thu Apr 5 14:06:53 2018, elapsed time = 00:04:55.464834
[/code]

med 16 thread
[code]
medgaptest.pl Started: Thu Apr 5 14:07:16 2018
# 812 i * 6247#/21534 (1..200) mingap 36818
9.445520 58008 PRP2668 = 169*6247#/21534-24602
10.759297 66072 PRP2667 = 113*6247#/21534-30748
9.827430 60354 PRP2668 = 179*6247#/21534-31708
medgaptest.pl Finished: Thu Apr 5 14:11:27 2018, elapsed time = 00:04:11.299515
[/code]

It should be noted that the med test had variable CPU utilisation. It used the maximum number of threads specified for maybe 60% of the test, after which the number of threads kept dropping (presumably after they finished what they were doing and there was no more single-core work to grab from the bag).

robert44444uk 2018-04-05 13:58

[QUOTE=M344587487;484379] For all the tests the scheduler did a good job of not using SMT when there were cores available.


8 thread smallgaptest.pl elapsed time = 00:00:55.483178


16 thread smallgaptest.pl elapsed time = 00:00:42.469672[/QUOTE]

42.5 secs compared to 222.1 secs for my 4 core!!!!

Here were the med test timings for my 4 core, using a varying number of threads (in secs)

[CODE]

threads runtime

4 555.3
5 497.2
6 492.3
7 483.8
8 466.4
[/CODE]

This compares to your:

[CODE]

threads runtime

4 461.6
7 325.8
8 295.4
16 252.3
[/CODE]

The lack of super-performance in the med test is, I have no doubt, due to the lack of work for the cores. As you say:[QUOTE]It should be noted that the med test had variable CPU utilisation. It used the maximum number of threads specified for maybe 60% of the test, after which the number of threads kept dropping (presumably after they finished what they were doing and there was no more single-core work to grab from the bag)
[/QUOTE]

A better guide is the small test. Overall I can see that upgrading to the Ryzen will be a good idea. 5x performance upgrade, for twice the number of cores.


All times are UTC. The time now is 11:04.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.