You are not logged in.

#1 2019-08-05 19:24:57

Roken
Member
From: UK
Registered: 2012-01-16
Posts: 979

Set cpu frequency when specific program is launched

Last night I was transcoding a video with handbrake whilst watching netflix, and my machine shutdown.

Watching the temps whilst just transcoding got them dangerously close to the recommended max (95C) and I suspect that the shutdown was overheating.

I've now dropped the maximum frequency, and temps look much more palatable.

Is there a way to set the max frequency only when handbrake is running, other than writing a script to set it, and to restore at program exit.

For info - Ryzen 1800X, normal max 3.85Ghz. Handbrake seems stable and temps well within tolerance at 3.2Ghz max.

EDIT: Tdie reports 20C lower than Tctl. Tctl is the one I'm interested in.

Last edited by Roken (2019-08-05 19:25:58)


[img=Speedtest]http://www.speedtest.net/my-result/5145583518[/img]

Ryzen 1800x 8 core/16 thread - GTX 1060 6Gb, Asus ROG STRIX B350-F, 16Gb Corsair DDR4, Cooler Master N300 chassis, 6 HD (2SSD - 4Spinners) + 1 x optical.
Linux user #545703

Offline

#2 2019-08-05 20:29:08

seth
Member
Registered: 2012-09-03
Posts: 13,073

Re: Set cpu frequency when specific program is launched

Does https://aur.archlinux.org/packages/thermald/ not work for that CPU?

Offline

#3 2019-08-05 21:56:45

Roken
Member
From: UK
Registered: 2012-01-16
Posts: 979

Re: Set cpu frequency when specific program is launched

I wasn't even aware of that, but as a quick test, I fired up the daemon (no configuration other than default), set handbrake off transcoding. and then fired up prime95 using the torture test at the same time. Oddly, temps are higher - but within tolerance - with just handbrake than with both (94C ish compared to 89C at full throttle).

I may have to explore this further, though I'm not sure what it's doing. I see frequency varying a little, but not as much as I would have thought would make any discernible difference.

Possibly a good call.

EDIT: Oops - removed, I exposed my password

EDIT2: Nevertheless, whilst it does seem to do something, temp is peaking at above maximum recommended value (not much, 95.2C), but I may stick to my script to lower max frequency at run. That gives me headroom enough to be comfortable with.

Last edited by Roken (2019-08-05 22:15:29)


[img=Speedtest]http://www.speedtest.net/my-result/5145583518[/img]

Ryzen 1800x 8 core/16 thread - GTX 1060 6Gb, Asus ROG STRIX B350-F, 16Gb Corsair DDR4, Cooler Master N300 chassis, 6 HD (2SSD - 4Spinners) + 1 x optical.
Linux user #545703

Offline

#4 2019-08-06 11:32:13

d_fajardo
Member
Registered: 2017-07-28
Posts: 515

Re: Set cpu frequency when specific program is launched

What's your GPU? Can't you give the transcoding to the GPU instead of the CPU?

Offline

#5 2019-08-06 18:14:49

Roken
Member
From: UK
Registered: 2012-01-16
Posts: 979

Re: Set cpu frequency when specific program is launched

d_fajardo wrote:

What's your GPU? Can't you give the transcoding to the GPU instead of the CPU?

I had a hunt around handbrake for the option, but couldn't find one. GTX1060 6GB.

EDIT: Now that you mentioned it, I went hunting through the documentation, and it's in the video encoder itself. Doing a test now. It seems to use GPU and CPU using NVEnc, but the temp is way down. Just tried back to back transcoding (H.264 and H.265 - which throws up other questions for a different thread) and, whilst there was the odd spike (95.9C), by and large these were very short - 1 sec - and generally around 88C, which is acceptable. Added bonus. 25% faster.

Last edited by Roken (2019-08-06 19:13:17)


[img=Speedtest]http://www.speedtest.net/my-result/5145583518[/img]

Ryzen 1800x 8 core/16 thread - GTX 1060 6Gb, Asus ROG STRIX B350-F, 16Gb Corsair DDR4, Cooler Master N300 chassis, 6 HD (2SSD - 4Spinners) + 1 x optical.
Linux user #545703

Offline

#6 2019-08-06 18:46:45

Ropid
Member
Registered: 2015-03-09
Posts: 612

Re: Set cpu frequency when specific program is launched

What's going on with the cooling in your PC? Is the case clean (I mean with regards to dust)? Do you have enough case fans? Are all fans still working or are some of them broken and you didn't notice?

Offline

#7 2019-08-06 19:15:31

Roken
Member
From: UK
Registered: 2012-01-16
Posts: 979

Re: Set cpu frequency when specific program is launched

Less than 12 months old after a complete build, no smoking, and no sign of dust. As I say, this is under serious stress, and so understandable.

Maybe next step is liquid cooling.

For info. Others with the same CPU will be reading max temps around 75C. Ryzen 1700X and 1800X have a 20C differential. 75C at the die = 95C tctl.


[img=Speedtest]http://www.speedtest.net/my-result/5145583518[/img]

Ryzen 1800x 8 core/16 thread - GTX 1060 6Gb, Asus ROG STRIX B350-F, 16Gb Corsair DDR4, Cooler Master N300 chassis, 6 HD (2SSD - 4Spinners) + 1 x optical.
Linux user #545703

Offline

#8 2019-08-06 19:22:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,867
Website

Re: Set cpu frequency when specific program is launched

The actual CPU frequency isn't the cause of the heat so much as the voltage applied.  Not sure if your motherboard allows for it but you might be able to back off on the Vcore and maintain a stable max frequency.  This is something that you have to arrive at empirically.  See what the max Vcore is currently.  See if it can be manually adjusted.  Adjust in steps and each time run some stress test that has built in error detection.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2019-08-06 20:32:00

Roken
Member
From: UK
Registered: 2012-01-16
Posts: 979

Re: Set cpu frequency when specific program is launched

I understand the concept, but understanding and applying are two different things. It's why I've always shied away from overclocking, and that's why my preference is to restrict the clock selectively with software. This rig cost me a lot of money, and absent a TV and HiFi, is pretty much my entertainment system. Starting to mess with vcore scares me.


[img=Speedtest]http://www.speedtest.net/my-result/5145583518[/img]

Ryzen 1800x 8 core/16 thread - GTX 1060 6Gb, Asus ROG STRIX B350-F, 16Gb Corsair DDR4, Cooler Master N300 chassis, 6 HD (2SSD - 4Spinners) + 1 x optical.
Linux user #545703

Offline

#10 2019-08-06 20:42:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,867
Website

Re: Set cpu frequency when specific program is launched

You can tune it down without overclocking it.  Many motherboard manufactures give the chip more Vcore than is needed to maintain stable loads.  Anyway, google up on so called "undervolting" if you want to learn more.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2019-08-07 01:31:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,851

Re: Set cpu frequency when specific program is launched

graysky wrote:

You can tune it down without overclocking it.  Many motherboard manufactures give the chip more Vcore than is needed to maintain stable loads.  .

But, it always a balancing act between power and noise margin.  Reducing Vcore will reduce power.  It also reduces noise margin.  Reducing clock frequency is the other way to reduce power.  The only other option is to improve the thermal design by reducing the thermal conductivity, or providing a better (colder) heat sink.

Edit:  Lack of noise margin manifestes as transient hardware error induced kernel panics.   Also, I strongly suggest you not overvolt, it could destroy something.

Last edited by ewaller (2019-08-07 01:34:38)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB