Re: Sensors [via-cputemp] is cpu intensive?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2012-04-22 at 13:03 -0400, lmsensors@xxxxxxxxxxxxxxxxxx wrote:
> On 4/22/2012 2:42 PM, Jean Delvare wrote:
> > Hi Dave,
> >
> > On Sun, 22 Apr 2012 11:19:24 +0100, lmsensors@xxxxxxxxxxxxxxxxxx wrote:
> >
> >
> > Most of /proc/acpi has been deprecated over time in favor of equivalent
> > (but often more generic) sysfs attributes. For
> > example /proc/acpi/thermal_zone/THRM/temperature would now
> > be /sys/class/thermal/thermal_zone0/temp. If your kernel had
> > CONFIG_THERMAL_HWMON enabled, you would also see this thermal zone in
> > the output of "sensors".
> 
> I don't have anything of note in /sys/class/thermal so I'll look at what 
> I might be missing from the newer acpi configs.
> 
> > I think you're looking at the numbers in the wrong way. It's not 
> > sensors or grep or anything causing a 10°C increase in temperature. 
> > It's the CPU being nicely designed with efficient low-power C-states 
> > which make it possible to save 10°C in idle state. 
> 
> Yes and no.  Even when the CPU was 'idle' and cooling down from the max 
> of 57 to 46-ish, I was able to reliably increase the CPU temps by 3+ 
> degC by running sensors twice and by 8-10 degC by running sensors 200 
> times which, in a loop.  And running it 200 times on a 1.8GHz cpu takes 
> 3 seconds.  Nothing takes 3 seconds.
> 
> Yes, I realize that time is required to setup the execution environment 
> for sensors and it relies on the kernel and bus wait times, etc etc 
> etc...  But...
> 
> Nothing takes 3 seconds.  :)

Feel free to improve it ;).

I get:

with Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz:
  real	0m1.814s
  user	0m0.408s
  sys	0m1.292s

with Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz:
  real	0m5.634s
  user	0m0.200s
  sys	0m2.380s

For the latter, if I execute "sensors coretemp-isa-0000" instead of
"sensors" in the loop, the results are:
  real	0m1.295s
  user	0m0.160s
  sys	0m0.632s

The difference is that "sensors" also probes acpitz-virtual-0 on my
laptop (Core 2 Duo). Apparently that is the time and CPU hog in my case.
You might want to check the sensors probed and reported in your case,
then look into those drivers and make them more efficient. I am sure we
would all appreciate that ...

Thanks,
Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux