Bugzilla – Bug 631443
/usr/sbin/rngd using much cpu time
Last modified: 2013-02-06 17:38:07 UTC
I just noticed the following process on my xen dom0 server: # ps up 3765 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 3765 0.7 0.0 41164 576 ? SLsl Jul27 215:14 /usr/sbin/rngd -r /dev/hwrng --fill-watermark=90% --feed-interval=1 # uptime 11:54am up 19 days 17:55, 2 users, load average: 0.00, 0.05, 0.03 syslog shows some rngd stats every hour: Aug 16 10:00:11 os4 rngd[3765]: stats: bits received from HRNG source: 859960064 Aug 16 10:00:11 os4 rngd[3765]: stats: bits sent to kernel pool: 859174336 Aug 16 10:00:11 os4 rngd[3765]: stats: entropy added to kernel pool: 859174336 Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS 140-2 successes: 42961 Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS 140-2 failures: 37 Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS 140-2(2001-10-10) Monobit: 4 Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS 140-2(2001-10-10) Poker: 6 Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS 140-2(2001-10-10) Runs: 16 Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS 140-2(2001-10-10) Long run: 13 Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS 140-2(2001-10-10) Continuous run: 0 Aug 16 10:00:11 os4 rngd[3765]: stats: HRNG source speed: (min=22.657; avg=62.187; max=67.579)Kibits/s Aug 16 10:00:11 os4 rngd[3765]: stats: FIPS tests speed: (min=15.138; avg=104.967; max=109.618)Mibits/s Aug 16 10:00:11 os4 rngd[3765]: stats: Lowest ready-buffers level: 2 Aug 16 10:00:11 os4 rngd[3765]: stats: Entropy starvations: 0 Aug 16 10:00:11 os4 rngd[3765]: stats: Time spent starving for entropy: (min=0; avg=0.000; max=0)us that dom0 got updated from 11.1 via 11.2 to 11.3. rng-tools have not been installed in neither in 11.1 nor in 11.2, they showed up with the update to 11.3 (to 11.3-factory-final): # grep rng-tools /var/log/zypp/history 2010-06-30 10:18:25|install|rng-tools|2-139.2|x86_64||oss|c05261ce746d39c9b2f556330b148001d1e8321c 2010-07-22 00:52:13|install|rng-tools|2-140.1|x86_64||oss|aaba142d0d171f5677c019d3ad0b3ab40ff11fa8 though there is no explicit requirement for rng-tools: "rpm -q --whatrequires rng-tools" gives no ouptut and "rpm -e ..." did not complain. so: - why did rng-tools get installed at all ? (update was done with "zypper dup", so there is only zypp/history but no y2log files...) - why does it use so much cpu time ? for now I just removed that package;)
> why did rng-tools get installed at all it was installed since the package supplements several pci ids (basically: if the system supports it) > why does it use so much cpu time actually: no idea yet. might be related to running inside the dom0 this could be related: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532391 christian: since you did the switch of rng-tools to the debian-fork: any ideas ?
Known issue, new multithreaded rngd may use quite a bit a CPU time, it is related to that bug mentioned in comment 1. Of course removing the package leaves from system with very little entropy available ;) in case you want an alternative, install "haveged" from the security repo. I will keep an eye on this one.
let's close this one, the package has been updated several times and I have not seen similar reports