The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    OpenCL benchmarks on Windows 10 (build 1803) vs Ubuntu Linux 18.04LTS.

    Discussion in 'Linux Compatibility and Software' started by Dennismungai, Jun 8, 2018.

  1. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Hello guys,

    As I was setting up Ubuntu 18.04LTS on the Clevo P950ER (the Eurocom Q6 variant), I decided to run a few OpenCL tests with both Pyrit and Luxmark to confirm just how well Intel's new Neo OpenCL platform runs on Linux, and if its' up to feature parity with the Windows driver.

    The Neo driver is what succeeds the previous Beignet project, that Intel now considers deprecated for newer GPU generations (Broadwell+).

    In the long run, Neo is intended to replace the closed source blobs distributed for OpenCL ICDs within the closed source Media SDK as the stack is opened up in the future. With this in mind, its' not recommended to link your OpenCL applications with the runtime library (igdrcl), but rather with the tried and true vendor neutral dispatcher ocl-icd .

    Documentation:

    1. Building the Neo OpenCL stack on Ubuntu 18.04LTS: https://gist.github.com/Brainiarc7/1d13c7f432ba03a8e38720c83cd973d5

    2. Getting Ubuntu 18.04LTS running on this machine: https://gist.github.com/Brainiarc7/f7da590bee1ed35ac5ed258ff9335fd6#file-linux-on-eurocom-q6-md

    3. Building pyrit from source and enabling both CUDA and OpenCL backends: https://gist.github.com/Brainiarc7/dc80b023af5b4e0d02b33923de7ba1ed

    Benchmark notes:

    The driver versions applied for both Windows + Linux were the latest builds as of the time of writing, namely R396 for NVIDIA. All OS updates had been conducted prior to the benchmarks.

    Results:

    Let's compare how a benchmark such as luxmark, available on both Windows and Linux, runs on the same system.

    Using both accelerators, on Ubuntu 18.04LTS:

    [​IMG]

    And the same device selection, but on Windows 10:

    [​IMG]

    Windows build 1803 is only marginally better in the score (a ~2.5% lead) using the simple benchmark scene (luxball). Later on, we will see the impact of increasing the scene's complexity on performance.

    Now, for individual results:

    On Linux, with the integrated GPU only using the Neo platform:

    [​IMG]

    And on Windows 10 build 1803, the same scene benchmark with the iGPU selected returns:

    [​IMG]

    Compared to the neo runtime on Linux, the Windows OpenCL drivers for Intel hardware pull up ahead by ~3.76%.

    Conclusion: On Intel's side of things, their newer neo driver platform is virtually at performance parity with the Windows drivers.

    And with the NVIDIA GeForce GTX 1070 with Max-Q design, here's how its' performance compares on Windows 10 and Ubuntu 18.04LTS:

    On Linux, we get:

    [​IMG]

    And on Windows, the same platform scores as shown:

    [​IMG]

    That's a lead of ~3.55% on the Windows side.

    Conclusion: The Linux & Windows drivers for OpenCL on NVIDIA's side seem to be near feature parity, with a near identical lead as the Windows drivers for Intel's OpenCL have compared to the Linux's neo counterpart.

    And with combined devices:

    When using both OpenCL platforms simultaneously, lets' see if there's a performance parity on Windows vs Linux:

    Linux results first:

    [​IMG]

    And on to Windows 10 build 1803:

    [​IMG]

    Here, we see a marginal lead of ~1.2% on Windows 10.

    Now, what happens when we throw in the wrenches, ie running OpenCL on the processor + the GPUs simultaneously?

    [​IMG]

    Performance predictably increases, to the tune of ~10% when the 6-core, 12-thread Coffeelake-H mobile processor joins in the fray.

    Unlike Pyrit, where ramping up core counts is detrimental to the throughput of discrete accelerators, luxmark takes what it can and ts' workload suffers no penalty.

    Now comes the results for Pyrit.

    In OpenCL mode, using both devices (Intel+ Nvidia) to demonstrate ICD coexistence, here are the results:

    [​IMG]

    And now, with CUDA mode only, here are the results:

    [​IMG]

    Here, we can see that the OpenCL mode is only marginally faster than the CUDA mode because of the small boost by the Intel IGP paired with slighly higher throughput by the NVIDIA card in OpenCL mode.

    Now, what happens when all accelerators are disabled, namely OpenCL + CUDA, and are left with only raw processor power?

    [​IMG]

    Performance predictably tanks to an abyss :)

    On average:

    (a). The OpenCL mode brings about a ~22x speedup compared to processor only mode.

    (b). The CUDA accelerated mode brings about a ~20x speedup compared to processor only mode.

    Enjoy :)
     
  2. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
  3. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Yes,

    I was able to install and retain both ICDs.

    That's why the ICD model exists: To allow for platform coexistence from multiple vendors on the same system.

    With intel's proprietary SDKs, installing them directly on a production system is risky.

    Avoid their proprietary SDKs as much as possible.

    See the documentation abpve on how the build was done.

    I'm going to experiment with FFmpeg's OpenCL filters, see what kind of throughput one can expect.
     
  4. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    It'll be slow than windows on nv drivers.
    Sent from my iPhone X Papusan edition using Tapatalk

    So how about nvdia drivers and cuda toolkit and neo packages together and then running ocl-icd neutral package to discover installed icds along with cuda driver.
    On newest kernel nv refuses to work on 4.15. So I've to uninstall everything from nv and install their .run file that contains cuda toolkit and development driver 396.26.
    Currently 390.76 didn't work

    Sent from my iPhone X Papusan edition using Tapatalk
     
  5. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Well, I'm on Linux 4.17 (so far).

    No issues encountered.

    You could install cuda first , followed by Neo, and then ocl-icd before building any Ocl apps from source.

    Also, what distribution are you running?

    Concerning performance on both Windows & Linux: With NVIDIA drivers, they pretty much share a common code base, so performance difference between the two should be negligible, all other conditions being constant. My results above also confirm this.

    It's with Intel's case with the Neo compute runtime that intrigued me. In the past, beignet (the now deprecated OpenCL platform driver for Linux, succeeded by Neo) never attained performance parity with Windows. For the first time in a long time, we're seeing the same happen for Intel, and that is good news for GPGPU apps on *nix.
     
    Vasudev likes this.
  6. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    I use Xubuntu 16.04.5
     
  7. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    I see.

    Are you able to build Neo?

    I can't test on 16.04LTS because I upgraded all my hosts to 18.04 three days ago.
     
  8. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    I will give it a go today.
     
  9. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    Neo was not showing up in clinfo. I can see only Nv and mesa icd. Even uxmal luxmark throws cl error.
    How were you able to install Intel and nv gfx drivers under optimus?

    Sent from my iPhone X Papusan edition using Tapatalk
     
  10. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    On Ubuntu, I used both Oibaf's and proprietary driver PPAs for the drivers:

    sudo add-apt-repository ppa :eek:ibaf/graphics-drivers -y && sudo add-apt-repository ppa:graphics-drivers/ppa -y
    sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade

    Then, install the latest nvidia driver:

    sudo apt install nvidia-driver-396

    From here, follow up with the build instructions for OpenCL's dependencies: https://gist.github.com/Brainiarc7/dc80b023af5b4e0d02b33923de7ba1ed

    The most important package is ocl-icd. Without it, you're going nowhere in OpenCL.

    Next, build Intel's stack: https://gist.github.com/Brainiarc7/1d13c7f432ba03a8e38720c83cd973d5

    Wish I had a 16.04LTS testbed to test on. Will spin up a few instances later on Digital Ocean and validate the build instructions there.
     
    Vasudev likes this.
  11. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    It didn't work. I'm stuck at NV and Neo doesn't work in Intel or NV only GPU modes using prime-select.
     
  12. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Can you retest the build step(s) on Ubuntu 18.04LTS?
     
  13. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    But intel did test them with ubuntu 16 as test setup. I think I'm missing something.
    I will be rebuilding it tomorrow from scratch. Yesterday after upgrading cmake using pip did make installation faster. I feel cmake didn't make necessary changes since it was very old.
    I'll let you know.
     
  14. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Alright, test and report back on your findings.
     
    Vasudev likes this.
  15. Hossbando

    Hossbando Notebook Enthusiast

    Reputations:
    5
    Messages:
    40
    Likes Received:
    8
    Trophy Points:
    16
    You should use MATE or LXDE instead of whatever the heck Ubuntu packages by default if you're doing any type of rendering tests. If you're looking for raw power instead of bells and whistles you'll notice a difference. MATE gives me an easy additional 10-15fps (probably 10% speed difference, based on feel) vs Cinnamon in most OpenGL games on older hardware. I can't imagine the default ubuntu DE is really that quick.

    Edit: Also going to chime in that in my experience 18.04 can feel like molasses compared to the 17 releases. Tons of broken dependencies as well.
     
  16. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Their new netplan.io backend for networking interfaces is utter garbage.

    And for some reason, installing the Nvidia R396+ drivers does not automatically fetch the dependencies for it, such as the kernel module source, bricking apt.

    I'll definitely try out a mate desktop install and compare performance (in games).

    This is the phoronix test profile that I'll use for that:


    phoronix-test-suite default-benchmark openarena xonotic tesseract gputest unigine-valley

    As recommended by this PPA.

    And for the mate desktop:

    apt install ubuntu-mate-desktop

    And the default display manager for this batch of tests will be gdm3.

    When done, I'll switch over to lightdm and retest.

    To switch, simply reconfigure the default display manager:

    dpkg-reconfigure gdm3

    And in the prompt, select the preferred display manager. Reboot to apply changes.

    Here comes:

    1. For the Clevo PDM2-G (forgive the typo in the test file): https://openbenchmarking.org/result/1806261-KH-1806265KH55

    2. For the Eurocom Q6: https://openbenchmarking.org/result/1806260-AR-1806268AR52

    Conclusions:

    Mate seems to have a higher performance penalty in windowed scenarios on both switchable and discrete graphics systems (as the test case above, yet performs consistently with fully composited applications (and full screen apps).

    The standard Gnome desktop environment's consistency with fully composited workflows on both systems (discrete and switchable graphics) has a higher variance, but in general:

    (a). Has a higher performance penalty on the switchable graphics system (nvidia prime)

    (b). Generally shows a greater throughput / better performance in all tests on both systems.
     
    Vasudev likes this.
  17. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    And by the way, G-SYNC with external monitors is available.

    Tested over both HDMI and mini-DP with an Acer Z35P panel.
     
  18. Hossbando

    Hossbando Notebook Enthusiast

    Reputations:
    5
    Messages:
    40
    Likes Received:
    8
    Trophy Points:
    16
    Interesting. Thanks for the work.
     
  19. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Thanks, you're welcome.
     
  20. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Vasudev likes this.
  21. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    Dennismungai likes this.
  22. Tinderbox (UK)

    Tinderbox (UK) BAKED BEAN KING

    Reputations:
    4,745
    Messages:
    8,513
    Likes Received:
    3,823
    Trophy Points:
    431
    I have an Mini-PC with an AMD E2-1800 and 8GB ram and 120GB SSD

    I have been using Win 10x64 but it runs a bit slow and the fan makes quite a bit of noise.

    So i installed "ubuntu-18.04.1-desktop-amd64.iso" and my the Fan on my Mini-PC is even louder and it`s more laggy than in Win 10 x64

    I reinstalled Win 10 x64 and it`s running quiet again.

    Strange?

    John.
     
    alexhawker likes this.
  23. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    Try Xubuntu 18 its lighter than Ubuntu. BTW, you can install gnome tweak tool to disable the graphics bloat in Gnome. Use 1Gb or 2Gb as swap file. Optimise Linux for SSD.
     
    Tinderbox (UK) and Dennismungai like this.
  24. Tinderbox (UK)

    Tinderbox (UK) BAKED BEAN KING

    Reputations:
    4,745
    Messages:
    8,513
    Likes Received:
    3,823
    Trophy Points:
    431
    I tried Xubuntu, It does feel and look better than Ubuntu, But the fan is still louder than Win10 x64 and when you click to close a window or a program it seems to take ages to respond to the click, like it has not been recognized.

    So i am going back to Win10 x64 for a while.

    Thanks for the help.

    John.
     
  25. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    You need to disable display compositor,install amd microcode firmware and linux firmware to get full proper functions of AMD CPU.
    If you have Optimised defaults for OS in BIOS set to Win8/10 64bit change it to Other OS.
     
    Tinderbox (UK) likes this.
  26. Tinderbox (UK)

    Tinderbox (UK) BAKED BEAN KING

    Reputations:
    4,745
    Messages:
    8,513
    Likes Received:
    3,823
    Trophy Points:
    431
    You only have a choice of "uEFI OS" or "Legacy OS" it`s an old machine bios is from 2013 and the drivers on the website below are for Win7 only.

    It`s only a backup machine i was messing around with and i am quite happy running Win10 on it, I was just wondered how well Ubuntu would run.

    I only paid £40 from eBay and it had an 1TB HDD and an single 8GB SO-DIMM, So i think i did well.

    https://www.zotac.com/us/product/mini_pcs/ad12

    Thanks

    John.
     
    Vasudev and Dennismungai like this.
  27. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,050
    Messages:
    11,278
    Likes Received:
    8,816
    Trophy Points:
    931
    Have you tried the tweaks mentioned here? https://sites.google.com/site/easylinuxtipsproject/first-xubuntu
     
    Tinderbox (UK) likes this.
  28. Tinderbox (UK)

    Tinderbox (UK) BAKED BEAN KING

    Reputations:
    4,745
    Messages:
    8,513
    Likes Received:
    3,823
    Trophy Points:
    431
    Vasudev likes this.