On Sun, 10 Jan 2010, Phil Harman wrote:
In performance terms, you'll probably find that block sizes beyond 128K add
little benefit. So I'd suggest something like:
dd if=/dev/urandom of=largefile.txt bs=128k count=65536
dd if=largefile.txt of=./test/1.txt bs=128k &
dd if=largefile.txt of=./test/2.txt bs=128k &
As an interesting aside, on my Solaris 10U8 system (plus a zfs IDR),
dd (Solaris or GNU) does not produce the expected file size when using
/dev/urandom as input:
% /bin/dd if=/dev/urandom of=largefile.txt bs=131072 count=65536
0+65536 records in
0+65536 records out
% ls -lh largefile.txt
-rw-r--r-- 1 bfriesen home 65M Jan 10 09:32 largefile.txt
% /opt/sfw/bin/dd if=/dev/urandom of=largefile.txt bs=131072
count=65536
0+65536 records in
0+65536 records out
68157440 bytes (68 MB) copied, 1.9741 seconds, 34.5 MB/s
% ls -lh largefile.txt
-rw-r--r-- 1 bfriesen home 65M Jan 10 09:33 largefile.txt
% df -h .
Filesystem Size Used Avail Use% Mounted on
Sun_2540/zfstest/defaults
1.2T 66M 1.2T 1% /Sun_2540/zfstest/defaults
However:
% dd if=/dev/urandom of=largefile.txt bs=1024 count=8388608
8388608+0 records in
8388608+0 records out
8589934592 bytes (8.6 GB) copied, 255.06 seconds, 33.7 MB/s
% ls -lh largefile.txt
-rw-r--r-- 1 bfriesen home 8.0G Jan 10 09:40 largefile.txt
% dd if=/dev/urandom of=largefile.txt bs=8192 count=1048576
0+1048576 records in
0+1048576 records out
1090519040 bytes (1.1 GB) copied, 31.8846 seconds, 34.2 MB/s
It seems that on my system dd + /dev/urandom is willing to read 1k
blocks from /dev/urandom but with even 8K blocks, the actual blocksize
is getting truncated down (without warning), producing much less data
than requested.
Testing with /dev/zero produces different results:
% dd if=/dev/zero of=largefile.txt bs=8192 count=1048576
1048576+0 records in
1048576+0 records out
8589934592 bytes (8.6 GB) copied, 20.7434 seconds, 414 MB/s
WTF?
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss