On Fri, 20 Mar 2009 11:50 +1100, "Richard Smith" <Richard.Smith at Sun.COM> wrote: > Malcolm Herbert wrote: > > 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: > > Looks like its hardcoded via MAXRETBYTES macro: > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/random.c#61
OK, that seems to be the explanation ... > In the case of /dev/urandom, since it is attempting to supply relatively > high-quality random > bits based on entropy from various sources in a system, you're like to > exhaust it very quickly > using it to fill i/o buffers. A pseudo-random number generator may be more > appropriate for this. sure - that was why the request was for only 1MB or so - as Nathan had, I was intending on duplicating that data to do the actual write tests no, the thing that had me confused was that I don't recall Nathan running into this issue during the talk and didn't think the command he'd used to generate the test data in the first place was anything other than the simple dd I'd given earlier, although he may have just used the default 512 byte blocks where I'd tried to be smart and raised that to 1MB ... -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank
