Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16964

I/O Path: Auto switch from BIO to DIO

Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • None
    • 3
    • 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:

      • There is no access locality;
      • The system is under memory pressure or high CPU usage;
      • A file is shared access under high contention from many clients;

      This ticket tracks this feature to automatically switch from BIO to DIO path.

      Attachments

        Issue Links

          Activity

            [LU-16964] I/O Path: Auto switch from BIO to DIO

            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.

            paf0186 Patrick Farrell added a comment - 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.

            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:
            https://review.whamcloud.com/c/fs/lustre-release/+/45616

            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.)

            paf0186 Patrick Farrell added a comment - 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: https://review.whamcloud.com/c/fs/lustre-release/+/45616 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.)

            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.

            adilger Andreas Dilger added a comment - 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.

            This seems a lot like LU-13802. Why duplicate the ticket and patch instead of starting with that patch?

            adilger Andreas Dilger added a comment - This seems a lot like LU-13802 . Why duplicate the ticket and patch instead of starting with that patch?

            "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51679
            Subject: LU-16964 llite: auto switch from BIO to DIO
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: e3e07e129ca55585af5831fd25cc07fa96d5394d

            gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51679 Subject: LU-16964 llite: auto switch from BIO to DIO Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e3e07e129ca55585af5831fd25cc07fa96d5394d

            People

              qian_wc Qian Yingjin
              qian_wc Qian Yingjin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: