Wanting to generate some random-ish data to perform some disk io
testing, in a similar vein to that which Nathan did on Wednesday.
Discovered that /dev/urandom on this host seems to only allow a maximum
read() of 1040 bytes per request:
stampy[/scratch/mjch/diskio] 118v>: dd if=/dev/urandom bs=1024k count=1
of=blah
0+1 records in
0+1 records out
stampy[/scratch/mjch/diskio] 119v>: ls -al blah
-rw------- 1 mjch staff 1040 Mar 20 10:26 blah
stampy[/scratch/mjch/diskio] 120v>: truss dd if=/dev/urandom bs=1024k
count=1 of=blah
execve("/usr/bin/dd", 0xFFBFF3AC, 0xFFBFF3C4) argc = 5
resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
resolvepath("/usr/bin/dd", "/usr/bin/dd", 1023) = 11
:
:
sigaction(SIGINT, 0xFFBFF170, 0xFFBFF210) = 0
sigaction(SIGINT, 0xFFBFF170, 0xFFBFF210) = 0
read(3, " -87DD oD7A4149C U #F801".., 1048576) = 1040
write(4, " -87DD oD7A4149C U #F801".., 1040) = 1040
close(4) = 0
close(1) = 0
fstat64(2, 0xFFBFE2B0) = 0
0+1write(2, " 0 + 1", 3) = 3
records in
write(2, " r e c o r d s i n\n", 12) = 12
0+1write(2, " 0 + 1", 3) = 3
records out
write(2, " r e c o r d s o u t".., 13) = 13
_exit(0)
stampy[/scratch/mjch/diskio] 121v>: dd if=/dev/urandom bs=512 count=2048
of=blah
2048+0 records in
2048+0 records out
stampy[/scratch/mjch/diskio] 122v>: ls -al blah
-rw------- 1 mjch staff 1048576 Mar 20 10:46 blah
The host is
Solaris 10 8/07 s10s_u4wos_12b SPARC
Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 August 2007
The manual entry for urandom doesn't mention a limit on requests ...
haven't yet found anything on SunSolve about this, but I'm still looking
... has anyone else seen similar behaviour?
Regards,
Malcolm
--
Malcolm Herbert This brain intentionally
mjch at mjch.net left blank