unix - Using /dev/urandom for dd(disk performance) test is a good idea or not? -


to test disk performance have triggered dd test.when used /dev/urandom/ input file getting low performance

   dd if=/dev/urandom of=file_01.txt bs=8k count=3000    3000+0 records in    3000+0 records out    24576000 bytes (25 mb) copied, 3.16523 s, 7.8 mb/s 

but when used other file giving high performance.

   dd if=/root/test.dbg of=file_0521.txt bs=8k count=3000    3000+0 records in    3000+0 records out    24576000 bytes (25 mb) copied, 0.0606644 s, 405 mb/s 

how can bridge gap between these 2 numbers. use /dev/urandom/ dd test.which numbers have consider benchmark.why /dev/urandom giving low performance value.

you benchmarking /dev/urandom (see random(4)), not disk or dd. doing significant processing inside kernel (basically mixing real random source in-kernel prng).

you use hdparm benchmark disk. see this answer.

if insist on benchmarking disk dd, make once big file in tmpfs filesystem (perhaps using dd or head on /dev/urandom), benchmark dd copy temporary file disk.

btw, benchmark disk, need bypass file-system (and write raw partition on disk), since if using file in file system on disk, of work related page cache -used file system layer in kernel- , disk not used immediately, see sync(2)..


Comments

Popular posts from this blog

python - Mongodb How to add addtional information when aggregating? -

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

java - Incorrect order of records in M-M relationship in hibernate -