Although I was very tempted to build a new desktop PC and get access to all the power goodness of the latest AMD Ryzen, I was hesitant giving up the small form factor that I had with my Shuttle PC DS87. When the Asus PN50 with the AMD Ryzen 4800U became available I took the plunge.
The specs comparison between the previous and new PCs:
New PC:
- Ryzen 7 4800U [Zen2] (8 cores / 16 threads, base clock 1.8GHz, max 4.2GHz - 8 GPU cores - RX Vega 8, 15W)
- 32 GB Crucial DDR4 3200Mhz RAM (2x16GB)
- 1TB Samsung 970 EVO Plus (M.2 NVMe interface) SSD
- 500GB Crucial MX500 SATA SSD (2.5")
- Intel WIFI 6, BT 5.0
Previous PC:
- Shuttle PC DS87
- Intel Core i7-4790S Processor (8M Cache, base clock 3.2 GHz, max 4.0GHz, 65W)
- Samsung 850 EVO 500GB 2.5-Inch SATA III Internal SSD (MZ-75E500B/AM)
- 2 x Crucial 16GB Kit (8GBx2) DDR3 1600 MT/s (PC3-12800)
There are enough sites giving benchmarks so I'm not going to try to repeat what they've done, but I wanted to have something to show myself a tangible performance improvement. It is generally during compilation when I wish things would go faster so why not compare compilation between the two systems? The multi-core (8 vs 4) and multi-thread (16 vs 8) should benefit compilation even if the base clock of the 4800U is 1.8GHz while the i7 is 3.2GHz. I'm expecting modern CPU is also more efficient per clock cycle then an 6 year old CPU.
I decided to time the compilation of OpenCV using the following
wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip unzip opencv.zip mkdir -p build && cd build cmake ../opencv-master/ time cmake --build .
i7 Results
real 28m57.219s user 26m48.466s sys 2m01.402s
4800U Results
real 36m48.166s user 34m54.722s sys 1m52.574s
How did this happen? Was it that the 3.2-4.0 GHz too much for the 1.8-4.2GHz to overcome? It did seem like during compilation all of the i7 cores was running at around 3.6 GHZ, but I suspected that the compiler was not actually taking advantage of all the cores of the 4800U.
I tried again using Ninja which automatically configures the build to use the multi-core CPUs.
make clean cmake -GNinja ../opencv-master/ time ninja
i7 Results
real 11m28.741s
user 85m39.188s
sys 3m23.310s
4800U Results
real 6m39.268s
user 99m03.178s
sys 4m8.597s
This result looks more like what I expected. More of the system cycles were used on both the i7 and 4800U as more cores and threads were utilized but the real time was much shorter. This just shows that for a lot of consumers fewer cores but faster clock speeds might be better for desktops (laptops and battery life adds another dimension) as they rely on the applications to be programmed to take advantage of the multiple cores. That's why gamer systems usually will give up more cores for faster clock speeds since games aren't known for utilizing multiple cores.
No comments:
Post a Comment