Quartus Settings (Ryzen 7)

Discussion of developmental aspects of the MiSTer Project.
User avatar
macro
Core Developer
Posts: 138
Joined: Sun May 24, 2020 4:12 pm
Been thanked: 171 times

Quartus Settings (Ryzen 7)

Unread post by macro »

I just upgraded my PC from a quad core I7 to an 8 core Ryzen 7 (both with hyperthreading) and was a bit surprised to see that it took over twice as long to build a project on the new CPU

I7 used to use 4 cores (from 8) and took just under 10 minutes

Ryzen 7 3700x (with 8 cores, 16 threads) took 18 minutes to build same project!

however it was using all 16 cores so it didn't miss out the hyperthreaded cores as it did with I7, so I changed the config to use 8 (instead of ALL) and it now takes 7½ minutes to build (I tried 4 and 6 as well, both around 8 mins, so extra cores don't make that much difference)

so, if you have an AMD CPU, make sure the number of cores is set correctly (probably to the number of REAL cores ignoring HT)

setting is in the QSF file
set_global_assignment -name NUM_PARALLEL_PROCESSORS 8
Did I do something useful?

buy me a coffee
ExCyber
Posts: 217
Joined: Sun May 24, 2020 3:33 pm
Has thanked: 11 times
Been thanked: 66 times

Re: Quartus Settings (Ryzen 7)

Unread post by ExCyber »

Thanks for posting this. I've been meaning to run a few experiments with this myself, since I have a 3900X.

Here are some of my results (not scientific, not meant to be a representation of Quartus performance in general, etc.)

Code: Select all

Limit	Time
4	12:47
8	11:59
12	11:40
(16)	12:03
(the "(16)" line represents no configured limit, but Quartus only using 16 of 24 threads)

I wonder if it comes down to most of the benefits of parallelism being seen in larger, more partitioned/hierarchical designs.
lupin3rd
Posts: 35
Joined: Wed Jun 17, 2020 7:15 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Quartus Settings (Ryzen 7)

Unread post by lupin3rd »

Of course, there's always the conspiracy theory that Quartus is "optimized" for Intel CPUs, since... well, Intel owns Quartus. :lol:
justaguy
Posts: 45
Joined: Thu Jun 18, 2020 5:23 pm
Has thanked: 3 times
Been thanked: 20 times

Re: Quartus Settings (Ryzen 7)

Unread post by justaguy »

I got a modest speed boost building the Genesis core on my Ryzen 2600 (6 cores, 12 threads) running Windows 10. Compilation time was 17m38s with NUM_PARALLEL_PROCESSORS set to 6 compared with 19m37s on the default setting. Not earth-shattering but I'll take it. Zen 3 can't get here soon enough...

(Interestingly enough, the compile time with NUM_PARALLEL_PROCESSORS=10 was almost as good at 17m48s.)
User avatar
Sorgelig
Site Admin
Posts: 877
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 211 times

Re: Quartus Settings (Ryzen 7)

Unread post by Sorgelig »

Most time consuming stages of compilation is placement and routing - these stages are single threaded. So it doesn't matter how many cores or hyperthreads you have. Only matter how fast a single core is. So more MHz -> faster Quartus compilation. I'm not sure how effective AMD is per MHz comparing to Intel.
ExCyber
Posts: 217
Joined: Sun May 24, 2020 3:33 pm
Has thanked: 11 times
Been thanked: 66 times

Re: Quartus Settings (Ryzen 7)

Unread post by ExCyber »

I couldn't find a direct comparison, but bigger cache is also supposed to help with place and route performance. It's one of the reasons that I chose a 3900X (64 MB L3).
User avatar
Sorgelig
Site Admin
Posts: 877
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 211 times

Re: Quartus Settings (Ryzen 7)

Unread post by Sorgelig »

Cache works on higher clock than SDRAM and has less latency, and code from cache executed on higher clock. So yes, larger cache helps too.
Post Reply