rand_harvestq high cpu usage when /dev/urandom is used

Ali Abdallah aliovx at gmail.com
Mon Aug 20 11:27:46 UTC 2018


Hello,

I was just sorting randomly some jpg image files using:

ls *.jpg  | sort -R --random-source=/dev/urandom

The above command never exited. Later I noticed that
one of my CPU is always running 100%. top -S reveals that it is
rand_harvestq kernel service.

Is this is a bug? This occurs on 12-ALPHA1 and 11.2


Also, I read on
https://lists.freebsd.org/pipermail/freebsd-current/2013-November/046683.html
someone saying that sysctls to turn off harvesting is documented in
random(6) <https://www.freebsd.org/cgi/man.cgi?query=random&sektion=6&manpath=freebsd-release-ports>.
I had a look
at that document, but wasn't clear to me how to turn it off. I tried
to play with the mask,
but nothing.

Cheers,

Ali


More information about the freebsd-hackers mailing list