2 ms·
O_DIRECT is absurdly slow in my my experience.
by dekhn 4y ago
O_DIRECT is absurdly slow in my my experience.
- the8472 4y agoO_DIRECT is basically telling the OS to load a block of data straight from disk into your process memory, skipping all the caching, sharing, scheduling, coalescing and readaheads the OS normally does for you. Which means you now either must do all that yourself in userspace or you can use io_uring to have it happen in the background and get notified when it's done. But if the intent is to have multiple processes share the samedata then mmap likely is the better choice.