Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

power management and cpu governors :)

Off-Topic discussions about science, technology, and non Debian specific topics.
Message
Author
Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#21 Post by Deb-fan »

Not saying anything bad about Liquorix, no doubt guy behind maintaining it knows his stuff. No doubt more than myself. Of course tried it and liked it anyway. Was one of the ways I started out learning about the topic, installed various "high performance" desktop kernels and checked out the .config files used with them. Of course Liquorix was included in this process, he includes a bunch of patches and uses some config's I don't prefer or think best(for me.) Plus he's still got to cater to a wider range of usecases and preferences than I do. For example I remove support for varied filesystems I never intend to use which are ordinarily compiled into most kernels. End result yep, somewhat smaller kernel thus somewhat less memory overhead etc. So still when I have the opportunity prefer to compile my own.

NOTE: Such dorking with a kernel can be a double edged sword too of course. Remove support for ext2, later go to dork with ext2 and not remember it's compiled out of the kernel. WHY ISN'T IT WORKING !! AHHHHHH !!!!!! Lmao, been there ... done that, got the shirt and the shirt says "I'm a dumbazz who fiddled with my Linux kernel and forgot what I fiddled with". :P

Though yeah, when you want the kernel to focus on doing tasks with better throughput (ie: compiling) then lower timer interrupt (100hz) and non-preemptive is better. Same kernel .config used, higher clock-freq, then yeah, running same tasks at a higher freq is bound to get done faster, bound to get more done/faster.

Personally never been able to get much better than what comes set in stock kernel, yes some but nothing mind-blowing. Which is why you see almost everybody saying custom compiling isn't worth it and truthfully I mostly agree. Though obviously not fully agree as can be some benefits, faster boot, lower memory footprint, more responsive desktop apps, somewhat lower cores temps and load avgs. So still personally consider it worth doing, I don't apply anything by way of patches as I've still got much to learn on the topic. It's a one time thing in many ways or a couple times on a given system. The hurdle is all the time involved in learning what even matters as pertains the subject and that's CONSIDERABLE. Took me quite a bit of time/effort to somewhat understand and thus get any benefit out of compiling my own kernel. Really isn't worth it mainly, someone wants a higher performance kernel tailored to desktop and meant for better performing real-time applications then yeah, which many audio-video apps do work better w more appropriate kernel config's than what's stock. People want these things (and what desktop nixer doesn't) better to just install one from a trusted source and call it done. Which guess Liquorix qualifies it's been around and widely used forever.


At least check out what comes stock in the repo's. The time involved mostly negates any possible benefits from learning about custom config'ing kernels. I knew this, still wanted to learn about it and custom compile just for the sake of it, considering the Linux kernel is the heart of gnu/Linux. Also I'd gotten to the point of thinking tweaking kernel config's can't possibly be worth it, someone should just install a packaged high performance deal on desktop and get on with life. Apparently I'm wrong as a distro named Clear OS is somehow doing this. Seen folks refering to the config'ing and patching they're doing to the kernel as being like overclocking without having to set it up. It's kicking all hell out of other distro's kernel choices in Phoronix or whatever testing thing. I'm not at the point where I can really understand all involved but it's causing a stir in varied places and prompting discussion.

When comes to custom compile I have seen gains, again ... nothing mind blowing but quantifiable gains. I mean the output of "top", "uptime","ps_mem", lm-sensors, "systemd-analyze", how quickly applications load and their latencies/responsiveness and actually timing the thing to working desktop vs a stock kernel are not just someone's impressions or opinions, that data is indisputable fact. Recently came up with a saying for something I've long believed. Introducing my TTT rule (three-t rule), goes like this "Tuning without Testing is Tarded." Lol ... totally true all this I think it's faster/better, feels like it's faster crap is just that ... pure crap in my view. :D

Though kernel config and how something like affect or benefit as it's related to something like proc-core freqs are joined at the hip. Sheesh same as pertains to anything hardware and gnu/Linux, kernel's the core of it all. Again with the example of a real-time app or a process that needs cpu time and needs it NOW to work best. A kernel config'ed with non-preempt won't give it cpu-time when/as requested, will tell it wait in line with all the other processes, voluntary preempt might not give that process time. Imagine the likely impact on how well that app performs in this. Other ways to fiddle with it anyway, like when checking in terminal, the pulseaudio process is given a nice value of -11 vs the others.
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#22 Post by Deb-fan »

Chapter 19, errrr, forgot which chap I'm on by this point. Sorry to whomever, wouldn't blame anybody if they send me a cease and desist please sthu pm. ;)

Guess compile time could be another factor. Though not for you peeps with more current specs, this old thing is cutting edge or was back in the late 1800's when it was made. So never mind, you decent spec people can probably compile a kernel in 15-20mins anyway or on this beast could just set the thing up, before hitting the hay, start the compile and let it do it's thing while I'm catching zzzzzz's. Honestly no point in chasing higher kernel versions on this old thing anyway. Folks with new hardware yeah would be paying closer attention to release notes and waiting for new features and better hardware support coming out in newer kerns. Ah no worries sure Liquorix and others keep convenient current versions within easy reach anyway.

Still think it's worth considering this, as pertains to cpu freq's, as it does to gnu/nix configs meant for desktop users vs kernels as they come configged stock. All this is of course a matter of choice and preferences for each of us nixer's to decide what we prefer most. Arghhhh, getting on my own nerves. Gotta throttle back this nix forum addiction thing, trying to rear it's fugly head. Tell the truth am sure I'll always and forever have much more to learn about a topic like gnu/Linux than I'll ever manage to know.
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#23 Post by Deb-fan »

6 cores and 6 threads ... 100% for HOURS!? Holy friggin crap man. Thinking of setting up a really stripped down install spec for compiling stuff, doesn't need X, 100hz and non-preemptive on it etc. It's awesome to see somebody showing the intiative to start tuning a distro in ways long considered generally better and appropriate for desktop gnu/Linux. Debian cured me of the distro-hop a long time ago but was d-hopping like a madman for awhile and only ever seen one distro release with a notable deviation, they had set swappiness to 0 out-of-box, imo too low and now setting such supposedly disables swap altogether. I just set it to 10 and went on with life. Still thought it was cool at the time and is cool you're doing it and taking steps with MX @Stevep.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: power management and cpu governors :)

#24 Post by stevepusser »

Deb-fan wrote:6 cores and 6 threads ... 100% for HOURS!? Holy friggin crap man. Thinking of setting up a really stripped down install spec for compiling stuff, doesn't need X, 100hz and non-preemptive on it etc. It's awesome to see somebody showing the intiative to start tuning a distro in ways long considered generally better and appropriate for desktop gnu/Linux. Debian cured me of the distro-hop a long time ago but was d-hopping like a madman for awhile and only ever seen one distro release with a notable deviation, they had set swappiness to 0 out-of-box, imo too low and now setting such supposedly disables swap altogether. I just set it to 10 and went on with life. Still thought it was cool at the time and is cool you're doing it and taking steps with MX @Stevep.
Actually, I ignore Head-on's advice to disable SMT (hyperthreading for Intel), so it's twelve threads on six cores--quite an interesting display of 12 cpu use bars going up and down on the XFCE panel. Most of the time they are practically idle, too, especially since I have va-api video working in players and in for streaming video in a backported Chromium. Of course, there are newer mobile and desktop CPUs out there now with many more cores and threads.

I recently backported Libreoffice 6.4 a couple times, which even takes quite a bit longer than gcc, only to have the same packages show up in buster-backports a day later. :lol: Gotta pick your battles, I guess.

Anyway, the Liquorix kernel is not meant for power savings, but it does work much better than even my 1000 Hz Debian kernels for audio work, which needs low-latency, and for many games: https://forum.mxlinux.org/viewtopic.php ... 7&start=10 Debian has the realtime kernel, but that has its own drawbacks, one of which is that it's not going to work with an Nvidia proprietary driver.

I also do almost all my packaging outside of X and my own daily driver installation, in chroots, using these very cool pbuilder and sbuild systems that the Debian packagers use. They allow me to cross compile, not only for i386 on amd64, but even for non-x86 chips like armhf for Pi's, or arm64 for 64-bit ARM processors. The chroots start from a blank, innocent state for every build, and it's quick and easy to tack on extra repositories like the MX ones and a local repo I have in a folder for a build, and then to remove them. It's so much better than the clunky way we used to do packaging in virtual machines...yuck! Amd64 and i386 builds go at full speed--virtual machines (at least Virtual Box) impose quite a heavy slowdown in overhead, not to mention eat up RAM that the new methods don't.

MX 19 comes now with swappiness set to 15, which we thought was a nice figure for desktop users. Everyone should get involved with a small, practically a vanity distro, and see if it can incorporate some of your good ideas. Maybe it could get to the top of the Distrowatch click-through charts! (yes, I know that those charts don't mean much, but we don't have bots gaming them either :lol: )

About undervolting being dangerous...IDK, but it's done pretty much universally over on the Windows side with Throttlestop or other utilities among gamers and other gearheads trying to get all the performance they paid for. I haven't seen anyone mess up their hardware with it in the threads I read when trying to pick the "best bang for the buck" packaging laptop--and it turned out that I made a lucky choice. (2018 MSI GP63-8RD gaming laptop with excellent cooling system, everything pretty much works OOTB with MX/Debian once you figure out how to add the Linux EFI file to the boot options. So it's even dual booting, though I haven't started Win 10 in months)
MX Linux packager and developer

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#25 Post by Deb-fan »

Hey thanks Stevep, was chomping at the bit wanting to ask you about your view of disabling hyperthreading but didn't want to make it any more "noisy" in this thread. Me and Head_on are apparently engaged in a quasi-fued at the moment, it's fairly obvious and you guys (regulars here)have likely noticed. Where do you stand on HT'ing setting for side-channel mitigation ? To me it just seems silly having a chip with HT and disabling it and gratefully now in kernel's 5.4.2 or newer disabling mitigations is apparently as complicated as adding mitigations=off to /etc/default/grub. I actually compile them out (page table isolation and retpoline)though don't think that's right and should use the grub file. This old things chip isn't even hyper-thread capable but if were, nope ... not disabling any benefits it must bring worrying about side-channel threats which I think mainly apply to shared hardware, multi-user systems, rather than desktop nixers.

For better/best use of a cores cache etc, turning off hyper-threading just all the way around in my view has to lower performance.

Don't really pay all that much attention to what Head_on has to say anymore. What he's posted here makes why plain. Oh power management and cpu-freqs ? Just default to performance, that's all need be done/said. All else is noise. That is of course horrendously out of touch with reality but whatever. Oh the archwiki has a very strong warning about undervolt, nope need not discuss it further, noise, noise. I know you/Stevep have been using it with obvious success for a long time, Wiz10k with the know-how and experience gained from overclocking, no doubt that will easily translate into undervolt benefits and guessing CwF could do such in his sleep. Though no, no, no ... archwiki says, I think this is all there is to this thing, noise to signal fellows. I know what I don't know, if any of the other people in this thread want to share how I and others can make a @2.6ghz proc, run like a @3ghz. My best attitude is to be grateful, shut up and listen. Learning that kind of gain is possible for a reasonable amount of effort is VERY significant to me and I thank you for sharing info on it. Same for anything you/Steve have to say about the topic of compiling, obvious you really know your stuff and my understanding of the topic is pathetic.

The guy behind the Liquorix kernel has no doubt forgotten more about kernel tweaking and config'ing than I've managed to learn and again, when comes to Debian, clear they aren't specifically focused on desktop gnu/nix users, they're trying to do the best for as wide a range as they can out-of-box and clearly expecting users to change things to best meet our needs. Again ... really cool of you to do such tuning in a distro meant for desktop nixers, no doubt one of the reasons for MX's growing popularity too. Need to leave off on the stupid fued, waste of time and energy but it's been building for a long time, across a bunch of gnu/nix forums. It's not that serious and more funny than anything but newer users put more stock in something like post count, mod status etc. Seeing them FUDerized by someone who many times doesn't know what they're talking about really irritates me. Nixers may not take any interest in really cool tuning areas of nix, cause they've been told it's risky, bad practice or whatever. No nixer, even a generally competent one has the right to do that kind of thing to others imo anyway. No, no, no ... don't do that, don't even discuss it, it's bad. Yeah ok, been doing it for years and works great. Thanks for telling me it's impossible and soooo risky. Ah forget it but still wanted to say something.

Also +1 on opting for swappiness 15, considering how the kernel uses vm for file caching. Do believe 10 is too low considering avg system specs nowadays anyway. It's just really cool seeing people like you commiting to tuning for desktop. :)
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#26 Post by Deb-fan »

Dratz, where's captain obvious when you need him?! Guess it's kind of obvious where you stand Steve, you haven't disabled HT'ing. All these folks saying ahhhhh, disabling them is no biggie in terms of performance. Yeppers with Intel being one of the main contributors, supporters of the Linux kernel and most popular/common CPUs in the world am sure the hyperthreading technology used in their chips receives very little attention from kernel devs at kernel.org. Just go ahead and turn all those pesky threads off, bah no biggie or real difference. Don't know why anyone bothered including these things anyway or paying more for em either? Don't do much of anything useful. Errrr ok ... that makes perfect sense. :)

Oops, guess with as much computing muscle as systems tend to come w now desktop nixer's just don't really notice and that a tiny minority will ever bother learning to tune for whatever potential all those threads could bring. The junk such as core-pinning or affinity etc. Though clear a minority seems to care what's possible with stuff like undervolting or using a kernel that's config'ed for desktop nix either. Puters come with so much excess muscle people mostly just don't care. I really do and it's awesome folks like Stevep do as well. As avg nixer's aren't going to bother learning these things for themselves. Therefore would never experience the benefits if people like Stevep don't go that extra mile and tune these things for desktop users.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: power management and cpu governors :)

#27 Post by wizard10000 »

bump.

Running about a 90mv undervolt now; I found an intel-undervolt-gui appimage and started playing with that. My i7-4800MQ didn't like iuvolt at all, refusing to write to CPU registers.

I compiled and checkinstalled a current copy of intel-undervolt and it works fine. AMD64 only, but I'd be happy to share via gdrive and steve or anybody else can host it if they would like :)

Only compile option was --enable-systemd and is disabled on install; you need to edit /etc/intel-undervolt.conf to enable it and if you want the thing to start at boot you have to enable and optionally start intel-undervolt.service

Use the appimage gooey to play around and when you find the sweet spot you plug those numbers into /etc/intel-undervolt.conf

disclaimer: this should only work on 3d-gen Intel Core processors and later, intel_pstate is required.

Anyway, I installed intel-undervolt-gui appimage. The appimage is kinda cool - it installs in /opt and you can just execute the thing as root. Interesting tool - you can get or set voltages with a gooey interface. You can play and find out what works for you - I would strongly recommend installing 'stress' and work your cpu a bunch before you declare an undervolt stable; mine remains stable with a 90mv undervolt, has passed 30 sec, 8 core stress tests like this -

Code: Select all

#   stress --cpu 8 -v --timeout 30s
I personally would stress test a processor for like 15m before I'd declare it stable and am about to do that right now :)

If you overdo it your machine will lock up and it'll take a hard restart to get going again - don't play with this with data open that you wouldn't care to lose :mrgreen:

Oh, yeah - linkage: https://drive.google.com/open?id=1AZPL5 ... UMSm6PjPHv

edit: posting during 15m stress test. 8 cores at 100% usage, temp is 96C and cores are running at 3.4GHz :mrgreen:

edit v2.0: 10 minutes into a 15-minute test, All 8 cores are running at 3.3GGHz, 100% cpu usage; temp is still 96C - at stock voltage with this laptop (Dell Precision M4800) I can bump the CPU's thermal limiter maxing out *one* core.

Thanks to steve - that was fun :)

okay, now i'm really gonna quit editing this message :)

I ended up at a -89.84mv undervolt, stress test passed.
we see things not as they are, but as we are.
-- anais nin

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: power management and cpu governors :)

#28 Post by CwF »

stevepusser wrote:MX 19 comes now with swappiness set to 15
Deb-fan wrote:Also +1 on opting for swappiness 15, considering how the kernel uses vm for file caching
I'd strongly recommend incorporating zram-tools for modern processors. By default it will set up 256MB worth of ram divided into a chunk per core. Useful, and that is sized for smaller mem machines. On a larger scale I run 16x128MB swap with a 4.2GB swap partition that never gets hit. I turn up swappinees to 20 to help use it. At the moment I have 92.5MB in zram and 0 swap with a 26.2GB load on 64GB box up for a few weeks, testing this among other details. There are no browsers on my hypervisors like that one. On a OS with a browser it will be much more active and helpful. Get those 80 tabs open and leave some alone for awhile, then close them without a refresh and watch a few megabytes come right out of that zram. It works very well.
wizard10000 wrote: temp is 96C
wow. Mine (desktops) are built semi passive with high thermal mass and it could take a half hour to reach 96C.
see if it's tripped

Code: Select all

cat /sys/devices/system/cpu/cpu0/thermal_throttle/package_throttle_count

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#29 Post by Deb-fan »

So you were able to get clock gains Wiz10k, by how much and do you feel comfortable enough with the arrangement to keep using it long term? With this old chip doesn't even feel it's worth bothering with but the prospect of a 10% or more clock gain is something I'm going to definitely keep in mind going forward. That's a why not, no brainier situation.

Yep ... am sure that's the mindset of grossly ignorant folks in general. Want more speed, buy a faster chip, want best performance, just set things up so the clock is full bore, all times, some poss sec threat, I don't ever bother getting to the point of understanding which could exploit core cache, just disable hyperthreading, don't bother learning how kernel configs impact chip and app performance. A person which actually bothers taking an interest in these things, can take a lower spec chip and get more out of it all day long. Does take having an active interest though or again a distro dev-maintainer like @Stevep who does and does it for folks.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: power management and cpu governors :)

#30 Post by stevepusser »

disclaimer: this should only work on 3d-gen Intel Core processors and later, intel_pstate is required.
I didn't find pstate to be a requirement when I tested booting various kernels with it disabled--Secure Boot must be disabled, though.

I found that for my Intel Skylake i5-6200u laptop, I also had to first run i7z before iuvolt was able to write the new values to the msr registers. Maybe it unlocks them just by reading the values or something, but anyway, the little scriptlet I have to autostart iuvolt now runs i7z first, then sleeps a couple seconds before running iuvolt. The lowest stable values on that laptop are also about -90, so the inputs are "-90 -85 -90" (first and last must be equal, the middle one undervolts the GPU), while the settings for the MSI GP63 i7-8750H laptop are "-143.6 -100 -143.6", from Windows user's Throttlestop settings.

Thanks for the gooey Appimage settings and the binary! Maybe I can package intel-undervolt for MX...seems pretty straightforward.

More recent and powerful chips like my i7 can run into thermal throttling issues constantly, but I never see that happen on the power-sipping 15 W TDP i5-6200u. But undervolting still allows either to use less power, so run cooler with longer battery life.
Last edited by stevepusser on 2020-03-02 20:53, edited 1 time in total.
MX Linux packager and developer

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#31 Post by Deb-fan »

Things like kernel config(timer interrupt + preemption) and process priority tuning are going to have a meaningful effect. Was dorking around with a keybind that'd renice Firefox when it's launched, giving it some preference in proc access. Still mostly on my 2-dork list as haven't gotten around to fully exploring what's possible. Much less core-pinning's potential etc. Though yeah these aspects have real tuning potential for any nixer wanting to really get best performance out of a given setup. Better core/thread performance. At lower or higher freqs.

Edit: Also do have to wonder how much of an adverse effect misconfig like this has on a really low level. If there's a process which actually needs preemptive and/or higher interrupt to work well, hammering away requesting cpu-time, with a voluntary preempt configged kernel saying no, no, no, no. Stuff like gaming or intensive audio tasks. Person may try something, get crappy results and just conclude it's crap on gnu/nix or consider a ton of other things before ever(if ever)considering hey the kernel I'm running isn't setup for desktop nix. Ok done folks, will leave off on this junk. It's on my things that make me go hmmmm list though. :)

Oops, one more quickie, so I know/think I and other mere mortals got it. This undervolting thing Intel pstate applicable chips. Built in thermal throttling (AMD must have similar) reducing the voltage to the chip, makes it run cooler, thus side-stepping the throttling, thus enabling it to run at a higher freq than it's rated for and/or "binned" at? Whew ... say that 3 times fast, I dare ya. :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: power management and cpu governors :)

#32 Post by wizard10000 »

Deb-fan wrote:So you were able to get clock gains Wiz10k, by how much and do you feel comfortable enough with the arrangement to keep using it long term?
Hard to quantify, but I'll try :)

My i7-4800MQ has a base clock of 2.7GHz and a turbo frequency of 3.7GHz. At stock voltages I'll bump up against the processor's thermal limiter when maxing out only one core; with a -90mv undervolt I had all eight cores running at 3.3GHz during a 15-minute stress test. Fans ran at a medium speed during the stress test where without the undervolt fans would be screaming :)

I got hard lockups during stress testing at -100mv; -95mv worked fine but I decided to settle on -90mv. I'm extremely happy with the results.
we see things not as they are, but as we are.
-- anais nin

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#33 Post by Deb-fan »

A bottom line clock gain or think even just heat reduction with no freq impairment is still a benefit. Cool! You've got more ballz and familiarity than I do but will be keeping this in mind when get a proc later than turn of the century. ;)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: power management and cpu governors :)

#34 Post by wizard10000 »

CwF wrote:wow. Mine (desktops) are built semi passive with high thermal mass and it could take a half hour to reach 96C.
see if it's tripped

Code: Select all

cat /sys/devices/system/cpu/cpu0/thermal_throttle/package_throttle_count
Oh, I know it has without looking :)

Laptop cooling sucks; it's been about a year since the last time I blew the thing out and applied fresh thermal paste but it idles at 34C so I think cooling is reasonably healthy. JMO but on laptops the problem has almost always been how to get rid of the heat; even with the -90mv undervolt it only takes about five seconds to hit the thermal limiter during an 8-core stress test.
we see things not as they are, but as we are.
-- anais nin

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#35 Post by Deb-fan »

Woahhhhh, 34deg C!? Jebuz that's sweet and am jealous Wiz! Sounds like you're definitely a true geek(dedicated techie), am scared to even look in this old laptop's innards. No telling what I'd find. Jimmy Hoffa might be in there. :) The thought of reapplying thermal paste has flittered through my mind. Do you just rub stuff down with alcohol and put down a dab in middle of top of chip or what? Share thy chip pasty wisdom fellow nixer!?

On my bad, beast baby, it's got a bunch of hamsters on a wheel connected to the boxen. To overclock, I just have to put a pointy stick in there and jab em in the butt a couple good times. :P

Edit: Oops ... sorry CwF, didn't see what'd you'd said about zram. Have looked it over, got some mad-capped tweaking concepts which parallel what it does. Such is super secret at this point, don't even talk to myself about it yet, so mum's the word. :) You deal with a lot more complex set-ups than I do, clearly know what you're doing. I don't have access to that kind of hardware or application for it even if I did. In general though I go with no swap use, is best swap usage and any other frivilous disk i/o is evil incarnate and must be avoided and/or destroyed. Has to serve some meaningful purpose or it's my mission as a compulsive tweakster to eliminate any wasteful i/o.

Even with just 4gbs-ram, swappiness=10 set but would have to open 87 tabs or more in a somewhat tuned Firefox with Noscript to even see the swap start being used. That's what I want. Been considering going ahead and jumping up to 20. Why not? Though on non-tuned nix OS's with any untuned modern browsers and 4gbs, 10 maybe 15 seems right. Would still go w 10 the amount of memory untweaked browsers use now is ridiculous. Horrendous.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: power management and cpu governors :)

#36 Post by wizard10000 »

Deb-fan wrote:Do you just rub stuff down with alcohol and put down a dab in middle of top of chip or what?
Almost. The way I do it is clean with alcohol and apply evenly to CPU and heatsink with a razor blade. Too much thermal paste isn't a good thing either, so the trick is to fill the gaps between processor and heatsink. A translucent layer on both should work well.

edit: I had to reduce my undervolt a little bit - got hard lockup connecting to my Plex server so I reduced undervolt to -85mv.
we see things not as they are, but as we are.
-- anais nin

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: power management and cpu governors :)

#37 Post by pylkko »

wizard10000 wrote:
CwF wrote:...Past that the lowest clock to get it done does save power.
If the number of cycles required to perform a task is fixed, how does a lower clock save power exactly? If clock frequency and power consumption are linear within a given CPU architecture (they are) doesn't running a slower clock just take more time to get the same job done?
Do you have some kind of source for that? Not an expert, but would presume that 1) there can be forms of thermal runaway, making it actually not linear to some degree. Also, in order to make the claim that you propose relevant, you would also have to take into account the time that the processor is idle, right? It might take twice as long to due something at twice the lower frequency, but what if you are not actually "doing anything" in the sense that only background daemons are running? Futhermore, switching the frequency probably has some overhead in itself, so how often and when you do it could have significant effects on power consumption. I have no idea how governors interact with so called dynamic frequency and voltage scaling, but when processors modulate the frequency and the voltage, this can save very considerable power, AFAIK. If you constrain the clock cycles to some limit, does the dynamic voltage also stay lower?
Last edited by pylkko on 2020-02-28 20:30, edited 1 time in total.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: power management and cpu governors :)

#38 Post by Deb-fan »

34degs Wiz10k, your approach clearly works and only a true-techie would go to such lengths, doing that kind of maintenance that frequently. You take the state of your hardware seriously fellow nixer. :) This thing's idling mid 40's, doesn't take much to push it to low-mid 50's either. Still well within tolerance and kinda surprised. Thermal paste must look like it's fossilized in there. Scared to even look. :P

Seemed like you were pushing the undervolting a bit far but then you have hands on with that type of thing. Ive forgotten anything I'd learned about oc'ing, didn't follow through and a big part of that was the dire warnings encountered plus a nice dash of laziness. Probably from mostly clueless peeps too. Hearing from techies like yourself and Stevep does give a boost in confidence. Going to learn and take more interest in it now. Why the heel not? Cool stuff ... yep, thanks for bringing it up and giving some good info fellas.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: power management and cpu governors :)

#39 Post by wizard10000 »

pylkko wrote:
wizard10000 wrote:
CwF wrote:...Past that the lowest clock to get it done does save power.
If the number of cycles required to perform a task is fixed, how does a lower clock save power exactly? If clock frequency and power consumption are linear within a given CPU architecture (they are) doesn't running a slower clock just take more time to get the same job done?
Do you have some kind of source for that? Not an expert, but would presume that 1) there can be forms of thermal runaway, making it actually not linear to some degree. Also, in order to make the claim that you propose relevant, you would also have to take into account the time that the processor is idle, right? It might take twice as long to due something at twice the lower frequency, but what if you are not actually "doing anything" in the sense that only background daemons are running? Futhermore, switching the frequency probably has some overhead in itself, so how often and when you do it could have significant effects on power consumption. I have no idea how governors interact with so called dynamic frequency and voltage scaling, but when processors modulate the frequency and the voltage, this can save very considerable power, AFAIK. If you constrain the clock cycles to some limit, does the dynamic voltage also stay lower?
There are many references but here's one that's not too technical - https://www.researchgate.net/figure/CPU ... _254017286

We're assuming fixed voltage here; you're absolutely correct that lower voltage at a lower clock speed would save power.
we see things not as they are, but as we are.
-- anais nin

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: power management and cpu governors :)

#40 Post by pylkko »

We're assuming fixed voltage here; you're absolutely correct that lower voltage at a lower clock speed would save power.
Yes, but isn't that a "mistake"? This will not be the case in modern processors, right?. I mean, the so called "dynamic voltage", not the static part that the user can sometimes adjust by undervolting.

But the main reason, I guess, that mobile devices use governors to keep the power consumption down relates to increasing the "online time". Users don't like to drop of the network on their phone, even if it means that things get done slower. The manufacturers presume that the users do not have a "task" to do (in the sense that you use the word in your example - compiling a large software suite.). They presume that the processor is idle 95% of the time or more.

If this all is true, then the question about whether a governor on a Debian laptop (for example) makes sense, depends on which use case is more typical. Maybe for most users their laptop is used more like a phone than compiling massive sets of stuff all the time.

Post Reply