List:MySQL on Win32« Previous MessageNext Message »
From:Peter Carter Date:July 28 1999 6:44pm
Subject:Re: Win32 MySQL vs. Linux MySQL
View as plain text  
At 11:21 AM 7/28/99 -0400, you wrote:
>My guess would be that between Linux and Windows NT you would see little
>difference on the same hardware, and that if you see any difference NT would
>be slightly faster. Here is why:
>
>1. MySQL heavily uses threads, and Win32 threads work a little better than
>Linux threads.
>2. NT has a multi-threaded filesystem with delayed writes and lots of other
>optimizations. Linux still has a single-threaded file system.
>
>In either case, the amount of RAM you allocate to mysqld and the speed of
>your disk will probably be far, far larger factors.
>
>

Let's choose a OS for the right reasons. Understand what the application
wants, and what an OS can give it.

Yes, NT *does* have a superior threading engine and it has been applied to
the file system. However, the environment has not been designed for
efficiency. It has been designed for functionality. The levels of code
required to get to a bottom subsystem (ie: file system , network or
allocation of memory) is 5 or six times that of a typical UNIX. The fact is
that any application is hit in all directions for every system wide
resource it wants to use. This is compounded by MFC code that abstracts
code even further.

You *can* customize an NT box to perform better for a target application.
You *can* do the same for a UN*X box. My experience has shown me that the
UN*X box will do far better and with less hardware.

Now I have stated general rules of thumb. Reality is that one dialect of
UN*X *may* not be that much better than NT when running MySQL. Here are
some REAL reasons you should consider for a platform.

1) MySQL does not require a super-fast file system. The application cache's
the data quite well. Drive IO is not a big factor in choosing a platform.
Linux's strength is a super fast drive system. NT's strength is a
transaction-based file system (NTFS), which means it can be recovered
(rolled back). Since speed is not an issue, I would have a preference for
the latter.

2) MySQL is boring for it's need of system features, but can be CPU
intensive if you do big reports or internal manipulations (joins,
concats....). Although Linux is feature rich, I have major problems with
it's interrupt latency. It leads to inconsistent behavior. NT has a relaxed
scheduler. An app can steal as much CPU as it needs. This can be good here,
if the box has no other function but to serve MySQL requests. The BSD's
have much better task schedulers.

3) MySQL needs a good thread environment. NT is about the best. Solaris has
good support. Linux is quite well debugged. FreeBSD 4.x has a good and fast
implementation of threads. OpenBSD and NetBSD are just not there yet in
this regard.

So, with these pros and cons listed above I come down to three choices. 

1) If your server is servicing a WWW environment (ie: simple selects and
in-and-out with 3 hail Maries) NT is a really bad choice, due to it's
latency issues. FreeBSD is the best due to it's superior CPU scheduling and
low connect latency. Solaris is a close second for the same reasons. 

2) If this server is for a more traditional application-support style of
role, a dedicated NT box is OK, but Solaris or FreeBSD makes better use of
CPU. NT (NTFS) would recover better from a crash. But of all the OS's
listed, NT is the most likely to crash.

3) If your server and applications can live in the same box, do so.
Internal network chatter is much faster than external. 1BILLIONbaseT is
pretty good.... ;)


There you have it, my opinions and why.

For the record, I am an OS level developer stuck in an application level
world. I have been actively programming NT since 3.1, Windows since
Windows/286/386 (pre 3.0), Linux since 0.99.12, FreeBSD since 2.1, OpenBSD
since 2.3 and when forced, Solaris. I will never admit to my XENIX days....

---
Peter B. Carter (peterc@stripped)
Pager: 613-751-4660
http://www.pbc.ottawa.on.ca

Thread
Win32 MySQL vs. Linux MySQLRobert B├╝tof27 Jul
Re: Win32 MySQL vs. Linux MySQLChristopher R. Jones28 Jul
  • Re: Win32 MySQL vs. Linux MySQLSimson L. Garfinkel28 Jul
    • Re: Win32 MySQL vs. Linux MySQLPeter Carter28 Jul
  • Re: Win32 MySQL vs. Linux MySQLSimson L. Garfinkel28 Jul
    • Re: Win32 MySQL vs. Linux MySQLPeter Carter29 Jul
      • Re: Win32 MySQL vs. Linux MySQLMichael Widenius2 Aug