Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #242587

Re: using intel i5 freqency governors

From David Christensen <dpchrist@holgerdanske.com>
Newsgroups linux.debian.user
Subject Re: using intel i5 freqency governors
Date 2021-12-02 03:10 +0100
Message-ID <DpJHP-1Fq-5@gated-at.bofh.it> (permalink)
References <DpB7A-4Gm-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/1/21 8:58 AM, Lee wrote:
> The short story is that I have an Intel i3 windows 10 desktop with
> cygwin installed and an Intel i5 debian desktop.  One of my scripts
> takes about 10 minutes to run on the windows/i3 and 15 minutes on the
> debian/i5!  ick
> 
> if i do
> $ sudo cpupower frequency-set -g performance
> 
> then it takes about 10 minutes to run the script on the i5, **but**
> the cpu frequency never drops down to power-saving mode when the
> machine is idle - eg
> $ sudo cpupower -c all frequency-info | grep 'call to kernel'
>    current CPU frequency: 3.99 GHz (asserted by call to kernel)
>    current CPU frequency: 3.95 GHz (asserted by call to kernel)
>    current CPU frequency: 4.01 GHz (asserted by call to kernel)
>    current CPU frequency: 3.91 GHz (asserted by call to kernel)
>    current CPU frequency: 3.96 GHz (asserted by call to kernel)
>    current CPU frequency: 4.00 GHz (asserted by call to kernel)
> 
> and more annoying, setting the frequency governor back to powersave
> doesn't seem to drop the frequency all that much
> 
> $ sudo cpupower frequency-set -g  powersave
> Setting cpu: 0
> Setting cpu: 1
> Setting cpu: 2
> Setting cpu: 3
> Setting cpu: 4
> Setting cpu: 5
> 
> $ sudo cpupower -c all frequency-info | egrep 'call to kernel|The governor'
>                    The governor "powersave" may decide which speed to use
>    current CPU frequency: 3.85 GHz (asserted by call to kernel)
>                    The governor "powersave" may decide which speed to use
>    current CPU frequency: 3.58 GHz (asserted by call to kernel)
>                    The governor "powersave" may decide which speed to use
>    current CPU frequency: 4.01 GHz (asserted by call to kernel)
>                    The governor "powersave" may decide which speed to use
>    current CPU frequency: 3.55 GHz (asserted by call to kernel)
>                    The governor "powersave" may decide which speed to use
>    current CPU frequency: 3.66 GHz (asserted by call to kernel)
>                    The governor "powersave" may decide which speed to use
>    current CPU frequency: 3.57 GHz (asserted by call to kernel)
> 
> 
> How do I get the intel cpu "turbo boost" fully engaged when I'm
> running my script and go back into power save mode when the machine is
> idle?
> 
> Thanks
> Lee


Which i3?  i5?  Debian?  Linux?


I assume your script is single-threaded (?).


I am unfamiliar with 'cpupower'.  I use cpufreq-set(1) to set the 
governor and the Xfce panel applet "CPU Frequency Monitor" to monitor 
the CPU frequency and/or governor.  The latter tool lets me choose a 
specific core, minimum, average, or maximum frequency.


My compute-bound single-threaded scripts cause the CPU frequency to 
increase to maximum on my quad-core i7:

2021-12-01 17:48:27 root@tinkywinky ~
# cat /etc/debian_version ; uname -a ; cpufreq-info -p
9.13
Linux tinkywinky 4.9.0-16-amd64 #1 SMP Debian 4.9.272-2 (2021-07-19) 
x86_64 GNU/Linux
800000 3300000 powersave


Perhaps your governor is somehow broken?


But, the best answer is to rewrite your script as a parallel program. 
The challenge is: what programming language?  Shells can do simple 
parallelism via background tasks, if you can break up your script 
suitably.  I have been beating my head against multi-threaded Perl for 
several years, but I do not recommend it.  If you want a recent 
programming language designed for parallel programming, an obvious 
choice is Go.  Erlang is older, very robust, and adds distributed 
programming, but the syntax is very different (Prolog based).  I 
attempted Clojure, but never got off the ground.  There are other choices.


David

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

using intel i5 freqency governors Lee <ler762@gmail.com> - 2021-12-01 18:00 +0100
  Re: using intel i5 freqency governors David Christensen <dpchrist@holgerdanske.com> - 2021-12-02 03:10 +0100
    Re: using intel i5 freqency governors Nicholas Geovanis <nickgeovanis@gmail.com> - 2021-12-02 05:40 +0100
    Re: using intel i5 freqency governors Stefan Monnier <monnier@iro.umontreal.ca> - 2021-12-02 06:10 +0100
      Re: using intel i5 freqency governors Lee <ler762@gmail.com> - 2021-12-02 06:30 +0100
        Re: using intel i5 freqency governors Stefan Monnier <monnier@iro.umontreal.ca> - 2021-12-02 07:00 +0100
          Re: using intel i5 freqency governors Tixy <tixy@yxit.co.uk> - 2021-12-02 09:10 +0100
            Re: using intel i5 freqency governors Tixy <tixy@yxit.co.uk> - 2021-12-02 09:20 +0100
            Re: using intel i5 freqency governors Stefan Monnier <monnier@iro.umontreal.ca> - 2021-12-03 16:30 +0100
              Re: using intel i5 freqency governors Tixy <tixy@yxit.co.uk> - 2021-12-03 17:10 +0100
          Re: using intel i5 freqency governors Lee <ler762@gmail.com> - 2021-12-02 16:00 +0100
    Re: using intel i5 freqency governors Lee <ler762@gmail.com> - 2021-12-02 06:10 +0100
      Re: using intel i5 freqency governors David Christensen <dpchrist@holgerdanske.com> - 2021-12-02 07:30 +0100

csiph-web