Bug 234733 - Setting CPU frequency with sysctl dev.cpu.0.fr slows a Ryzen 2700X down
Summary: Setting CPU frequency with sysctl dev.cpu.0.fr slows a Ryzen 2700X down
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.0-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2019-01-08 07:17 UTC by Erich Dollansky
Modified: 2019-07-10 21:53 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Erich Dollansky 2019-01-08 07:17:11 UTC

sysctl dev.cpu.0.fr=3700

or any other value for frequency slows the system down by nearly 50%.

System has a Ryzen 2700X as a CPU.

How to repeat:

Reboot the system with all power saving tools disabled.
Compile the world, it will take around 2h30min on the system mentioned above if that system call is never used.

Now issue the command

sysctl dev.cpu.0.fr=3700

which would bring a Ryzen 2700X to its nominal operating frequency.

Compile the world, it will take now around 4h30min.

I could repeat this error several times thinking originally that it is a powerd problem.

An e-mail by Andrea Venturoli (21 Dec 2018 17:40:49) made me look a bit into powerd.
Comment 1 sigsys 2019-07-10 21:53:59 UTC
Same thing happens for me on 12-STABLE on a Ryzen 2700.  The CPU frequency isn't going up once it has been lowered (even though it looks like it does according to that sysctl, the CPU actually remains much slower).  I haven't found any BIOS setting that fixes it.  It's on a B450 Pro4 motherboard with firmware P3.20.