Henrik mentioned the problem of patches for MariaDB that ignore the Windows platform. I am guilty of this as MySQL on Windows is irrelevant to me. I am not alone. What contributions do we get from the MySQL on Windows community in patches, performance tests or bug reports? I have never seen a benchmark result for MySQL on Windows.
There is nothing wrong with this. The relationship between users and vendors for MySQL on Windows is different. This is an opportunity for vendors (Sun/MySQL, Monty Program, Innobase/Oracle, Percona, Pythian, Open Query) to add value. I suspect that Sun/MySQL and Innobase/Oracle already care a lot about MySQL on Windows. But maybe they should offer a discount for MySQL on Linux users to offset our contributions (insert smiley face).
As an example of the value that can be added, I filed bug 46957 because InnoDB does not appear to support concurrent IO requests per file on Windows. That is, there can be either 1 pending read or 1 pending write to a file. That might hurt performance. I wrote about this in March and while there were assertions that this couldn't be the case I am not aware of any progress. The basis for my claim is from reading the source. Maybe someone who builds and/or runs MySQL on Windows can confirm or deny this.
If you want to learn more about systems programming on Windows, this is the book to buy. I have an earlier edition of it. One day I will read it. I tried to learn more about WriteFile, ReadFile and why win32/win64 don't support the equivalent of pread/pwrite by searching online for 'WriteFile API' and 'WriteFile API site:mysql.com'. The results were disappointing. Am I expected to buy a copy of the API docs?
Thursday, August 27, 2009
Subscribe to:
Post Comments (Atom)


They're online. http://social.msdn.microsoft.com/Search/en-CA/?query=writefile&ac=8
ReplyDeleteThank you.
ReplyDelete> But maybe they should offer
ReplyDelete> a discount for MySQL on Linux users
that's how, in fact, MySQL AB (no, TcX DataKonsult AB) used to price MySQL before it became GPL.
Well, I'm not a MySQL developer, despite I work for MySQL, but that's not my job anyway (I'm a Sales Engineer). I.e. developing MySQL itself that is. I am reasonable at using MySQL as a developer, and I have contributed some MySQL stuff for Windows, which I think to an extent are cool. The mostly used one is MyQuery, which is a MySQL Query tool. But maybe I have been blogging enough about this so far? Anyway, I have a 3.1 version coming up soon with some features which might be unique (might be, as I haven't seen all MySQL query tools. Yet).
ReplyDeleteBut you are right, we should maybe try to get some more MySQL Windows contributions. Maybe I should have a shot at it myself anyway, assuming I can find the time.
Cheers
/Karlsson
Or there should be a premium for the version that is optimized for Windows. We already have MySQL classic, pro and advanced (http://www.mysql.com/oem/products.html).
ReplyDeleteThere has been a lot of development for tools to run on Windows clients. I ignored this or forgot about it. But I think my comments are valid for the server.
ReplyDeleteWindows is my desktop and development platform so I need MySQL to run on Windows but I don't care about performance and benchmarks because I will never deploy my apps on window, the production servers are linux.
ReplyDeleteMySQL on Windows performs very poorly, and it is not the fault of Windows nor Microsoft.
ReplyDeleteAlas, for several years, I was perhaps the only server developer who regularly did some work on Windows.
I had patches to fix and improve the I/O concurrency issues on Windows but none of them ever were pushed to the tree because of the "two reviewer" requirement and the absolute lack of any other developer with Windows development knowledge who were willing to review the code.
In a nutshell, the situation today is this: MySQL on Windows only really uses the APIs which existed at the time of Windows 95.
C'est la vié.
Same as Greg Lindholm : I only use Windows for dev, prod servers are under Linux.
ReplyDeleteAnyway, it's really sad that MariaDB and others isn't easily compilable under Windows.
AFAIK, only MySQL and InnoDB are easy to compile under Windows, without any modification to any file.
Just to clarify the previous comment, I don't know if MariaDB will be hard to get working on Windows, the point just was that until last week nobody had even tried. We certainly will have to get it working, so there is no need to panic.
ReplyDeleteHenrik
Windows pread/pwrite is actually a piece of cake :) And they are in MySQL codebase for about 1 year, though no idea when users will see them in a released version (it is in mysql-next etc, take a look at mysys/my_winfile.c for implementation of my_win_pread() for example.
ReplyDeleteAs I was told, uses native Windows async IO (FILE_FLAG_OVERLAPPED) on NT heritage Windows and syncs IO on Win95 heritage Windows. Win95 is really obsolete now and it would be nice if Innodb guys remove this portability layer.
On reading the code again, when os_aio_use_native_aio is set, then async IO is used for all (most?) IO requests from InnoDB. And it is set on windows as long as os_get_os_version() != OS_WIN95, OS_WIN31, OS_WINNT.
ReplyDeleteSo, InnoDB IO performance on Win XP and more recent systems might be better than it is on Linux.