diff --git a/awscrt/s3.py b/awscrt/s3.py index c77f32c81..5294f61f8 100644 --- a/awscrt/s3.py +++ b/awscrt/s3.py @@ -187,15 +187,10 @@ class S3FileIoOptions: Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache. - Currently only Linux supports direct I/O. On unsupported platforms, the request transparently - falls back to buffered I/O and a warning is logged. + falls back to buffered I/O and a warning is logged. - Supported for both upload (send_filepath) and download (recv_filepath). - - For upload, part_size MUST be page-aligned when direct_io is enabled (hard fail otherwise). - The client controls part_size and is responsible for ensuring alignment. - - For download, this is a best-effort optimization. The request transparently falls back to - buffered I/O (logging a warning) if any of the following preconditions are not met: - part_size is not page-aligned, recv_file_position is not page-aligned (WRITE_TO_POSITION), - existing file size is not page-aligned (CREATE_OR_APPEND), or the last part has an - unaligned length (only that part falls back). + - This is a BEST-EFFORT optimization. The request transparently falls back to + buffered I/O (logging a warning) when direct io write fails. - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html In summary, O_DIRECT is a potentially powerful tool that should be used with caution.