Ruby slow to launch (was L-o-n-g delay for rc.local in systemd on Ubuntu.)

Ken D'Ambrosio ken at jots.org
Tue Aug 8 14:24:08 EDT 2017


Well, I tried Tom's solution, and it made not a whit's worth of 
difference.  Because, assuming my ignorance about systemd equated with 
slow boot time, I hadn't troubleshot further than that.  Turns out that 
it's *Ruby's* fault.  A command like this:
ruby -e 'puts 1'
is blocking for *THREE MINUTES OR MORE* on getrandom() for the first 
post-boot execution.  (Subsequent ones run fine.)  Which leads to all 
sorts of questions:
* Why in the Hell do we care about getrandom() when we're printing an 
integer??
* Couldn't we just use /dev/urandom and be done with it?
* So much etc.

I love Ruby -- a lot -- but this is bash-my-head-against-the-monitor 
bad.

Any suggestions?  Simply renaming /dev/random to something else and 
doing "ln -s /dev/urandom /dev/random" doesn't seem to be doing the job.

-Ken


More information about the gnhlug-discuss mailing list