<div dir="ltr">Turns out this doesn't increase the test performance any as it is actually I/O bound on my system.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 6, 2013 at 12:36 AM, Joseph Glanville <span dir="ltr"><<a href="mailto:joseph@cloudscaling.com" target="_blank">joseph@cloudscaling.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
tests/008 | 2 +-<br>
tests/009 | 2 +-<br>
tests/018 | 2 +-<br>
tests/019 | 2 +-<br>
tests/020 | 2 +-<br>
tests/030 | 6 +++---<br>
tests/035 | 2 +-<br>
tests/049 | 2 +-<br>
tests/055 | 6 +++---<br>
tests/056 | 2 +-<br>
tests/fastrandom | 2 ++<br>
11 files changed, 16 insertions(+), 14 deletions(-)<br>
create mode 100755 tests/fastrandom<br>
<br>
diff --git a/tests/008 b/tests/008<br>
index 1af5bcf..adec553 100755<br>
--- a/tests/008<br>
+++ b/tests/008<br>
@@ -33,7 +33,7 @@ for i in `seq 0 4`; do<br>
done<br>
<br>
for i in `seq 0 4`; do<br>
- dd if=/dev/urandom | $COLLIE vdi write test$i -p 7000 &<br>
+ ./fastrandom | $COLLIE vdi write test$i -p 7000 &<br>
done<br>
<br>
sleep 3<br>
diff --git a/tests/009 b/tests/009<br>
index e139524..29dec5c 100755<br>
--- a/tests/009<br>
+++ b/tests/009<br>
@@ -31,7 +31,7 @@ $COLLIE vdi create test 80M -P<br>
_kill_sheep 2<br>
<br>
# write data to the vdi<br>
-cat /dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
<br>
# restart the 3rd node<br>
_start_sheep 2<br>
diff --git a/tests/018 b/tests/018<br>
index d8af69b..6f18516 100755<br>
--- a/tests/018<br>
+++ b/tests/018<br>
@@ -25,7 +25,7 @@ $COLLIE cluster format -c 2<br>
<br>
$COLLIE vdi create test 4M<br>
<br>
-dd if=/dev/urandom | $COLLIE vdi write -w test<br>
+./fastrandom | $COLLIE vdi write -w test<br>
<br>
$COLLIE vdi flush test<br>
<br>
diff --git a/tests/019 b/tests/019<br>
index 98fc2b8..78b91f9 100755<br>
--- a/tests/019<br>
+++ b/tests/019<br>
@@ -25,7 +25,7 @@ $COLLIE cluster format -c 2<br>
<br>
$COLLIE vdi create test 4M<br>
<br>
-dd if=/dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
<br>
for port in `seq 0 2`; do<br>
$COLLIE vdi read test -p 700$port | md5sum > /tmp/csum.$port<br>
diff --git a/tests/020 b/tests/020<br>
index 6fe2e32..b6d00bc 100755<br>
--- a/tests/020<br>
+++ b/tests/020<br>
@@ -25,7 +25,7 @@ $COLLIE cluster format -c 2<br>
<br>
$COLLIE vdi create test 40M<br>
<br>
-dd if=/dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
<br>
# check cache size, should be 20 * 80%<br>
nr=`ls $STORE/0/cache/7c2b25 | wc -l`<br>
diff --git a/tests/030 b/tests/030<br>
index 7c5ed98..f693183 100755<br>
--- a/tests/030<br>
+++ b/tests/030<br>
@@ -25,15 +25,15 @@ $COLLIE cluster format -c 2<br>
<br>
$COLLIE vdi create test 8M<br>
<br>
-dd if=/dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
$COLLIE cluster snapshot<br>
$COLLIE vdi read test | md5sum > /tmp/csum.1<br>
<br>
-dd if=/dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
$COLLIE cluster snapshot<br>
$COLLIE vdi read test | md5sum > /tmp/csum.2<br>
<br>
-dd if=/dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
$COLLIE cluster snapshot -l | _filter_date<br>
<br>
$COLLIE cluster snapshot -R 2<br>
diff --git a/tests/035 b/tests/035<br>
index 5b948c9..0dee9ee 100755<br>
--- a/tests/035<br>
+++ b/tests/035<br>
@@ -35,7 +35,7 @@ _wait_for_sheep 6<br>
$COLLIE cluster format -c 3 -m unsafe<br>
<br>
$COLLIE vdi create test 40M<br>
-dd if=/dev/urandom | $COLLIE vdi write test &<br>
+./fastrandom | $COLLIE vdi write test &<br>
<br>
sleep 3<br>
# Test write timeout<br>
diff --git a/tests/049 b/tests/049<br>
index 1336b5f..e95f643 100755<br>
--- a/tests/049<br>
+++ b/tests/049<br>
@@ -25,7 +25,7 @@ $COLLIE cluster format -c 1<br>
sleep 1<br>
<br>
$COLLIE vdi create test 20M<br>
-dd if=/dev/urandom | $COLLIE vdi write -w test<br>
+./fastrandom | $COLLIE vdi write -w test<br>
<br>
$COLLIE cluster shutdown<br>
_wait_for_sheep_stop<br>
diff --git a/tests/055 b/tests/055<br>
index 6b99552..6959b89 100755<br>
--- a/tests/055<br>
+++ b/tests/055<br>
@@ -25,14 +25,14 @@ $COLLIE vdi create test 200M -P<br>
<br>
# simulate one disk failure<br>
rm $STORE/0/d0 -rf<br>
-dd if=/dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
_wait_for_sheep_recovery 0<br>
$COLLIE vdi check test<br>
$COLLIE cluster info | _filter_cluster_info<br>
<br>
# simulate multiple disk failure<br>
rm $STORE/1/d0 -rf<br>
-dd if=/dev/urandom | $COLLIE vdi write test &<br>
+./fastrandom | $COLLIE vdi write test &<br>
sleep 1<br>
rm $STORE/1/d1 -rf<br>
_wait_for_sheep_recovery 0<br>
@@ -42,7 +42,7 @@ $COLLIE cluster info | _filter_cluster_info<br>
<br>
# simulate all disks failure<br>
rm $STORE/1/d2 -rf<br>
-dd if=/dev/urandom | $COLLIE vdi write test<br>
+./fastrandom | $COLLIE vdi write test<br>
$COLLIE vdi check test<br>
$COLLIE cluster info | _filter_cluster_info<br>
<br>
diff --git a/tests/056 b/tests/056<br>
index 25dd22f..64b6398 100755<br>
--- a/tests/056<br>
+++ b/tests/056<br>
@@ -25,7 +25,7 @@ $COLLIE vdi create test 200M -P<br>
<br>
# node event after disk failure<br>
rm $STORE/0/d0 -rf<br>
-dd if=/dev/urandom | $COLLIE vdi write test &<br>
+./fastrandom | $COLLIE vdi write test &<br>
sleep 1<br>
_start_sheep 3<br>
_wait_for_sheep 4<br>
diff --git a/tests/fastrandom b/tests/fastrandom<br>
new file mode 100755<br>
index 0000000..547ffff<br>
--- /dev/null<br>
+++ b/tests/fastrandom<br>
@@ -0,0 +1,2 @@<br>
+#!/bin/bash<br>
+openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero | cat<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.1.2<br>
<br>
</font></span></blockquote></div><br></div>