6

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?

user3170177
  • 61
  • 1
  • 4

2 Answers2

14

tmpfs does not support direct I/O and returns -EINVAL.

Vasily Tarasov
  • 141
  • 1
  • 3
5

Vasily Tarasov solution worked with NFS too. I had:

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

then I have removed iflag=direct and it worked

BiG_NoBoDy
  • 71
  • 1
  • 7