What is the difference between the several GNU/Linux distros like Ubuntu and Fedora? Before brickbats fly for asking an oft repeated question, I am talking of differences related to the internal working of the operating system, not eye candy, desktop environments, package managers, ease of use and other user interface related features.

To be more specific, suppose I am purely interested in the performance of a certain C++ program (serial or parallel) that I have written. Say I have Ubuntu and Fedora installed on the same desktop machine, with both having the same Linux kernel version, will the program performance be the same on both the operating systems?

A related question would be why some Unix like OS'es like FreeBSD (which is not a GNU/Linux distro) are more favored for server platforms than others.


The internal differences, excluding package systems and GUI, are few, and quite all of them not so relevant for what you are asking.

The only relevant thing for your C++ programs is the version of the kernel and/or the version of the libraries your program is linked against, that somewhat depends on the distro you choose, but you can always replace them by downloading and compiling the sources (if pre-built packages are not available).

The performance difference will be, assuming you're sticking on the same machine and even with different libraries, almost undetectable, excluding statistical noise (if the distro is GUI based, for example, then some GUI-related job can randomly interleave with your C++ program causing it to do a bad benchmark, occasionally - yeah, even on multicore machines). If you are aiming at performance, and predictability (low variance on the execution time) then avoid GUI based distros and stop any service that can occasionally do some job that interleaves with your program (e.g. networking).

  • 1
    As an alternative to non-gui distros, say I am bench-marking a certain program do you recommend that I should switch to a virtual terminal which is non-GUI (CTRL+ALT+F1 in Ubuntu) to avoid that statistical noise? – smilingbuddha Nov 6 '11 at 18:15
  • 1
    Unfortunately, I don't think this would help :(. GUI distros are (for good and sensitive reasons, I mean) 'bloated' with background tasks, that help the desktop user a lot (I do want update notifications, printing services, automatic wireless network searching, etc etc...) but don't help the benchmarker. :) And they run even if you hide the GUI. If you need a serious-alike benchmarking for your C++ programs (are you fine-tuning?) then go for a GUI-less distro. Then disable networking, cron and any unnecessary service... – gd1 Nov 6 '11 at 18:41
  • Remember you can always reduce the effect of statistical noise with a bit of statistical analysis. Discard the abnormal benchmarks (if you get 1.1ms, 1.2ms, 98ms, 1.1ms, then discard the third and AFTER this calculate the mean value) – gd1 Nov 6 '11 at 18:42
  • 1
    The technical phrase for the procedure @gd1 suggests is "outlier elimination". – dmckee Nov 6 '11 at 19:31

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.