Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As the title states,

What Linux distribution - whould you say - is the most optimal for running a webserver which requires high performance?


migration rejected from Feb 9 at 12:10

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as too broad by kasperd, Ward, mdpc, HBruijn Feb 9 at 12:10

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Same as:… – nik Jul 27 '09 at 7:50

I'd say forget the Linux distro and think of the software first, specifically nginx instead of the standard Apache.

Some comparisons:

I would reccommend nginx (or lighttpd) over apache any day :) – Frozenskys Jul 27 '09 at 7:40
+1 for lighttpd. – Paul McMillan Jul 27 '09 at 10:07
+1 Distributions really don't matter. You just want to use the one you're most comfortable with. – David Pashley Jul 27 '09 at 10:13

The distro shouldn't make the difference so much as the experience of the sysadmin doing the project and configuration of the server.

By experience I mean that each distribution of Linux has it's own "philosophy"...Ubuntu has it's popular tools for updating (you're running Ubuntu? click system->administration->update manager...running Debian? Use apt-get..., etc.) that administrators become kind of keyed in to work with by reflex. If you're extensively experienced in a particular distribution there's no reason not to use it, really. Yes, they usually can have cross-type tools or are based off each other's stuff (Ubuntu using Alien to convert RPM's or using apt-get from the command line like Debian) but in general I've found it's more helpful not to fight the "$SPECIFICDISTRO Way" when it comes to administrating the particular system.

If you're kind of distro-agnostic, use distrowatch to check some statistics on popular usage and see what you think; one nice thing about popular distros is that it increases the chance you'll find help when you run into a speed bump as well as have an active community from which to gain confidence that the distro won't stagnate with updates.

If this is a company thing with actual money behind the project (I'm used to having a lot of side projects that are more like "can it be done" with no money rather than having an actual budget...) you may want to look at a company-backed distro with a support contract; a lot of businesses like having someone to blame if the system goes wonky. Red Hat is very big in this area, but you can also purchase Ubuntu support through Canonical, and any sale of support contracts to a Linux vendor supports the cause :-)

Last if this is also an actual company project you can try setting up some test servers or virtual machines and install a few different distros and load test your configuration. More often than not speed is a variable of your web server design (distributing your database, your load balancer, code execution path, caching server(s), etc.) than your distribution (a few tweaks to the compiler,...really that's the only thing I can think of offhand for differences in distro is compiled options of the packages). You can dig really deep on issues like hardware (memory? Processor? load balancing nics?) and stack performance while ignoring that the biggest variable is just having a well designed web application; the only way to really find out is to test your installation on a small testbed.

Another thing to consider is security (openBSD is very fast and capable while having an excellent security record), which can lead to increased cost in downtime if not thought through. Fastest server in the world doesn't buy much if you have it hacked.

Otherwise, the question is kind of vague because there's often improvements with each release of each distro that changes things, including some performance indicators. Again, though, distro changes rarely are as big a factor as application design. I mean...Gentoo always had a reputation for being fast since t was custom compiled, but I haven't heard anything about Gentoo in quite awhile, despite having a very devoted fanbase...and there are plenty of websites running happily on Ubuntu, Slack and Debian and Red Hat.

Good luck!

+1 for mentioning Gentoo... some people find the rolling release schedule problematic (not so much the compiling packages, that can be done on the Pre-Prod server, but the fact that you have to stay up to date even on stable to avoid a nightmare update scenario) while others swear by it since you never have to reinstall to get the "next version". Gentoo is a great server distro, especially for very lean systems. – Ophidian Jul 27 '09 at 16:20

There's not going to be much of a difference between the various distros in a typical environment. I've had good luck with:

  • Debian
  • CentOS

Of the two, I favor Debian. It's easy to upgrade packages, and there are typically sane defaults.

That said, there's another level of optimization that is unrealistic for most sites. Facebook, for example, modified the Linux kernel to improve performance. But theirs was a very unique situation.

In general, your application performance and architecture + your server stack (apache/nginx, etc.) is going to be much more important than what distro you choose.


This is a very vague question but I assume by "high performance" you mean heavy traffic. The distro will have very little to do with that really, it's more important which technology stack you choose.

That said, if you are building enterprise level applications, you might want to have some form of assurance and quality control by a vendor, so I'd go for either RedHat (CentOS if it has to be low-cost) or SuSE. Many servers are officially certified to run these two distros.

share is probably more appropriate place for your question. That said, the distribution has little effect on performance. The differences are more in ease of use and such things - the performance is determined by the web server (Apache?) settings, choice of other components (database etc.) and of course, hardware.

Who said the web server has to be Apache? – Artem Russakovskii Jul 27 '09 at 7:39
Added a question mark now. Well, Apache is what most people use. Not all, for sure. – mad-j Jul 27 '09 at 7:41

You could lookup DistroWatch for references (OpenSUSE?).
And, probably move this question to ServerFault.

Same as: Is there a preferred flavor of linux for hosting web applications?


The platform you should pick is the one that your admin is the most familiar/comfortable with. Speed mostly depends on design and the underlying hardware, system optimizations can be applied to all the Linux's the same, so the only thing that's left to make a difference is gcc/glibc versions, which are gonna account for a percent or two at max. Not worth it, just go with what you know best.