X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_THEBAT,KHOP_THREADED,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Date: Wed, 27 Feb 2013 21:07:53 +0400 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <1854370913.20130227210753@mtu-net.ru> To: Adam Dinwoodie , cygwin AT cygwin DOT com Subject: Re: Is there a source of moderately random data with good speed in Cygwin? In-Reply-To: References: <1212475491 DOT 20130227184011 AT mtu-net DOT ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Greetings, Adam Dinwoodie! >> I was need to pipe some bytes through application and watch it's reaction. >> But with /dev/urandom the stream speed is only about 40Mb/sec. Using >> /dev/zero, however, makes it 3 orders of magnitude faster (~35Gb/s), but for >> technical reasons, using monotonous sequence is highly undesirable. Is there >> any more performant source of non-monotonous byte sequences available to >> Cygwin? I would be pretty happy even with sequential bytes, I think. Only two >> reservations are good performance (something around 100 Mb/sec or more would >> suffice) and a degree of randomness. > You want a source of data that's non-monotonous but faster than /dev/urandom. > I don't see how this is a Cygwin issue at all, and thus I don't think it > belongs on this list. I'm not very familiar with this kind of things in general, and as I'm writing scripts for Cygwin right now, I though there may be some Cygwin specifics in place. > Nonetheless, I suspect the easiest solution is to write a short C program to > produce your output, along the lines of (untested): > #include > int main () { > unsigned char c; > for (c = 0;; c++) > putchar(c); > } 6Mb/sec, but thanks for a try. > Alternatively, pre-cache some output and use that: > head --bytes=1G >/var/cache/randomdata > ./myapp <(while :;do cat /var/cache/randomdata; done) Seems, like that would be the most reasonable way of doing things. And since this is, apparently, not specific to Cygwin, I consider the question answered. -- WBR, Andrey Repin (anrdaemon AT freemail DOT ru) 27.02.2013, <20:42> Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple