Ruby slow to launch (was L-o-n-g delay for rc.local in systemd on Ubuntu.)
Dennis Straffin
dennis at straffin.net
Tue Aug 8 18:07:29 EDT 2017
Oops, I didn't see Ken's reply where he already figure this out (spotty cell service).
Where I work we were having this issue when bringing up new VMs. While provisioning, it would seem to just hang for 10 or 15 minutes when installing packages. No cpu usage, no disk io, no network io. And every time you'd ssh in to the VM to run top, it'd start going again. Very frustrating. Simply installing haveged first fixed the issue.
-Dennis
On August 8, 2017 5:47:11 PM EDT, Dennis Straffin <dennis at straffin.net> wrote:
>VMs lack hardware devices to fill up the pool of random numbers.
>Installing the haveged daemon will do expansion on the random numbers
>to keep the pool full.
>
>-Dennis
>
>On August 8, 2017 3:30:46 PM EDT, Ken D'Ambrosio <ken at jots.org> wrote:
>>On 2017-08-08 15:18, Joshua Judson Rosen wrote:
>>
>>> The /dev/random interface is considered a legacy
>>> interface, and
>>> /dev/urandom is preferred and sufficient in all use cases,
>
>>> with the
>>> exception of applications which require randomness during
>>> early boot
>>> time; for these applications, getrandom(2) must be used
>
>>
>>> instead,
>>> because it will block until the entropy pool is initialized.
>>>
>>> So, there you go. "until the entropy pool is initialized" is
>>apparently
>>> about 3 minutes in your case ;)
>>
>>Yeah... getrandom() apparently pings /dev/urandom by default which, as
>
>>per the getrandom manpage, blocks until it has entropy. Sounds like
>>we've wound up at much the same place: I took some data off of
>>/dev/random, stored it in a file, and am feeding that to /dev/urandom
>>at
>>boot time (and re-seeding the file after five minutes' uptime). Alas
>>(because, you know, deadline), that doesn't seem to be working. Which
>
>>is really, really annoying. I'm *still* blocking for three-to-five on
>
>>getrandom().
>>
>>I guess it's time to cut my losses and start this in a different
>>language. I mean, most of the hard stuff was figuring out *how* to do
>
>>things, but I admit, my Perl and Python have grown rusty as I've
>>enjoyed
>>my Ruby...
>>
>>-Ken
>>_______________________________________________
>>gnhlug-discuss mailing list
>>gnhlug-discuss at mail.gnhlug.org
>>http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
>--
>Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/pipermail/gnhlug-discuss/attachments/20170808/bb808be5/attachment-0001.html
More information about the gnhlug-discuss
mailing list