Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.7.0
-
None
Description
We determine the maximum cpu frequency once during startup in util/cpu-info.cc:92 by reading /proc/cpuinfo and looking for the maximum frequency of any core. This assumes that the system is under enough load to max out at least one core, to read the correct maximum frequency. During benchmark tests, this is often not the case, leading to wrong calculations of the elapsed wall clock time in util/benchmark.cc:63. Here, sw.elapsedTime() is the number of elapsed CPU ticks, and dividing this by a wrong value for maximum CPU frequency yields wrong results.
As a fix we can read the maximum cpu frequency from /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq which contains the correct value.