[GH-ISSUE #99] 3FS Storage direct_io ALIGN_SIZE should adapt to real disk sector size, may be 512 or 4096 #57

Closed
opened 2026-10-26 09:44:16 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @qsfang on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/99

Image

ALIGN_SIZE should better be a variable get from nvme disk parameter

Originally created by @qsfang on GitHub (Mar 5, 2025). Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/99 ![Image](https://github.com/user-attachments/assets/b33eb32f-6fb5-45f8-807f-3440919fd79c) ALIGN_SIZE should better be a variable get from nvme disk parameter
Author
Owner

@zartbot commented on GitHub (Mar 5, 2025):

some SSD only support 4K, it may cause IO hang issue with 4K-not-aligned WRITE, use the following cmd could check the sector size, just FYI.

root@3fs-storage001:~# nvme id-ns /dev/nvme7n1 -H | tail -n 5
nvmsetid: 0
endgid  : 0
nguid   : 00000000000000000000000000000000
eui64   : 90bd803b61800000
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best (in use)

root@3fs-storage001:~# blockdev --getpbsz /dev/nvme7n1
4096
<!-- gh-comment-id:2700916541 --> @zartbot commented on GitHub (Mar 5, 2025): some SSD only support 4K, it may cause IO hang issue with 4K-not-aligned WRITE, use the following cmd could check the sector size, just FYI. ```bash root@3fs-storage001:~# nvme id-ns /dev/nvme7n1 -H | tail -n 5 nvmsetid: 0 endgid : 0 nguid : 00000000000000000000000000000000 eui64 : 90bd803b61800000 LBA Format 0 : Metadata Size: 0 bytes - Data Size: 4096 bytes - Relative Performance: 0 Best (in use) root@3fs-storage001:~# blockdev --getpbsz /dev/nvme7n1 4096 ```
Author
Owner

@SF-Zhou commented on GitHub (Mar 5, 2025):

It should indeed be a configurable parameter. For now, as a temporary solution, users can modify the constant in the code and compile a compatible binary.

<!-- gh-comment-id:2701108620 --> @SF-Zhou commented on GitHub (Mar 5, 2025): It should indeed be a configurable parameter. For now, as a temporary solution, users can modify the constant in the code and compile a compatible binary.
Author
Owner

@xiaoyaoyouyue commented on GitHub (Mar 12, 2025):

我也遇到了这个问题,请问下,这个查询出来后怎么修改,感觉整个文件系统写入都很卡,IO ERROR

<!-- gh-comment-id:2716835720 --> @xiaoyaoyouyue commented on GitHub (Mar 12, 2025): 我也遇到了这个问题,请问下,这个查询出来后怎么修改,感觉整个文件系统写入都很卡,IO ERROR
Author
Owner

@zartbot commented on GitHub (Mar 12, 2025):

我也遇到了这个问题,请问下,这个查询出来后怎么修改,感觉整个文件系统写入都很卡,IO ERROR

Checkout the lastest version #158 already fixed this problem

<!-- gh-comment-id:2717961429 --> @zartbot commented on GitHub (Mar 12, 2025): > 我也遇到了这个问题,请问下,这个查询出来后怎么修改,感觉整个文件系统写入都很卡,IO ERROR Checkout the lastest version #158 already fixed this problem
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/3FS#57
No description provided.