Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Currently, when a client is reading a sparse file, it doesn't know whether there is data for any particular file offset, so it will pre-allocate pages and set up the RDMA for the full range of the reads. If the file is sparse (has a hole in the allocation) or has unwritten extents that return zeroes on read, the OST will zero full all of the requested pages, and transfer the zeroes over the network.

      It would be desirable to avoid sending the pages of zeroes over the network, to reduce network bandwidth and some CPU overhead on the OSS to zero out the pages. IIRC, the BRW WRITE reply returns an array of rc values for each page to indicate success/failure for each one. I would expect BRW READ to return a special state for each page that indicates that it is a hole.

      However, this is also complicated by the RDMA configuration, since it has already mapped the pages from the read buffer (which may be specific page cache pages). The best solution would be for the LNet bulk transfer to "not send" those pages in the middle of the RDMA, and have LNet (or the RDMA engine) zero-fill the pages on the client without actually sending them over the wire, but i have no idea about how easy or hard that is to implement.

      Failing that, if the holes are packed in the server-side bulk transfer setup (and it is possible to send only the first pages in a shorter bulk transfer), then the client would need to memcpy() the data into the correct pages (from last page to first) and zero the pages in the hole itself. That would add CPU/memory overhead on the client, and would not work for RDMA offload like GDS.

      Attachments

        Issue Links

          Activity

            [LU-16897] Optimize sparse file reads
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 42058 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41933 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41637 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41560 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41517 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41501 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41469 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41364 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41335 ]
            maloo Maloo made changes -
            Remote Link New: This issue links to "Page (Whamcloud Community Wiki)" [ 41285 ]

            People

              cbordage Cyril Bordage
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated: