Solved How to run an Intel CPU at full speed?

I am still having the worst problems with web browsing speed. One of the problems is FreeBSD is running the CPU at the "base" speed all the time.

This CPU is an N3710 which has a base speed of 1.6 ghz and a turbo speed of 2.56 ghz. FreeBSD runs this CPU at 1.6 ghz at all times. At no time does the speed go above 1.6 ghz. Combine this with the Falkon browser and it is a nightmare of epic proportions.
I tried running:
sudo sysctl debug.cpufreq.lowest=2000
with no change.
I tried running:
sudo powerd
with the error:
powerd: error reading supported CPU frequencies: No error: 0
I googled for the error with no good results.

With Linux and an N4100 which has a base speed of 1.1 ghz and a turbo speed of 2.4 ghz I can set the turbo speed to run at all times unless the processor gets too hot or is requiring too much power. This is pretty simple really.

I am disappointed that I have not been getting the speed out of this system that I should have been getting.
 
Find your CPU frequency:
sysctl dev.cpu.0.freq

Suppose the max is 2560. Then,

To set it to the max:
sysctl dev.cpu.0.freq=2560

To set it to the turbo mode, add +1, i.e. 2561:
sysctl dev.cpu.0.freq=2561
 
Try this in your /etc/rc.conf and see if helps:
Code:
powerd_enable="YES"
powerd_flags="-a hiadaptive"
 
So far I have not been able to get these approaches to work.

The highest sysctl dev.cpu.0.freq will go is 1601 no matter what I set.

Also powerd -a maximum will not make the CPU go higher either.

I checked the BIOS to see if there is anything slowing it down and it seems to be set for max performance.

Surely I would think that it should go above 1.6 ghz at least sometimes.
 
The interaction between the sysctl dev.cpu.0.freq, turbostat, and powerd is not clear.

Also the results from turbostat do not make sense. When I set dev.cpu.0.freq to 1601 then turbostat says BzyMHz is around 4267 or 4.2 ghz. The TSC MHz number in turbostat never rises above 1600. So it is still not obvious if the CPU is ever indeed speeding up beyond 1.6 ghz.
 
What version of FreeBSD are you using ?
I don't find the source, but I know that 13-RELEASE introduce a new method to manage cpu frequency that made powerd not working on certain system.
Also make sure that turbo boost is enabled in the bios.
 
turbostat says BzyMHz is around 4267 or 4.2 ghz.
Is it? Would you mind providing the output?

The TSC MHz number in turbostat never rises above 1600.
It's not supposed to.

So it is still not obvious if the CPU is ever indeed speeding up beyond 1.6 ghz.
That's easy enough to verify with any single-threaded CPU benchmark. Try 7z b -mmt=1 with dev.cpu.0.freq=1600 vs dev.cpu.0.freq=1601. (Powerd should be disabled for the test.)
 
sysctl dev.cpu.0.freq doesn't show the turbo, but it can set the turbo, i.e. max+1.
Set it with (+1), and then, do what shkhln said: check it with sysutils/turbostat.

BTW it would be nice to show us some output. You have a functional system, therefore it shouldn't be a problem.

###############################################
P.S./OT:

1.6 GHz is more than enough for using Firefox and/or Chromium. I set freq to the 1.2 GHz , with 40+ open tabs. Still smooth.
Having too many enabled extensions in the browser could slow down the browser.
Also if you're using uBlock Origin, enabling all "Filter lists" could slow down the browser. Same for similar extensions.

[EDIT]
Create a new Firefox profile, do not add any extensions, use the default setting, and check whether it is slow or not.
 
This CPU is an N3710 which has a base speed of 1.6 ghz and a turbo speed of 2.56 ghz.
No it doesn't. According to intel specs it does not have a turbo speed:
Intel® Turbo Boost Technology ‡ No
It says there that it has something else called "burst frequency", which then may or may not be be similar and may or may not work correctly.

The highest sysctl dev.cpu.0.freq will go is 1601 no matter what I set.
That's how it is supposed to be. There never was a fixed turbo speed. Only the option to increase temporarily someway above the regular max clock IF temperature allows and IF not all cores are used and IF power-saving C-states are enabled and IF it is allowed in BIOS.
So since the actually used frequency may be anywhere between regular max clock and max turbo, and we cannot know the current value, FreeBSD sysctl shows/sets it as regular max clock PLUS ONE.

Monitoring the actual CPU operation may work with the Intel tool sysutils/intel-pcm.That one reads the perf data directly from the cores and shows the cycles, instruction conters, cache hits etcetc. It is rather supposed for Xeon, but works on other chips also.
 
I am on 12.2.

This is turbostat output - notice the [FONT=monospace]Bzy_MHz[/FONT]:
Code:
turbostat version 17.06.23 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 11 CPUID levels; family:model:stepping 0x6:4c:4 (6:76:4)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM TM
CPUID(6): APERF, TURBO, DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-
HWPpkg, EPB
cpu3: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST No-MWAIT PREFETCH TURBO)
CPUID(7): No-SGX
cpu3: MSR_PLATFORM_INFO: 0x60002001400
6 * 133.3 = 800.0 MHz max efficiency frequency
20 * 133.3 = 2666.6 MHz base frequency
cpu3: MSR_IA32_POWER_CTL: 0x00000000 (C1E auto-promotion: DISabled)
cpu3: MSR_TURBO_RATIO_LIMIT: 0x00000000
cpu3: MSR_PKG_CST_CONFIG_CONTROL: 0x0014000f (UNlocked: pkg-cstate-limit=15: unknown)
NSFOD /sys/devices/system/cpu/cpu3/cpufreq/scaling_driver
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000000 (performance)
cpu2: MSR_IA32_ENERGY_PERF_BIAS: 0x00000000 (performance)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x035a0000 (90 C)
cpu2: MSR_IA32_TEMPERATURE_TARGET: 0x035a0000 (90 C)
Package Core    CPU     Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ     SMI     CPU%c1  CPU%c3C
PU%c6   CoreTmp
-       -       -       37      1.43    4267    1600    193     0       98.57   0.00  0
.00     62
0       0       0       11      0.44    4268    1600    193     0       99.56   0.00  0
.00     62
0       1       1       14      0.53    4267    1600    0       0       99.47   0.00  0
.00     62
1       0       2       112     4.37    4267    1600    0       0       95.63   0.00  0
.00     58
1       1       3       10      0.39    4267    1600    0       0       99.61   0.00  0
.00     58

I don't have any extensions running in Falkon or Otter beyond what is enabled by default. Falkon has ad blocking turned on by default and I turned on Otter's ad-blocking. I don't use those other browsers. I have written further justification concerning my choice in browsers in the thread about my system being broken down which I have recently marked as solved.

As I mentioned in the very first post, I know how modern Intel processors behave with regards to turbo boost or what have you. It is quite predictable and understandable with Linux. You can see the wattage thresholds or temperature thresholds being reached and the processor consequently downclocking from what you have requested. I do not have any of that information yet available to me within FreeBSD so it is hard to see what it is in fact doing.

As for benchmarking, I was more comfortable running glxgears instead of 7z. I was suprised to see that glxgears was much faster at 1601 than 1600. I can also "hear" the processor working faster at a much higher pitch than usual. It makes a kind of screaming noise through ground loop feedback in the audio system of this custom laptop I made. Setting 1600 to 1601 is a roundabout way of setting it but many things are different on FreeBSD so that is ok.
Typical 1600 speed on glxgears - 7337 frames in 5.0 seconds = 1467.379 FPS
Typical 1601 speed on glxgears - 10768 frames in 5.0 seconds = 2153.444 FPS
Not exactly a powerhouse with either one though.
 
Sometimes, the motherboard just needs a BIOS update. If you can get into the BIOS while plugged into Internet access, most motherboards can do it rather easily for you.
 
This is turbostat output - notice the [FONT=monospace]Bzy_MHz[/FONT]:
Code:
…
20 * 133.3 = 2666.6 MHz base frequency
That honestly looks weird. If you don't mind running turbostat under Linux as well (for comparison), that would help us to clarify whether this is a FreeBSD-specific bug.
 
Back
Top