[MDEV-30517] On windows 11, difference of innodb_flush_method=O_DIRECT vs. innodb_flush_method=unbuffered Created: 2023-01-31 Updated: 2023-02-01 Resolved: 2023-01-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Windows, Storage Engine - InnoDB |
| Affects Version/s: | 10.7.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Mitchell Lee | Assignee: | Vladislav Vaintroub |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 11 22H2 |
||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Questioning to highlight the issue to fix better
Thing is that the option innodb_flush_method=unbuffered seems may make more delay when IO intensive situation while innodb_flush_method=O_DIRECT working with not so much of delay or waiting. |
| Comments |
| Comment by Vladislav Vaintroub [ 2023-01-31 ] |
|
Surprisingly, there is no difference between O_DIRECT and unbuffered in the recent versions of MariaDB. On Windows, neither data files, nor redo log is cached in this case (unless innodb_flush_log_at_trx_commit=2), which makes O_DIRECT method equal to unbuffered/async_unbuffered. Having, caching redo log in the file system makes no sense anyway, as every write is followed by flush. |
| Comment by Mitchell Lee [ 2023-02-01 ] |
|
Fun part is no one pointing and noticed and ready to apology since behavior of the configuration not matched as the online manual. Interesting. In short. |
| Comment by Vladislav Vaintroub [ 2023-02-01 ] |
|
1. I checked the manual . O_DIRECT is allowed to use (Quoting https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_method, 2. If you translate how O_DIRECT is documented (see the link above) into OS-neutral language, following will come out I conclude, the documentation is consistent, and O_DIRECT can be the same as async_unbuffered, or unbuffered 3. innodb_flush_log_at_trx_commit=2 indeed implies caching in file system. Unlike innodb_flush_log_at_trx_commit=1, the data can be combined before it is flushed. Now that your questions are hopefully all answered, I'd like to point out, that JIRA is not a place to ask questions. https://mariadb.zulipchat.com/ is. |
| Comment by Mitchell Lee [ 2023-02-01 ] |
|
Thanks for your effort for that taken as question. But, in short, it was kinda claiming as an issue. |