f3write using variable block sizes?
- 主要言語
- C
- スター
- 3.4k
- フォーク
- 177
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 2
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。