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

"innodb_doublewrite = off" possibly dangerous recommendation #2825

Closed
brenc opened this issue Jul 16, 2019 · 7 comments
Closed

"innodb_doublewrite = off" possibly dangerous recommendation #2825

brenc opened this issue Jul 16, 2019 · 7 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@brenc
Copy link

brenc commented Jul 16, 2019

Just upgraded to 1.2.4 and the installer recommended a bunch of MySQL settings, one of them being innodb_doublewrite = off if you're using SSDs. I did some checking and I'm finding is that this setting can be dangerous depending on your filesystem (it can lead to data corruption). Here is some discussion on the matter. I have removed this setting from our installation.

@interduo
Copy link
Contributor

Use ZFS and forget about that.

@brenc
Copy link
Author

brenc commented Jul 16, 2019

We don't have that option unfortunately.

@flying-bigbird
Copy link

flying-bigbird commented Jul 17, 2019 via email

@interduo
Copy link
Contributor

We don't have that option unfortunately.

So the recommendation should be conditional 'If ZFS turn off doublewrite'.

@cigamit
Copy link
Member

cigamit commented Jul 19, 2019

I'm going to have to agree here. From research in the last few days by both @netniV and I, we can see that there are two cases at least, where this can be safely disabled, ZFS and FusionI/O cases. Otherwise, you can loose your database if someone pulls the plug or you abruptly loose power.

@cigamit cigamit added the bug Undesired behaviour label Jul 19, 2019
@cigamit cigamit added this to the v1.2.6 milestone Jul 19, 2019
cigamit added a commit that referenced this issue Jul 19, 2019
"innodb_doublewrite = off" possibly dangerous recommendation
@cigamit cigamit added the resolved A fixed issue label Jul 19, 2019
@brenc
Copy link
Author

brenc commented Jul 19, 2019

I would even go further and say that many of these settings are probably overkill for most people. I manage a fairly high qps database cluster that uses hardware RAID and SSDs and I don't even set most of these. They're not necessary except under certain circumstances and can cause other side effects. Nothing else explicitly dangerous though like this doubewrite setting.

@netniV
Copy link
Member

netniV commented Jul 19, 2019

Yeah hardware raid trumps double write in my opinion. This is why the SQL recommendations are just that and not enforced aside from utf8

@cigamit cigamit closed this as completed Jul 23, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

5 participants