← Back to team overview

linux-traipu team mailing list archive

[Bug 800991] Re: Default "ondemand" CPU frequency management can cause 100% CPU

 

** Description changed:

  I can across an interesting issue with HD playback which no doubt is due
  to the hardware and the way I use the machine.
  
- The cpu frequency scaling applied by default is very conservative, only scaling up the CPU when usage reaches 95%
- The CPU usage whilst playing HD content was sitting at ~60% with the CPU running at it's lowest speed (1GHz)
- With a few recordings going on the backend this starts creeping up to 80%
+ On my machine (AMD Athlon 64x2 4800) The CPU usage whilst playing HD
+ content sits at ~60% with the CPU running at it's lowest speed (1GHz).
+ With a few recordings going on the backend this starts creeping up to
+ 80%
  
  Occasionally another process would spawn and the CPU would find itself
- briefly hitting 100% - which caused dropped frames on playback - It's
- only brief as the cpu polling sees the increased usage and increases the
- frequency (so we are only talking <100ms of 100%)
+ briefly hitting 100% - which causes dropped frames on playback - It's
+ only brief as the cpu polling sees the increased usage and raises the
+ frequency (so we are only talking <100ms of 100% CPU)
  
  What I've found is by reducing the  "Up_threshold" in the ondemand
- profile to 60%, The CPU scales up before reaching 100% now - so in
- affect I've given it some headroom to cope with other tasks and this has
- been enough to eliminate the occasional dropped frame.
+ profile to 60%, the governor acts more cautiously, and scales up the CPU
+ so it's running at a lower utilisation rate to begin with. This has been
+ enough to eliminate the occasional dropped frame since there is now more
+ idle capacity.
  
  I've done this by adding the following to the /etc/init.d/ondemand startup script
  echo -n 60 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
  
  
  So not really a bug but more of an optimisation report - perhaps there is some customisation of the CPU power/utilisation needed with Mythtv? - delivery of content is paramount IMHO and the frontend should ensure it has the resources it needs to deliver content.
+ 
+ The cpu frequency scaling applied by default is very conservative, only
+ scaling up the CPU when usage reaches 95%, this is effectively telling
+ the governor to scale up the cpu frequency _after_ running out of CPU.
+ For Mythtv this is not ideal. Although we can't anticipate CPU load we
+ can at least ensure there is always some headroom. Dropping the
+ Up_Threshold does this.

-- 
You received this bug notification because you are a member of UBUNTU -
AL - BR, which is subscribed to Mythbuntu.
https://bugs.launchpad.net/bugs/800991

Title:
  Default "ondemand" CPU frequency management can cause 100% CPU

Status in Mythbuntu, Ubuntu derivative focused upon MythTV:
  New

Bug description:
  I can across an interesting issue with HD playback which no doubt is
  due to the hardware and the way I use the machine.

  On my machine (AMD Athlon 64x2 4800) The CPU usage whilst playing HD
  content sits at ~60% with the CPU running at it's lowest speed (1GHz).
  With a few recordings going on the backend this starts creeping up to
  80%

  Occasionally another process would spawn and the CPU would find itself
  briefly hitting 100% - which causes dropped frames on playback - It's
  only brief as the cpu polling sees the increased usage and raises the
  frequency (so we are only talking <100ms of 100% CPU)

  What I've found is by reducing the  "Up_threshold" in the ondemand
  profile to 60%, the governor acts more cautiously, and scales up the
  CPU so it's running at a lower utilisation rate to begin with. This
  has been enough to eliminate the occasional dropped frame since there
  is now more idle capacity.

  I've done this by adding the following to the /etc/init.d/ondemand startup script
  echo -n 60 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold

  
  So not really a bug but more of an optimisation report - perhaps there is some customisation of the CPU power/utilisation needed with Mythtv? - delivery of content is paramount IMHO and the frontend should ensure it has the resources it needs to deliver content.

  The cpu frequency scaling applied by default is very conservative,
  only scaling up the CPU when usage reaches 95%, this is effectively
  telling the governor to scale up the cpu frequency _after_ running out
  of CPU. For Mythtv this is not ideal. Although we can't anticipate CPU
  load we can at least ensure there is always some headroom. Dropping
  the Up_Threshold does this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mythbuntu/+bug/800991/+subscriptions


References