4

I'd like to measure tmpfs performance by using dd. But it fail, like below:

# dd if=/dev/zero of=/tmp/128M bs=4M count=32 oflag=direct  
dd: failed to open ‘/tmp/128M’: Invalid argument

Any help?

4

2 回答 2

12

tmpfs 不支持直接 I/O 并返回 -EINVAL。

于 2014-09-29T18:45:46.260 回答
4

Vasily Tarasov 解决方案也适用于 NFS。我有:

dd if=/dev/urandom of=TEST.200GB iflag=direct bs=1M count=204800
dd: failed to open ‘/dev/urandom’: Invalid argument

然后我删除了iflag=direct并且它起作用了

于 2017-11-17T07:54:30.083 回答