f3write using variable block sizes?
- Ngôn ngữ chính
- C
- Star
- 3.4k
- Fork
- 177
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
While wondering about the slowness of f3write, I ran strace on it.
Before I believed f3write would write 1MB blocks until the test file had 1GB of size, but during strace it seems f3write is actually using variable block sizes to write.
Example:
Block sizes seen:
```
...
1641984
1646080
1644032
1645056
1645568
1645568
1646080
1647104
1646592
1647104
1648128
...
1824768
1825280
1826304
1828352
1832448
1830400
1831424
1831936
1831936
1831424
1831424
1831936
...
```
Is that intentional?
The filesystem is VFAT directly on the device:
```
# blkid /dev/sda
/dev/sda: LABEL_FATBOOT="K-DT50-16G" LABEL="K-DT50-16G" UUID="3D08-B134" BLOCK_SIZE="512" TYPE="vfat"
# file - 32 MB), FAT (32 bit), sectors/FAT 14752, reserved 0x1, serial number 0x3d08b134, label: "K-DT50-16G "
```
Using `f3-8.0-bp156.3.6.x86_64` of OpenSUSE Leap 15.6.
Details
---
strace output looked like this:
```
...
fadvise64(3, 0, 0, POSIX_FADV_DONTNEED) = 0
write(1, "\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10 "..., 108) = 108
write(3, "\0R:(\0\0\0\0\21\316j[\2R:(\20\23B[4\234\325\266\1\36\337X!:\306\21"..., 1641984) = 1641984
fdatasync(3) = 0
fadvise64(3, 0, 0, POSIX_FADV_DONTNEED) = 0
write(1, "\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10 "..., 108) = 108
write(3, "\0`S(\0\0\0\0\21\240\342\\\2`S(\20aGq4@\305\271\1\260.\243\"$\326S"..., 1646080) = 1646080
...
```
so I extracted the write sizes with `awk '$1 == "write(3," { print $NF }'`.
When also using `strace` on `f3read` it seems the only block size being used is 2MB.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.