@Haw Loeung: It would be good to understand in more detail your
findings. As far as I know (and I am not an expert in this area), great
care has been taken to avoid things like wakeups just to decide to go
idle.

I did a test on my computer (Ubuntu 16.04 server, no GUI), but to avoid
extra overheads, I used the /proc/timer_stats method. I also did the
test over 300 seconds, so as to dilute influence from the command
itself. Kernel: 4.8.0-040800rc5-generic

intel_pstate, "idle" system:
powersave: 14722 events, 49.073 events / second
performance: 14964 events, 49.879 events / second

intel_pstate: extra "idle" system:
powersave: 6381 total events, 21.269 events / second
performance: 6788 events, 22.626 events / second

Which kernel are you using? There was a flurry of high wakeups activity
in June, but I thought it all got resolved. Note that there was a slight
increase in wakeups with the recent change to a utilization based
algorithm, but that was good thing because it solved a very long
standing issue whereby the CPU frequency might not increase under high
load for periodic workflows that just so happened to be idle on jiffy
boundaries.

You mention "on some workloads". Could you be more specific? i.e. so
that I can attempt to recreate your scenario on my computer.

My script:
$ cat ./set_cpu_timer_stats_2
#! /bin/bash
# Take a 300 second time sample
# A long time is needed to amortize/dilute the effect of the command itself.
# Reset the counters
echo "0" > /proc/timer_stats
echo "1" > /proc/timer_stats
# Now let the sample time elapse
sleep 300
# Now observe the timer counters
cat /proc/timer_stats
# And turn off timer stats.
echo "0" > /proc/timer_stats

What does "extra idle" mean?:
$ cat set_cpu_turn_off_services
#! /bin/bash
# Turn off some services to try to get "idle" to be more "idle"
sudo systemctl stop mysql.service
sudo systemctl stop apache2.service
sudo systemctl stop nmbd.service
sudo systemctl stop smbd.service
sudo systemctl stop cron.service
sudo systemctl stop winbind.service
sudo systemctl stop apt-daily.timer

Recent wakeups thread: http://marc.info/?t=146617757000003&r=1&w=2

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1579278

Title:
  Keep powersave CPU frequency scaling governor for CPUs that support
  intel_pstate

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1579278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to