LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-29-2018, 04:59 AM   #16
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,302
Blog Entries: 61

Rep: Reputation: Disabled

New kernel! New cpufreq governor! Don't know if I can stand this pace of change at my age!!!
 
Old 08-29-2018, 02:42 PM   #17
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
rc.cpufreq: for CPUs that use intel_pstate, default to the performance governor. The performance governor provides power savings while avoiding the ramp-up lag caused by using "ondemand", which defaults to "powersave" on these systems.
Do I understand that if the default performance option is used that the CPU still conserves energy, despite always running close to top speed?

Spurred by this thread I now am testing the default performance option. According to conky and cpufreq-info, my CPU now is mostly running at max frequency. Fan speeds are tad higher now too.

Previously I was using the ondemand option, which triggered defaulting to the pstate powersave option.

Edit: What is meant by ramp-up lag? Are we talking micro or milliseconds or several seconds? BTW, I am using a Sky Lake quad core Intel i5-6400.

Last edited by upnort; 08-29-2018 at 03:34 PM.
 
Old 08-29-2018, 03:00 PM   #18
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,704

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
Decided to test the performance governor also. My Haswell-E now runs at max speed about 80% of the time, but does idle most cores when not in use. Temperatures went up a few degrees Celsius.

Last edited by Daedra; 08-29-2018 at 03:01 PM.
 
Old 08-29-2018, 05:43 PM   #19
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
@upnort
Quote:
Edit: What is meant by ramp-up lag? Are we talking micro or milliseconds or several seconds? BTW, I am using a Sky Lake quad core Intel i5-6400.
There are definitely fractions of seconds and the exact delay is to be measured, if you know how, I don't, without causing myself to much load and influencing the results, maybe Intel knows better. The problem with this delay, or ramp-up lag, is that it's apparent especially in a resource hungry DE, KDE for instance, where you can clearly notice the sluggishness. Maybe not that apparent on some high end Core i7/i8...etc.
In my post #3 there's a link pointing to an older benchmark (phoronix) about the governors (algorithms) and on page 6 you can find a nice and conclusive time-graph where these are compared.
And then there could be other factors too, BIOS PM, the CPU's own PM (if any) and the quality of the intel_pstate driver.
The only more detailed info I could find about these CPU states is:
https://software.intel.com/en-us/art...ckage-c-states
- it covers the Xeon CPUs, but down on the page it states:
"We discussed the different types of power management states. Though the concepts are general, we concentrated on a specific platform, the Intel® Xeon Phi™ coprocessor. Most modern processors, be they Intel Corporation, AMD* or embedded, have such states with some variation."

@Daedra
These newer CPUs, starting with Haswell are very efficient and under normal usage they don't produce too much heat, thus the fan doesn't even start spinning with the powersave governor. Talking about laptops. Although I'm using the performance governor myself, I do have an issue with it, it's actually not optimal. The fans are spinning constantly at lower speed and these are mechanical components with somewhat limited lifetime that I might like to protect. That's why I'll try to blacklist the intel_pstate driver and observe how the old acpi-cpufreq with the governor "ondemand" is actually behaving. Now this is not recommended as the intel_pstate is chosen now by default for Intel CPUs in the Linux kernel, but still, it's worth trying. Hope I'll get some time during the weekend to play with it and do some benchmarks.

Last edited by abga; 08-29-2018 at 06:01 PM. Reason: typo
 
1 members found this post helpful.
Old 08-29-2018, 06:18 PM   #20
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,000

Original Poster
Rep: Reputation: 472Reputation: 472Reputation: 472Reputation: 472Reputation: 472
Quote:
Do I understand that if the default performance option is used that the CPU still conserves energy, despite always running close to top speed?
Modern CPUs have fine-grained gating on both the clock and power supply. When idle, large parts of the CPU core are shut off which makes the input clock frequency mostly irrelevant.

In principle, the powersave governor reduces power (and energy!) by not going to maximum frequency/voltage right away when a CPU core becomes busy. I measured the effects some time ago, and as I recall, the performance loss occurred over a timescale of tens to hundreds of milliseconds.
Ed
 
2 members found this post helpful.
Old 08-29-2018, 06:42 PM   #21
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
it's apparent especially in a resource hungry DE
I use MATE. I never heard anybody call the DE resource hungry.

Quote:
which makes the input clock frequency mostly irrelevant
I guess the only way to know for sure is connect the kill-a-watt meter.

My notes from my original assembly:

79 watts max CPU frequency
54 watts with CPU idle

Last edited by upnort; 08-29-2018 at 06:44 PM.
 
Old 08-29-2018, 09:08 PM   #22
Pixxt
Member
 
Registered: May 2008
Distribution: Slackware, Debian,
Posts: 289

Rep: Reputation: 186Reputation: 186
I just hope the new kernel setting does not screw up things for us AMD users.
 
Old 08-29-2018, 10:42 PM   #23
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by Pixxt View Post
I just hope the new kernel setting does not screw up things for us AMD users.
I haven't seen the new rc.cpufreq (part of the a/sysvinit-scripts-2.1-noarch-18.txz) but if it's looking in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors and picks ondemand if it's available and performance if it's not, then you'll be good with your AMD, ARM users will be fine and other older Intel CPUs (pre Sandy Bridge) users will be happy too. AFAIK it's starting with Intel's Sandy Bridge where intel_pstate is activated.
 
Old 08-30-2018, 12:22 AM   #24
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
How about rc.cpufreq sourcing a user-defined /etc/default/cpufreq file?

A person might not want to use the performance option and prefers powersave.

As is, the new script requires 1) editing rc.cpufreq to comment out the new pstate test, 2) editing rc.M to change the start parameter, or 3) editing rc.local to relaunch rc.cpufreq with the desired powersave parameter.

Sourcing a user-defined file in /etc/default avoids editing the rc.d scripts.
 
Old 08-30-2018, 01:52 AM   #25
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Creating a new conf file for a simple value might be a little overkill IMHO.
I'm not sure I'm able to follow your logic, don't understand why 1) is necessary, what do you want to comment out? Establishing the best default governor depending on the system? It'll be a variable that might or might not be used in the next stage of the script, depending on how rc.cpufreq was called, with or without a parameter. Simple and elegant.
I also cannot follow why 3) is necessary, only step 2) is sufficient, that's:
Quote:
2) editing rc.M to change the start parameter
 
Old 08-30-2018, 02:39 AM   #26
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Given that rc.cpufreq contains the necessary instructions to manually set the preferred governor, leaving SCALING_GOVERNOR= empty, using a different variable for choosing the appropriate governor from /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors and then expanding the conditional statement, checking first if the "override" SCALING_GOVERNOR is set by the user, using it to set the governor and breaking the loop, would be a better approach, keeping it all in one file.
 
Old 08-30-2018, 03:33 AM   #27
Melke
Member
 
Registered: Sep 2009
Location: Graz, Austria
Distribution: Slackware Current
Posts: 106

Rep: Reputation: 45
Quote:
Originally Posted by abga View Post
Given that rc.cpufreq contains the necessary instructions to manually set the preferred governor, leaving SCALING_GOVERNOR= empty, using a different variable for choosing the appropriate governor from /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors and then expanding the conditional statement, checking first if the "override" SCALING_GOVERNOR is set by the user, using it to set the governor and breaking the loop, would be a better approach, keeping it all in one file.
I think the point is that the file in /etc/default would not be overwritten if the RC scripts get an update?

Not a big thing, but still...

KR
Mel
 
Old 08-30-2018, 04:21 AM   #28
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by upnort View Post
How about rc.cpufreq sourcing a user-defined /etc/default/cpufreq file?
/etc/rc.d/rc.cpufreq.conf would be more Slackwarey.
 
4 members found this post helpful.
Old 08-30-2018, 07:18 AM   #29
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,302
Blog Entries: 61

Rep: Reputation: Disabled
Is there anything wrong with editing rc.cpufreq to read the desired governor?
Code:
SCALING_GOVERNOR=ondemand
to
Code:
SCALING_GOVERNOR=performance
 
Old 08-30-2018, 08:14 AM   #30
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by EdGr View Post
M
In principle, the powersave governor reduces power (and energy!) by not going to maximum frequency/voltage right away when a CPU core becomes busy. I measured the effects some time ago, and as I recall, the performance loss occurred over a timescale of tens to hundreds of milliseconds.
Ed
which is, when you are on a notebook and travelling, irrelevant.
like for most all other common user tasks
so I hope the change did not effect notebook installations?
I even have doubts that it makes sense on most of workstations also
if you have use cases where tens to hundreds of milliseconds matter, what is not a every day every user scenario, than this might be a better candidate for special settings, imho
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU frequency governor configuration yanf81 Linux - Software 12 11-15-2015 12:03 PM
LXer: Samsung Introduces "LAB" Linux Frequency Governor LXer Syndicated Linux News 0 04-10-2013 04:31 AM
[SOLVED] compiz fusion " cpu frequency scaling unsupported" mad11 Linux - Newbie 0 03-19-2010 07:10 AM
[SOLVED] Using the "powersave" governor on battery and "ondemand" governor on AC power piratesmack Slackware 5 01-21-2010 12:54 PM
"CPU frequency is not supported and system is very very slow" kandhakumar Linux - General 3 06-29-2008 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration