Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DF Hyperthread testing  (Read 856 times)

eccentric

  • Bay Watcher
    • View Profile
DF Hyperthread testing
« on: September 26, 2015, 04:19:41 pm »

While generating a large, long history, world my CPU held a 2.5GHz 'turboboost' and kept under 60C. Which made me wonder about if I could eek out more turning off Hyperthreading.

Lenovo Yoga 13 (original) with an Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz and 8GB (single channel) running 4.1.6-1-ARCH x86_64 with 'vanilla' DF 0.40.24 on a tmpfs 'RAM drive'

Before I wrote an .sh that would tie up my computer creating dozens of the same world I thought I should run a few tests. I heat soaked the computer by pregeneratnig a short (couple hundred years) world before each test.

Hyperthreading (on) it 'turboboosts' up to 2.5GHz stayed there and kept under 60C just like I saw before
Opens df, generates the world specified, saves it, closes df, reports the time it took;
Code: [Select]
$ time ./df -gen 100 9999 LONG
real 56m12.491s
user 56m37.826s
sys 0m19.073s

World gen profile (Large island 1050yr world);
Spoiler (click to show/hide)

Yogas don't have a BIOS setting to toggle hyperthreading but you can turn off cores using;
Code: [Select]
$ echo 0 > /sys/devices/system/cpu/cpu2/online
$ echo 0 > /sys/devices/system/cpu/cpu3/online
Hyperthreading (off) it 'turboboosts' to 2.7GHz and kept the same temp as before. Right there is was thinking it might be 10% faster but in the end it was about 2mins slower. I ran the Hyperthreading (off) test again and got the same results. Hyperthreading (on) ran the test again and same as before.

Thoughts; possibly only having single channel RAM is a bottleneck. Hyperthreading might allow saving to take less time. The way I shut off the Hyperthreading cores leaves some overhead that causes some slow down a BIOS setting might be better. World gen might not be an accurate method for testing in game FPS gains. It was fun messing around with this even if it didn't help.
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: DF Hyperthread testing
« Reply #1 on: September 27, 2015, 10:16:28 am »

Yeah, that isn't too surprising.  Hyperthreading doesn't do a whole lot these days since it was mostly a benefit to CPU bound tasks, since the CPU could context switch to another process and use computational units while waiting for memory or I/O.

If you had enough active processes to need the extra fake cores then you might get a little benefit, but that's hard to benchmark and arguably not too realistic anyway.  :)

Almost everything is memory bound these days, so improving your memory bandwidth is usually the best way to improve performance for anything.
Logged
Through pain, I find wisdom.