[LU-16964] I/O Path: Auto switch from BIO to DIO Created: 14/Jul/23 Updated: 03/Aug/23 Resolved: 03/Aug/23 |
|
| Status: | Closed |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Qian Yingjin | Assignee: | Qian Yingjin |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Severity: | 3 | ||||||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||||||
| Description |
|
We design a hybrid I/O path engine to perform buffered I/O as direct I/O. It can switch from the default buffered I/O to direct I/O path and allow the buffered I/O which meets the requirements and conditions to perform I/O in direct mode appropirately. It is completely implemented inside the file system, and there is no need any changes for applications. In the user space the application does simple read() or write() calls. The filesystem decides internally to do buffered I/O via page cache, or switch to unligned (or aligned if possible) direct I/O accordingly. i.e. to obtain better performance, the client can use buffered I/O for samll I/O size and direct I/O for large I/O size. For the sequential write, it can perform buffer I/O when the file is in small size at the beginning, and switch to high efficient direct I/O when the file is gradually growing large or the system memory is under pressure. Switching to use direct I/O may provide some performance benefits in the following cases:
This ticket tracks this feature to automatically switch from BIO to DIO path. |
| Comments |
| Comment by Gerrit Updater [ 14/Jul/23 ] |
|
"Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51679 |
| Comment by Andreas Dilger [ 14/Jul/23 ] |
|
This seems a lot like LU-13802. Why duplicate the ticket and patch instead of starting with that patch? |
| Comment by Andreas Dilger [ 14/Jul/23 ] |
|
Yingjin, how does this handle unaligned input pages from userspace? That was the problem that Patrick hit in LU-13802, which is why he is working on the DIO bounce buffer patch https://review.whamcloud.com/45616 "LU-13805 clio: bounce buffer for unaligned DIO". It would be good to discuss such CLIO changes with Patrick in advance rather than jumping in and developing a large patch that is conflicting with the work that Patrick is already doing. I'm happy to see improvements to IO performance, but we don't have enough developers to have two of them duplicating their efforts. |
| Comment by Patrick Farrell [ 14/Jul/23 ] |
|
The patch here handles the unaligned case by skipping it, so it only does aligned stuff. That's not going to be very useful, but it can be a stepping stone. The LU is kind of a duplicate of LU-13802. Mostly I think this is not very useful until LU-13805 is done. But it's not terrible to get started on this part of things. What would be most helpful now is to review the patch series starting with: Which still has a bunch of supporting patches that need to land before getting to the main patch(es). (There are still some bugs with the main patches as well, but we need to get all of the supporting patches in first anyway.) |
| Comment by Patrick Farrell [ 03/Aug/23 ] |
|
This is a duplicate of LU-13802, and exactly what was discussed in my LUG presentation in May 2023. It's a good writeup, so maybe we can copy this to that ticket, but this is not a new feature suggestion. The ability to do LU-13802 is why LU-13805 is being worked on, so let's put the work on those tickets. |