Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Issues with CPU frequency after upgrade 23.01

    Scheduled Pinned Locked Moved Hardware
    38 Posts 11 Posters 7.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      csardoss @gniting
      last edited by

      @ibbetsion I did not turn this off. From what I can understand, that function is no longer supported with BSD14

      Dobby_D 1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        It still works for CPUs that have Speed Step but not Speed Shift. It seems more sensitive to usage in the high adaptive mode then it was in FreeBSD 12.

        1 Reply Last reply Reply Quote 1
        • Dobby_D
          Dobby_ @csardoss
          last edited by

          @csardoss said in Issues with CPU frequency after upgrade 23.01:

          I did not turn this off. From what I can understand, that function is no longer supported with BSD14

          On the other hand it might be also based on the CPU that is in usage.

          #~. @Dobby

          Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
          PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
          PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

          1 Reply Last reply Reply Quote 0
          • bingo600B
            bingo600
            last edited by bingo600

            Thanx Guyzz.
            I had an i3-7100 that was mostly on 2398MHz (of 2400)
            It wasn't actually running hot, the Hystou/Protecli chassis must be a nice cooler.
            But no reason to waste power .....

            I ended up with these notes in my 23.01 install log

            On 23.01 it seems like they changed the way to control the CPU speed (Speed Shift).
            This overrides the old SpeedStep , if the CPU is Speed Shift capable , and practically rendering the old pfSense PowerD unusable on those CPU's
            
            In order to control Speed Shift on the newer CPU's supporting it do the below:
            
            Check in the boot messages if the cpu supports Speed Shift.
            
            My Hystou Box dmesg output: 
            
            It's an i3 7100 - with just 2 cores & HT , but it seems like the HT's are seen as cores.
            hwpstate_intel0: <Intel Speed Shift> on cpu0
            hwpstate_intel1: <Intel Speed Shift> on cpu1
            hwpstate_intel2: <Intel Speed Shift> on cpu2
            hwpstate_intel3: <Intel Speed Shift> on cpu3
            
            
            
            So I have to add Speed Shift control for that CPU.
            
            Go to - System --> Advanced --> System Tunables
            
            Add an entry per core you found via dmesg.
            
            NB. : I ended on a value of 75 instead the below 80 , and i disabled PowerD
            
            
            dev.hwpstate_intel.0.epp
            80
            CPU 0 Speed Shift Level
            
            dev.hwpstate_intel.1.epp
            80
            CPU 1 Speed Shift Level
            
            dev.hwpstate_intel.2.epp
            80
            CPU 2 Speed Shift Level
            
            dev.hwpstate_intel.3.epp
            80
            CPU 3 Speed Shift Level
            

            Now it is idling at 597MHz , stepping up to 1798 / 2098 / 2397 when xferring a 5GB file via VPN to the summerhouse (200Mbit)

            /Bingo

            If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

            pfSense+ 23.05.1 (ZFS)

            QOTOM-Q355G4 Quad Lan.
            CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
            LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

            C 1 Reply Last reply Reply Quote 1
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Hmm, interesting. That CPU is not shown as having speed shift but it looks like it's on gen 6 CPUs and above....

              V 1 Reply Last reply Reply Quote 0
              • V
                Vollans @stephenw10
                last edited by

                @stephenw10 Curiously, my N5105-based device which also shows having Speed Shift really didn’t like it. Even if I set it at 95 it would only shift between 1900 and 2080, and didn’t drop back to the usual 700s at all. It’s still working fine with the ā€œnormalā€ PowerD utility, though, so it’s not a major issue. shrug

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Where were you checking that? From the sysctl output?

                  Seeing some quirkiness with the way the dashboard reports it here. Seems to only update a few times then stop.

                  V bingo600B 2 Replies Last reply Reply Quote 2
                  • V
                    Vollans @stephenw10
                    last edited by

                    @stephenw10 Hmm. Might check again, as I was looking at the web dashboard which always showed in a timely fashion on previous versions. Thanks!

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Mmm, there are definite differences. Speed Shift can set each CPU differently and the dashboard only shows CPU0. That was fine when they were all locked at the same clock speed. Might need to update that.

                      V 1 Reply Last reply Reply Quote 0
                      • V
                        Vollans @stephenw10
                        last edited by

                        @stephenw10 Ok, can confirm seeing shifting on the command line for the N5105. That needs settings around 90-100 to get anything close to the adaptive, though, otherwise it’s sitting in the high 1000s most of the time and never adapts. If you set it around 75-80 it goes into turbo mode most of the time of 2.5GHz or so, which is overkill for these little fanless boxes.

                        1 Reply Last reply Reply Quote 0
                        • bingo600B
                          bingo600 @stephenw10
                          last edited by

                          @stephenw10 said in Issues with CPU frequency after upgrade 23.01:

                          Where were you checking that? From the sysctl output?

                          Seeing some quirkiness with the way the dashboard reports it here. Seems to only update a few times then stop.

                          How do you check that sysctl output (i hope it's a cli command).
                          I was grumbling a bit, over my settings.
                          The dashboard shows nice shifts , and idling around 597MHz.

                          But my CPU Temperature doesn't really change (reflect the lower speed) ...
                          With out any modifications it was showing around 43C , and Dashboard showed cores spend a lot of time on 2+ GHz.

                          Now at 597MHz i'm at a CPU temp of 41C w. peeks upwards 53C when it "boosts clock".

                          I'm quite happy w. a temp of 41..43C on a passively cooled box in the livingroom.
                          Was just wondering why a CPU shift of 1.4GHz downwards weren't showing more difference in temp.

                          Actually even more thinking if it was not really running 2398MHz when PowerD was active, and the GUI showed that speed.

                          My Qotom i5 (22.05) was idling at around 1100..1600MHz , and had a about the same temp.

                          /Bingo

                          If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                          pfSense+ 23.05.1 (ZFS)

                          QOTOM-Q355G4 Quad Lan.
                          CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                          LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            You might have higher level C states available already. In previous testing those tend to swamp any savings made by P states except at moderate CPU usage. Check 'sysctl dev.cpu.0'

                            You can disable Speed Shift and go back to using Powerd:
                            https://man.freebsd.org/cgi/man.cgi?query=hwpstate_intel#LOADER_TUNABLES

                            One interesting thing is that the speedshift driver can attach and enable on CPUs even when SpeedStep is disabled in the BIOS. So on systems where that can't be enabled it makes quite a difference. Like on this i3-6100t:

                            Screenshot from 2023-02-21 23-06-36.png

                            Steve

                            bingo600B 1 Reply Last reply Reply Quote 0
                            • bingo600B
                              bingo600 @stephenw10
                              last edited by bingo600

                              @stephenw10
                              How do you do that nice Temp Graph ??
                              Is that "external" via snmp or so ???

                              I can pull some (last hour) cpu info from the Zabbix FreeBSD plugin, but not temp

                              ea20ce78-257b-453e-86c9-efc79643d4c7-image.png

                              aac077e2-ab58-40b6-b12c-aa9083f3c8b4-image.png

                              505532ca-2fea-447b-8f5c-78949590df74-image.png

                              /Bingo

                              If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                              pfSense+ 23.05.1 (ZFS)

                              QOTOM-Q355G4 Quad Lan.
                              CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                              LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                Nope it's the Thermal Sensors graph from Status > Monitoring.

                                1 Reply Last reply Reply Quote 1
                                • bingo600B
                                  bingo600
                                  last edited by

                                  Dooh ...

                                  That's a super nice feature - The monitoring stuff .... Was disabled on my Box.

                                  Found it

                                  9ee60a3e-b646-41a8-812d-7e9c773afeec-image.png

                                  Thnx

                                  If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                  pfSense+ 23.05.1 (ZFS)

                                  QOTOM-Q355G4 Quad Lan.
                                  CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                  LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    Yeah, that was added relatively recently. It can be very useful in diagnosing hardware issues.

                                    1 Reply Last reply Reply Quote 0
                                    • S SteveITS referenced this topic on
                                    • Dobby_D Dobby_ referenced this topic on
                                    • S SteveITS referenced this topic on
                                    • bingo600B
                                      bingo600
                                      last edited by

                                      I have just upgraded my Hystou from 23.01 to 23.05.
                                      It was a succesfull upgrade (as usual) šŸ‘
                                      Well ... besides the zabbix client package. But i have learnt that this one always have issues. So delete & reinstall after bootup.

                                      What i noticed though, was that the Hystou was again running quite hot ....
                                      Behaving 100% like on 23.01 (first post).

                                      So i added the "tunables entries once more", and disabled powerD
                                      7d0a5f20-ec7a-4cee-87f1-94749d765172-image.png

                                      And it seems to helped again.

                                      Was i too impatient ??
                                      I would ave expected 23.05 to have implemented the fix ....

                                      /Bingo

                                      If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                      pfSense+ 23.05.1 (ZFS)

                                      QOTOM-Q355G4 Quad Lan.
                                      CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                      LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        There is no additional tuning for SpeedShift in 23.05.

                                        It will be enabled by support if your CPU supports it and the default values run the CPU faster/hotter than SpeedStep did on a system expected to run at low load.

                                        Adding tunables to set the targets like that (or even higher numbers) will return the performance to SpeedStep like level. Except that SpeedShift is better in several ways still.

                                        https://redmine.pfsense.org/issues/14047

                                        Steve

                                        bingo600B 1 Reply Last reply Reply Quote 0
                                        • bingo600B
                                          bingo600 @stephenw10
                                          last edited by bingo600

                                          @stephenw10

                                          So "In plain english" , 23.05 has the 23.01 issue fixed.
                                          And i should delete my "tunables", and give it a try ??
                                          Correct ?

                                          Should i enable PowerD , that i use to have enabled to activate the 23.05 speed/power adapt ?

                                          Btw: The PR you listed above, has 23.09 as target

                                          /Bingo

                                          If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                          pfSense+ 23.05.1 (ZFS)

                                          QOTOM-Q355G4 Quad Lan.
                                          CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                          LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            No, 23.05 behaves the same as 23.01 with regard to SpeedShift.

                                            Enabling SpeedStep (powerd) does nothing unless you disable SpeedShift. You can do that by setting hint.hwpstate_intel.0.disabled="1".

                                            Since SpeedShift is better that SpeedStep in every way except the default values (IMO). I recommend just setting the values as you have in both 23.01 and 23.05.

                                            Steve

                                            bingo600B 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.