Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL expects AIO and DIO #2872

Closed
behlendorf opened this issue Nov 6, 2014 · 9 comments
Closed

MySQL expects AIO and DIO #2872

behlendorf opened this issue Nov 6, 2014 · 9 comments
Labels
Type: Documentation Indicates a requested change to the documentation

Comments

@behlendorf
Copy link
Contributor

From #2864: I can't move on to the HEAD, as it reports AIO as supported, but there's no direct IO support yet - this breaks mysql innodb engine, it tries to use both AIO and Direct IO, but only detects if AIO support is present. Effectively this nukes all MySQL instances and as we're OpenVZ based container host, people would kill me.

@devonbessemer
Copy link

Out of curiosity, are you running containers from a ZFS mount or a zvol? How does ZFS handle direct I/O to an ext4 zvol? As I assume you would need to run an ext4 zvol for OpenVZ to support second level quotas (user/groups) inside the container?

@behlendorf
Copy link
Contributor Author

@devonblzx Unfortunately I'm not sure of all the details. I only filed this because I've heard reports of problems when MySQL on master when AIO is supported for normal ZFS filesystems but not Direct IO. I'd expect that ext4 on a zvol would behave just fine. If someone familiar with the exact issue could provide additional details that would be helpful.

@devonbessemer
Copy link

@behlendorf Ah, thank you, I just realized you were quoting someone else from the other issue.

@snajpa
Copy link
Contributor

snajpa commented Nov 14, 2014

It was me who reported it originally :)
I see no point in stacking ext4 on top of ZVOL, so we're using filesystem type datasets directly.

This thing can be worked around by disabling AIO in InnoDB:

innodb_use_native_aio = 0
innodb_use_atomic_writes = 0 # Enabling this would force AIO in Oracle MySQL 5.6 and MariaDB 10
innodb_flush_method = O_DSYNC # this one is only advisable, not needed

Default behavior of MySQL InnoDB with default config in most of the distributions is to detect presence of AIO and then switch it on if present. However then it requires DIO as well, at which point it doesn't fall back to the old behavior, it just fails to load InnoDB engine, resulting in MySQL shutdown.

@behlendorf
Copy link
Contributor Author

@snajpa Thanks for the concise summary. It sounds like this is something we'll need to somehow address before the next tag. We don't want to be breaking anyones MySQL installation even if it is due to an issue with MySQLs auto-detection code.

@behlendorf behlendorf added Type: Documentation Indicates a requested change to the documentation and removed Bug - Major labels Feb 17, 2015
@behlendorf
Copy link
Contributor Author

@snajpa while I would have liked to address this for 0.6.4 I don't want O_DIRECT support to hold up the next tag any longer. This is just something we're going to have to explicitly call out in the release notes.

@snajpa
Copy link
Contributor

snajpa commented Feb 18, 2015

I understand, I've meanwhile tinkered with the code a bit, commented out the three AIO functions mappings in the vfs operations struct, so it's not really a pressing issue at all, we're now using HEAD as I mentioned in my other tickets.

@rageagainstthebugs
Copy link

O_DIRECT is ready in a584ef2, can this ticket be closed?

@behlendorf
Copy link
Contributor Author

@rageagainstthebugs yes, I believe so. O_DIRECT will be included in 0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Indicates a requested change to the documentation
Projects
None yet
Development

No branches or pull requests

4 participants