Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've just read this article: http://dev.mysql.com/tech-resources/articles/move_from_microsoft_SQL_Server.html

There it says that MySQL on Windows is a good choice. (or is what I've understood)

In the article I don't understand if he says that MySQL on Windows is better than on Linux, or just that MySQL on Windows is good enough as Linux.

Now my doubt is: if I can choose a server dedicated to MySQL and I have to choose between Windows Server 2012 and a free GNU/Linux server distro, which one would have better performances?

May you guys help me understand this?

share|improve this question
add comment

3 Answers

I would suggest that you use MySQL on Linux. There are very good reasons why Linux is a better over windows, but some of the big ones are; stability, security and total operating costs. Granted, with Linux it may be more complicated to set-up configs and daemons to ensure your server is running properly, but in the end, it is worth the setup.

You might have heard about LAMP stack (Linux, Apache, MySQL PHP/Perl/Python) for online applications. LAMP is a proven technology stack used by the most popular Web sites in the world including Facebook, Google, Twitter, YouTube, Craigslist and Zappos.

Go ahead with Linux ....

share|improve this answer
    
Thanks I know that GNU/Linux servers have lot of advantages, in fact I use them usually. But my question is just about the performances of MySQL on the two different platforms. –  Fez Vrasta Nov 22 '13 at 12:55
    
This is something like you have to benchmark yourself.. but MySQL claims there is significant gain in performance using v5.5 than v5.1 on Windows dev.mysql.com/tech-resources/articles/5.5/… –  Mahesh Patil Nov 22 '13 at 13:44
    
You can easily imagine that perform this kind of benchmark is quite expensive, this is why I've asked here. –  Fez Vrasta Nov 22 '13 at 13:47
    
Yes.. I can understand but there are lot of factors involved .. Have a look at this poll which clearly states Linux is winner mysqlperformanceblog.com/2012/11/30/… –  Mahesh Patil Nov 22 '13 at 13:50
    
I don't think a poll like that can states a winner, most of people use a Linux server just because they have it for the rest of their websites/applications or because MS is too expensive. –  Fez Vrasta Nov 22 '13 at 13:52
show 1 more comment

I would get away from Windows for a very big reason ... OS CACHING !!!

The OS tends to take responsibility for caching disk caches and a server crash can easily lose data.

Even if all your data are InnoDB, the Windows version of MySQL does not support the option called innodb_flush_method called O_DIRECT. Linux has mechanisms in place to dictate how and when to flush changes to data files. Those mechanisms do not exist in Windows according the MySQL Documentation on innodb_flush_method which says in the very first paragraph:

Controls the system calls used to flush data to the InnoDB data files and log files, which can influence I/O throughput. This variable is relevant only for Unix and Linux systems. On Windows systems, the flush method is always async_unbuffered and cannot be changed.

I wrote about the importance of innodb_flush_method : See my post Clarification on MySQL innodb_flush_method variable

Using Windows always leaves buffered data being flushed to disk solely at the discretion of Windows. You simply cannot take that risk, especially for a production database with heavy writes.

Please switch over to Linux ASAP.

MySQL being a better DBMS for Windows than SQL Server is open to much debate. I am sure SQL Server probably has been code to accommodate that Windows deficiency I just mentioned. I'll let the SQL Server big boys chime in on that issue.

share|improve this answer
    
The problem is also that Windows OS handles thread mutexes and multithreading less efficient vs an Linux/Unix OS... the default MySQL source code is better optimized to run on an Linux/Unix server... innodb_flush_method with O_DIRECT would bypass the disk page (read disk cache) so ACID transactions are more improved... if you dont use O_DIRECT on linux/unix you could still loose the disk cache data (also the reason why you want to have battery backup RAID controllers) still waiting on RRAM/ReRAM read crossbar-inc.com/events/press-releases/…. –  Raymond Nijland Nov 22 '13 at 22:08
    
RRAM/ReRAM will bring real possibilites (data warehouses and big data) see it as an SSD with the speed off native RAM.. imagine if you can select data from your ReRAM chip and JOIN it on your GPU to get much better performance vs CPU's. also still waiting when Oracle build GPU accelerating into MySQL and Oracle database. As an draw back SQL optimizers should be completly redesigned/refactored to make them recognize these fast hardware options and give better hardware optimizing costs.. because copy from cpu to gpu also takes time for an small number of rows so running on an cpu may be better.. –  Raymond Nijland Nov 22 '13 at 22:25
add comment

There are advantages of using Linux as you base for mysql, as others have already covered, but from a performance point of view for many applications you will not see the difference particularly.

While Linux would be my default recommendation too make sure you consider your experience (and that of the people you can immediately call upon if something goes wrong). If you are familiar with Windows but have little sysadmin experience with Linux, go with Windows. Having the knowledge to fix certain things when they go wrong may prove much more important than a performance gain while things are going right, and if got know Windows like the back of your hand you may be able to tune it to the point where it performs better than a similar Linux install that you might produce. Likewise if you have a preference for or more experience with Linux go with that for the same reasons.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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