8
$\begingroup$

It's common parlance to say that Linux is faster, and for good reasons. But as stated in the title, how much does choice of OS matter for performance of scientific computing code? For something things which the operating system is more directly involved (such as playing games or video rendering), sure there can be a difference. But if I run some codes in MATLAB, solve PDEs in Julia, or are doing some linear algebra on a GPU using CUDA: is there actually a measurable performance difference between Windows, MacOS, and Linux?

I am wondering if anyone has performed benchmarks to see if such a difference exists. Maybe differences exist when using some software like MATLAB because of differences in the compilers they use? Or maybe CUDA drivers are measurably faster for one OS than the other? Or do OS's sometimes interfere a lot like like the WDDM CUDA issue?

Note: I know there are other reasons for choosing an operating system which is beyond the scope of this question. I am specifically wondering about performance.

$\endgroup$
  • 6
    $\begingroup$ The performance differences between OSs are usually in process scheduling, disk and network performance (the things that an OS kernel would handle). Since scientific computing code is typically CPU- or memory-bound, it probably makes only a small difference. For CUDA and graphics, it would also be a matter of how much effort the vendor puts into their drivers for each OS, but for compute-bound code it would probably also not matter too much. $\endgroup$ – Kirill Jul 27 '16 at 8:06
  • $\begingroup$ That's what I assume to be the case, but I am wondering if anyone has done some experiments to make sure that is the case. I may setup a triple-boot Windows/MacOS/Linux and benchmark the same scripts to see if that's the case. But if someone else with a multi-boot has done this before, then there may be no need to invest that time. $\endgroup$ – Chris Rackauckas Jul 27 '16 at 9:40
  • 2
    $\begingroup$ Expanding on what @Kirill mentioned, different OSes may have different granularity of control for managing, say, process priority, or NUMA nodes (e.g. controlling memory and CPU affinity), which in turn can impact application performance. $\endgroup$ – njuffa Jul 29 '16 at 20:00
  • $\begingroup$ While you clarified that other reasons for OS choice should be avoided - which is in a way understandable - you should allow the stability of the OS as an answer. If the OS1 crashes after 20 hours at 99% of computation and all calculations have to be repeated, you can consider it less performant than a slightly slower, but stable compuation on OS 2. $\endgroup$ – Jan Hackenberg Aug 1 '16 at 13:47
2
$\begingroup$

There should be little difference in principle as the underlying tool kits are usually similar if not the same: libraries, compilers (and hardware). In practice, there can be improvement from using 'thin' nodes. That is no GUI, no email running in the back ground or any of the other many processes an OS may have going to facilitate the user experience. It can be easier to set up a 'server' os in linux straight from a standard distro that can result in a much leaner machine for running a floating point intensive code. Even then, the advantages would not be very noticeable as long as there is no user activity aside from the running code.

$\endgroup$
2
$\begingroup$

I remember reading two or three years ago statistics about OS distribution for the List of the 500 fastest computers world wide. Linux/unix based running computer number was 498, Windows based 2 and no MacOS. Unfortunately I failed to get to the statistics again. Wikipedia's SuperComputer article just states:

"Although most modern supercomputers use the Linux operating system, each manufacturer has its own specific Linux-derivative, and no industry standard exists, partly due to the fact that the differences in hardware architectures require changes to optimize the operating system to each hardware design".

Even if this article does not give the numbers of the distribútion, it gives at least a clear trend to Linux based computers. In a field where every bit of performance counts (and the money needed to adapt the system to the super computer specification most likely does not, so I do not assume the the open source nature is the major benefit here).

On a rather normal workstation Linux tends to also have better resource management, e.g. less memory usage, and tends to be more stable. Yet this is a personal experience of mine wihout statistics behind it and should not be generalized without confirmation (Win 7 vs Ubuntu 14.04).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.