rand_harvestq high cpu usage when /dev/urandom is used

RW rwmaillists at googlemail.com
Mon Aug 20 17:43:42 UTC 2018


On Mon, 20 Aug 2018 13:27:33 +0200
Ali Abdallah wrote:

> Hello,
> 
> I was just sorting randomly some jpg image files using:
> 
> ls *.jpg  | sort -R --random-source=/dev/urandom

urandom is a sim-link to random, so --random-source=/dev/urandom
does nothing useful

> 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

It's a bit excessive


> 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.
 
what happens if you set the mask to zero?


More information about the freebsd-hackers mailing list