OPNsense Forum

English Forums => Hardware and Performance => Topic started by: Gilad on January 29, 2022, 12:20:51 pm

Title: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: Gilad on January 29, 2022, 12:20:51 pm
Hi,

I have the Deciso OPNsense DEC850, with the AMD EPYC 3201 (https://www.amd.com/en/products/embedded-epyc-3000-series) CPU, running OPNsense version 22.1 (was the same with versions 21.7.x).
This CPU should run at 1500MHz to 3100MHz frequency, but when running the shell command powerd -v I can see that it's actually never goes above 1500MHz:

Code: [Select]
load  40%, current freq 1500 MHz ( 0), wanted freq 2643 MHz
load  83%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  30%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  56%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  33%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  15%, current freq 1500 MHz ( 0), wanted freq 2906 MHz
load  68%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  51%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load   0%, current freq 1500 MHz ( 0), wanted freq 2906 MHz
load   0%, current freq 1500 MHz ( 0), wanted freq 2815 MHz
load   0%, current freq 1500 MHz ( 0), wanted freq 2727 MHz
load  82%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 129%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load   0%, current freq 1500 MHz ( 0), wanted freq 2906 MHz
load   0%, current freq 1500 MHz ( 0), wanted freq 1486 MHz
load   0%, current freq 1500 MHz ( 0), wanted freq 1439 MHz
load   4%, current freq 1500 MHz ( 0), wanted freq 1394 MHz
changing clock speed from 1500 MHz to 1400 MHz
load   0%, current freq 1400 MHz ( 1), wanted freq 1350 MHz
load   0%, current freq 1400 MHz ( 1), wanted freq 1307 MHz
load   0%, current freq 1400 MHz ( 1), wanted freq 1266 MHz
load  12%, current freq 1400 MHz ( 1), wanted freq 1226 MHz
load   0%, current freq 1400 MHz ( 1), wanted freq 1200 MHz
changing clock speed from 1400 MHz to 1200 MHz
load   0%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   3%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   0%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   3%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   8%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   4%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   5%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   0%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   0%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load   6%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load  15%, current freq 1200 MHz ( 2), wanted freq 1200 MHz
load 117%, current freq 1200 MHz ( 2), wanted freq 3000 MHz
changing clock speed from 1200 MHz to 1500 MHz
load  57%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  40%, current freq 1500 MHz ( 0), wanted freq 2402 MHz
load 105%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 122%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 100%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 105%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 100%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 104%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  98%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load  91%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 104%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 100%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 100%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 100%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 100%, current freq 1500 MHz ( 0), wanted freq 3000 MHz
load 100%, current freq 1500 MHz ( 0), wanted freq 3000 MHz

I've already tried (in System: Settings: Miscellaneous) to switch the PowerD off and on, and change the settings to Maximum, Minimum, Adaptive And Hiadaptive, but it makes no difference.

It's quite an expensive box, and one would assume that Deciso will make sure OPNsense support all the features of their own hardware...

Any ideas?
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: lilsense on January 29, 2022, 12:27:18 pm
yeah I see the same.... it may be that the powerd is not properly displaying.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: N0b0dy1985 on January 29, 2022, 02:05:53 pm
I also have the DEC-850. I don't think the issue is with how powerd is reporting, as sysctl verifies the CPU frequency is topped at 1500MHz. I am seeing the same behavior with powerd on or off. It looks to me like the C states are not properly defined. I am still searching for the documentation indicating what the supported C states for this CPU are, so that I can try to manually add them via sysctl.

Code: [Select]
root@fw:/home/zzz# sysctl -a | grep cpu.0
dev.cpu.0.temperature: 46.1C
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 0 0
dev.cpu.0.cx_usage: 0.00% 0.00% last 1000000us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/0 C2/2/100
dev.cpu.0.freq_levels: 1500/1425 1400/1260 1200/1050
dev.cpu.0.freq: 1500
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.0.%location: handle=\_PR_.C000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU
root@fw:/home/zz#
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: Gilad on January 29, 2022, 03:05:06 pm
Thanks, please post an update when you find something.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: lilsense on January 30, 2022, 06:05:16 pm
it may be a command in the tunables that need to be tweaked for 850.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: Gilad on January 30, 2022, 09:15:57 pm
This should have serious effect on the performance, I would expect that the Deciso guys are monitoring this forum.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: allebone on January 30, 2022, 10:07:47 pm
If I use the command:

sudo powerd -v

I see the similar:
load  39%, current freq 1104 MHz ( 0), wanted freq 3163 MHz
load 101%, current freq 1104 MHz ( 0), wanted freq 5400 MHz
load  20%, current freq 1104 MHz ( 0), wanted freq 5231 MHz
load   8%, current freq 1104 MHz ( 0), wanted freq 5067 MHz
load   0%, current freq 1104 MHz ( 0), wanted freq 4908 MHz
load  18%, current freq 1104 MHz ( 0), wanted freq 4754 MHz
load  14%, current freq 1104 MHz ( 0), wanted freq 4605 MHz
load   7%, current freq 1104 MHz ( 0), wanted freq 4461 MHz

So this command does not seem like a good test. If I use this command I do see frequency changing higher:

gnu-watch "sysctl -a dev.cpu | grep 'freq_levels\|freq'"

dev.cpu.3.freq_levels: 2700/-1
dev.cpu.3.freq: 1003
dev.cpu.2.freq_levels: 2700/-1
dev.cpu.2.freq: 1399
dev.cpu.1.freq_levels: 2700/-1
dev.cpu.1.freq: 3035
dev.cpu.0.freq_levels: 2700/-1
dev.cpu.0.freq: 2812


Not sure if you see similar?

Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: Gilad on January 31, 2022, 10:53:33 am
Getting only cpu.0, still nothing higher than 1500:

root@opnsense:~ # sysctl -a dev.cpu | grep 'freq_levels\|freq'

dev.cpu.0.freq_levels: 1500/1425 1400/1260 1200/1050
dev.cpu.0.freq: 1500
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: lilsense on January 31, 2022, 11:22:47 am
yup! I get the same...

dev.cpu.0.freq_levels: 1500/1425 1400/1260 1200/1050
dev.cpu.0.freq: 1500
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: AdSchellevis on January 31, 2022, 01:33:13 pm
1500 is logical for an AMD Epyc 3201 as this is the base frequency of the processor (https://www.amd.com/en/products/embedded-epyc-3000-series). 

Boost frequencies aren't reported to the operating system, I believe this is the same for Intel as it is for AMD by the way. A difference between both brands could be that the boost frequency is much higher than the base one in case of the Epyc models.

Best regards,

Ad
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: allebone on January 31, 2022, 05:13:01 pm
Strange, I do see a difference between my results and the people affected. Mine does show frequencies above 2700 which you can see above, as the CPU can turbo to 3100. Im wondering if a little more checking should be performed personally.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: AdSchellevis on January 31, 2022, 05:24:28 pm
@allbone which serial number has this device (printed on the barcode) and which software version is currently installed? According to AMD's own documentation the frequencies above base aren't reported, which makes yours the anomaly.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: allebone on January 31, 2022, 06:11:53 pm
I see what you mean, sorry no. I am using an intel on a protectli box. I was unaware AMD dont allow reporting of the frequency above the base clock. I guess intel must be different because mine seems to report.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: iMx on February 01, 2022, 11:48:52 am
My Intel i7-9700 does as well:

Code: [Select]
dev.cpu.7.freq_levels: 3000/-1
dev.cpu.7.freq: 4497
dev.cpu.6.freq_levels: 3000/-1
dev.cpu.6.freq: 4497
dev.cpu.5.freq_levels: 3000/-1
dev.cpu.5.freq: 4497
dev.cpu.4.freq_levels: 3000/-1
dev.cpu.4.freq: 4497
dev.cpu.3.freq_levels: 3000/-1
dev.cpu.3.freq: 4497
dev.cpu.2.freq_levels: 3000/-1
dev.cpu.2.freq: 4497
dev.cpu.1.freq_levels: 3000/-1
dev.cpu.1.freq: 4497
dev.cpu.0.freq_levels: 3000/-1
dev.cpu.0.freq: 4497

I'm just using hwpstate_intel, rather than PowerD - I had issues with that with this CPU, in 21.7 yet to try PowerD again on 22.1
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: N0b0dy1985 on February 08, 2022, 10:40:24 pm
Strange, I do see a difference between my results and the people affected. Mine does show frequencies above 2700 which you can see above, as the CPU can turbo to 3100. Im wondering if a little more checking should be performed personally.

So now I'm wondering, should I not be enabling powerd? Should I be using something else?
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: allebone on February 09, 2022, 05:03:43 am
I thought that if you didnt enable powerd then your cpu would not turbo. That was what i read about powerd anyway.
Title: Re: Deciso DEC850 - CPU speed goes up only to 1500MHz instead of 3100MHz?
Post by: AdSchellevis on February 09, 2022, 09:23:51 am
Quote
So now I'm wondering, should I not be enabling powerd? Should I be using something else?

You can safely enable powerd, the reported frequencies just won't be the same as the actual frequencies when in boost mode (it won't avoid boost when using powerd).