Repository navigation
Default nogds to filesystem-aware O_DIRECT - #128
Merged
takeshi-yoshimura merged 1 commit intoOct 8, 2026
Merged
takeshi-yoshimura merged 1 commit into
takeshi-yoshimura merged 1 commit into
Conversation
Move the unified copier's filesystem policy into common.is_odirect_enabled and reuse it for nogds. Local and unknown filesystems now use direct I/O by default; known network filesystems and platforms without O_DIRECT retain buffered reads. Benchmark: H100 80GB (one GPU for Granite, four for DeepSeek). Use nogds, queue_size=2, device_memory_budget=-1, enforce-eager, max_model_len=32768, gpu_memory_utilization=0.97/0.8 respectively. NVMe is XFS at /opt/nvme/hf_home; /tmp/tyos/hf_cache is tmpfs. | Model (TP) | Storage | I/O | Cold mean | Warm mean | |--------------|---------|----------|-----------|-----------| | Granite (1) | NVMe | buffered | 11.625691 | 4.198456 | | Granite (1) | NVMe | direct | 4.890897 | 4.810586 | | Granite (1) | tmpfs | buffered | 4.504860 | 4.365668 | | Granite (1) | tmpfs | direct | 4.520546 | 4.242581 | | DeepSeek (4) | NVMe | buffered | 50.294593 | 16.138033 | | DeepSeek (4) | NVMe | direct | 15.921407 | 14.378360 | | DeepSeek (4) | tmpfs | buffered | 11.303327 | 11.471072 | | DeepSeek (4) | tmpfs | direct | 11.514589 | 13.038018 | Cold requests POSIX_FADV_DONTNEED before every load to drop page cache, while warm performs no eviction. I observed similar trends on different models. Some small models showed that bufferred I/O outperformed, but the gain was few seconds. So, in conclusion, I made O_DIRECT as default and let users disable it on some specific cases. Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
6 tasks done
takeshi-yoshimura
merged commit Oct 8, 2026
02560dc
into
foundation-model-stack:main
13 checks passed
Contributor
|
Thanks for landing this, and for the credit. I read the merged change and tried it on a GB10 (ext4/tmpfs/overlayfs) and a ZFS box; notes in #129, plus a small CI one in #130. None of it is urgent. BTW, happy to review before merge whenever that's useful to you. Tag me on anything touching the loaders or the copiers and I'll turn it around quickly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the unified copier's filesystem policy into common.is_odirect_enabled and reuse it for nogds. Local and unknown filesystems now use direct I/O by default; known network filesystems and platforms without O_DIRECT retain buffered reads.
Benchmark: H100 80GB (one GPU for Granite, four for DeepSeek). Use nogds, queue_size=2, device_memory_budget=-1, enforce-eager, max_model_len=32768, gpu_memory_utilization=0.97/0.8 respectively. NVMe is XFS at /opt/nvme/hf_home; /tmp/tyos/hf_cache is tmpfs.
Cold requests POSIX_FADV_DONTNEED before every load to drop page cache, while warm performs no eviction.
I observed similar trends on different models. Some small models showed that bufferred I/O outperformed, but the gain was few seconds. So, in conclusion, I made O_DIRECT as default and let users disable it on some specific cases.
Refs #110
Reported-by: @gitbisector