Skip to content

Commit

Permalink
env: update Plan 9 image
Browse files Browse the repository at this point in the history
This new image provides a new tool, called
aux/randfs. This is a pseudo-random file
system which can be mounted on top of /dev/random.

We noticed the Go binaries on GCE were running
much slower than usual. It happened because the
runtime was regularly waiting after /dev/random,
which wasn't able to produce random bytes as
fast as required.

A simple workaround was to write a pseudo-random
file system, acting as /dev/random and initialized
from a true random source. It will be able
to produce much more bytes per second than
the random generator provided by the kernel.

Update golang/go#9491

Change-Id: I81158adef7332d10295c2245b4564ae18ebb3a14
Reviewed-on: https://go-review.googlesource.com/6170
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
0intro authored and bradfitz committed Feb 26, 2015
1 parent 9a3a104 commit 9505675
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion env/plan9-386/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

# Download Plan 9
if ! sha1sum -c plan9-gce.iso.sha1; then
curl --fail -O http://9legacy.org/download/go/2015-01-25/plan9-gce.iso.bz2
curl --fail -O http://9legacy.org/download/go/2015-02-26/plan9-gce.iso.bz2
bunzip2 plan9-gce.iso.bz2
sha1sum -c plan9-gce.iso.sha1
fi
Expand Down Expand Up @@ -180,6 +180,12 @@ send "echo echo remove 10.0.0.0 /104 10.0.0.0 '>'/net/iproute >>/cfg/helix/cpurc
expect -exact "term% "
send "echo ramfs -u >>/cfg/helix/cpustart\n"
expect -exact "term% "
send "echo aux/randfs -m /dev >>/cfg/helix/cpustart\n"
expect -exact "term% "
send "echo >>/cfg/helix/cpustart\n"
expect -exact "term% "
send "echo echo downloading git >>/cfg/helix/cpustart\n"
Expand Down
2 changes: 1 addition & 1 deletion env/plan9-386/plan9-gce.iso.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bd6130449b742ecc5f558153676ee660f66806f6 plan9-gce.iso
d277abfb4431ae1ca2cbf93d3c0b2cacdad6f166 plan9-gce.iso

0 comments on commit 9505675

Please sign in to comment.