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

    HUNSN RJ38 N100 CPU Clock Speeds

    Scheduled Pinned Locked Moved Hardware
    30 Posts 4 Posters 10.0k 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.
    • S
      Stewart
      last edited by

      I'm not sure if the Netgate forum is even the right place for posting this issue, but I'm trying to figure out the clocks on the N100 CPU in the HUNSN RJ38. The clocks look weird to me. This is a new install with no changes or modifications made other than I've enabled SSH and installed the stress app to /usr/local/bin/stress to put some load on it. (To get the right temp I had to run kldload -v coretemp otherwise it gets stuck at 27.9C)

      At Idle pfSense GUI shows:
      Current: (generally 1800-2000) MHz, Max: 806 MHz
      Temperature 38C. I think this is wrong as it doesn't change. I recall having to make a change when I was testing an N5095 box.
      CPU Usage 0%-1%
      Kill-A-Watt Shows: 10W

      Running /usr/local/bin/stress -c 1
      Current: (generally around 2900) MHz, Max: 806 MHz
      Temperature 44C. I think this is wrong as it doesn't change. I recall having to make a change when I was testing an N5095 box.
      CPU Usage 25%
      Kill-A-Watt Shows: 14W

      Running /usr/local/bin/stress -c 2
      Current: (generally around 2300) MHz, Max: 806 MHz
      Temperature 45C. I think this is wrong as it doesn't change. I recall having to make a change when I was testing an N5095 box.
      CPU Usage 50%
      Kill-A-Watt Shows: 13W

      Running /usr/local/bin/stress -c 3
      Current: (generally around 1900-2000) MHz, Max: 806 MHz
      Temperature 43C. I think this is wrong as it doesn't change. I recall having to make a change when I was testing an N5095 box.
      CPU Usage 75%
      Kill-A-Watt Shows: 13W

      Running /usr/local/bin/stress -c 4
      Current: (generally around 1800) MHz, Max: 806 MHz
      Temperature 47C. I think this is wrong as it doesn't change. I recall having to make a change when I was testing an N5095 box.
      CPU Usage 100%
      Kill-A-Watt Shows: 13W

      I can't say that looks right to me and doesn't seem to square up with the specs on Intel's Ark page for the N100. That shows a single core boost of 3.4Ghz and other places also list an all-core boost of 3.2Ghz.

      It doesn't matter if PowerD is on or off or if anything is changed off of Hiadaptive. The results are the same. Anyone have any ideas on this for this chip? It's new so I'm not expecting a lot of people to have direct experience with it yet.

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

        @Stewart said in HUNSN RJ38 N100 CPU Clock Speeds:

        To get the right temp I had to run kldload -v coretemp otherwise it gets stuck at 27.9C

        Just set coretemp as the thermal driver in Sys > Adv > Misc.

        The N100 is a speedshift CPU so you need to set the sysctl appropriately. Powerd (est/speedstep does nothing when speedshift loads.
        See: https://redmine.pfsense.org/issues/14047

        Steve

        S 1 Reply Last reply Reply Quote 0
        • S
          Stewart @stephenw10
          last edited by

          @stephenw10 Thanks on the thermal sensor. That gives me the correct temps. As for the speedshift settings I'm not sure I'm doing it right. I've added the following tuneables:
          dev.hwpstate_intel.0.epp 90
          dev.hwpstate_intel.1.epp 90
          dev.hwpstate_intel.2.epp 90
          dev.hwpstate_intel.3.epp 90
          but it seems to be worse. Loading 2-4 cores now maxes at 1500Mhz. Loading only 1 core is only 1700Mhz.. I'd read that setting them to 90 is essentially the same as PowerD HiAdaptive but that doesn't seem to be the case.

          Setting each dev.hwpstate_intel.n.epp to 0 is the same results as before adding anything.

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

            I use 80 on the system I have that supports it. Most users are looking to reduce power consumption so set it more aggressively.

            The default value there, 50, should give better performance. You can also disable it entirely.

            S 1 Reply Last reply Reply Quote 0
            • S
              Stewart @stephenw10
              last edited by

              @stephenw10 The n100 is a 6W chip. As such, I'm not looking to throttle it down to save power. There isn't really anywhere for it to go. Wouldn't 0 effectively be disabling it? I just want it to idle at minimum when doing nothing but kick up to 3Ghz+ when placed under load. I realize that most of the time it won't be pushed, even at 2.5Gb speeds, but I'm thinking I'll want all available power for it to do VPN encryption.

              1 Reply Last reply Reply Quote 1
              • M
                mvikman
                last edited by mvikman

                Did you try adding "hint.hwpstate_intel.0.disabled=1" to loader.conf ?
                That should disable SpeedStep and allow PowerD to control CPU speed.

                pfSense Plus 24.11-RELEASE (amd64)
                Dell Optiplex 7040 SFF
                Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                HPE 561T (X540-AT2), 2-port 10Gb RJ45
                HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

                S 1 Reply Last reply Reply Quote 1
                • S
                  Stewart @mvikman
                  last edited by

                  @mvikman Would that be one of the entries in the System Tunables page in System-Advanced?

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mvikman @Stewart
                    last edited by mvikman

                    @Stewart
                    https://docs.netgate.com/pfsense/en/latest/diagnostics/edit-file.html
                    Create a new file called /boot/loader.conf.local and put the line hint.hwpstate_intel.0.disabled="1" in it

                    pfSense Plus 24.11-RELEASE (amd64)
                    Dell Optiplex 7040 SFF
                    Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                    HPE 561T (X540-AT2), 2-port 10Gb RJ45
                    HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                      It might also be interesting to check machdep.hwpstate_pkg_ctrl.

                      That defaults to using the same setting for all cores in the package but SpeedShift can set the values per core. On a low TDP CPU like that it might give a significant advantage having only one core boosted when needed. It will likely stay there for longer if other cores are not using power / creating heat.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • S
                        Stewart @mvikman
                        last edited by

                        @mvikman Not sure that's working out as expected, either.

                        [2.7.0-RELEASE][root@pfSense.home.arpa]/root: sysctl dev.cpu.0
                        dev.cpu.0.temperature: 36.0C
                        dev.cpu.0.coretemp.throttle_log: 0
                        dev.cpu.0.coretemp.tjmax: 105.0C
                        dev.cpu.0.coretemp.resolution: 1
                        dev.cpu.0.coretemp.delta: 69
                        dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
                        dev.cpu.0.cx_usage_counters: 49468 0 0
                        dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 2124us
                        dev.cpu.0.cx_lowest: C1
                        dev.cpu.0.cx_supported: C1/1/1 C2/2/127 C3/3/1048
                        dev.cpu.0.freq_levels: 801/6000 800/6000 700/5160
                        dev.cpu.0.freq: 801
                        dev.cpu.0.%parent: acpi0
                        dev.cpu.0.%pnpinfo: _HID=ACPI0007 _UID=0 _CID=none
                        dev.cpu.0.%location: handle=\_SB_.PR00
                        dev.cpu.0.%driver: cpu
                        dev.cpu.0.%desc: ACPI CPU
                        
                        

                        Those freq_levels don't seem accurate. My understanding is that the first number in each pair is the speed and if the first number ends in a 1 it indicates TurboBoost. In that case my CPU doesn't go over 800Mhz? The System Information screen doesn't show any speeds at all.

                        CPU Type	Intel(R) N100
                        4 CPUs: 1 package(s) x 4 core(s)
                        AES-NI CPU Crypto: Yes (inactive)
                        QAT Crypto: No
                        
                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          That looks correct. The n100 base frequency is 800MHz. It turbos to much higher but powerd only sees that as 801. It can't see the actual turbo speeds as the CPU controls that itself based on the power and thermal restrictions.
                          The dashboard only shows a frequency when it's not running at max, which for Speedstep is anything above 800MHz.

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • M
                            mvikman
                            last edited by mvikman

                            I read somewhere that FreeBSD doens't show actual turbo frequencies, but it shows them as "Max+1MHz", so 801Mhz would indicate that it's on turbo clocking.

                            pfSense Plus 24.11-RELEASE (amd64)
                            Dell Optiplex 7040 SFF
                            Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                            HPE 561T (X540-AT2), 2-port 10Gb RJ45
                            HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                              Exactly. It only shows 801 for all frequencies above 800MHz.

                              Speedshift is a much better mechanism for controlling the CPU speed. It's in the CPU. It's much faster responding.

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                mvikman @stephenw10
                                last edited by

                                @stephenw10 Heh, my brain seems bit slow today... I posted the exact same thing as you, but just in different words... 😆
                                Speaking on loader.conf settings, manuals say that the formatting is variable="value", but I see that some settings are not using quotes on the value.
                                I'm guessing that it's a safe bet to always use quotes, even if it works without them?

                                pfSense Plus 24.11-RELEASE (amd64)
                                Dell Optiplex 7040 SFF
                                Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                                HPE 561T (X540-AT2), 2-port 10Gb RJ45
                                HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

                                stephenw10S 1 Reply Last reply Reply Quote 0
                                • S
                                  Stewart
                                  last edited by

                                  I'm thinking this probably isn't a pfSense/BSD issue. I installed Win11 on a secondary drive. Running Passmark's CPU Mark I'm only getting 4291/1789 where the database shows an average of 5653/1975. That's about 25% down on the MT and 9% down on the ST. I went into the BIOS and Changed PL1 and PL2 from Disabled to Enabled but left the values at 0. That bumped MT up a slight 3.5% to 4455 and ST up 9.6% to 1962. Practically no sample size but those are where the numbers are at the moment. Temps peak around 52C when running the tests with PL1 and PL2 on.

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

                                    @mvikman said in HUNSN RJ38 N100 CPU Clock Speeds:

                                    I'm guessing that it's a safe bet to always use quotes, even if it works without them?

                                    Yes. It will recognise that as logic true or false for a number of different syntaxes but the expected use is in quotes as shown on the man page.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      Stewart
                                      last edited by

                                      So, I've made some progress. While I may ultimately keep things at stock, I believe I may have found the issue. I initially read up on these units at servethehome and decided to look into their forums to see what others were saying. In the BIOS PL1 is set to 6W by default. If I raise it to 12.5W then performance numbers jump (along with a little electricity and a lot of heat). I've reset all the settings in pfSense back to default (tuneables, loader.conf, etc) and am testing again. Here is what I now get:

                                      At Idle pfSense GUI shows:
                                      Current: (generally 1800-2000) MHz, Max: 806 MHz
                                      Temperature 40C.
                                      CPU Usage 0%-1%
                                      Kill-A-Watt Shows: 9-10W

                                      Running /usr/local/bin/stress -c 1
                                      Current: (generally around 2900) MHz, Max: 806 MHz
                                      Max Temp Seen 48C.
                                      CPU Usage 25%
                                      Kill-A-Watt Shows: 13W

                                      Running /usr/local/bin/stress -c 2
                                      Current: (generally around 2900) MHz, Max: 806 MHz
                                      Max Temp Seen 52C.
                                      CPU Usage 50%
                                      Kill-A-Watt Shows: 14W

                                      Running /usr/local/bin/stress -c 3
                                      Current: (generally around 2900) MHz, Max: 806 MHz
                                      Max Temp Seen 58C.
                                      CPU Usage 75%
                                      Kill-A-Watt Shows: 16W

                                      Running /usr/local/bin/stress -c 4
                                      Current: (generally around 2900) MHz, Max: 806 MHz
                                      Max Temp Seen 64C.
                                      CPU Usage 100%
                                      Kill-A-Watt Shows: 17W

                                      I'm going to try with various PL1 settings and see what I get.

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

                                        Nice. Testing locally with a CPU that supports Speedshift I found it's difficult to actually see the CPU frequency because Speedshift operates fast enough that simply running sysctl triggers an increase!

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Stewart @Stewart
                                          last edited by

                                          Is there a good way to run Passmark's performance test inside our environment? Right now I'm doing it in Windows and, while useful information, isn't best suited for what we need. I've found to install into Linux the commands are:

                                          sudo apt install libncurses5
                                          wget https://www.passmark.com/downloads/pt_linux_x64.zip
                                          unzip pt_linux_x64.zip
                                          sudo ./PerformanceTest/pt_linux_x64
                                          

                                          I can't install libncurses5 using pkg and if I try to run the pt_linux_x64 it errors out

                                          ELF binary type "3" not known.
                                          Exec format error.  Binary file not executable.
                                          

                                          If not I can keep going in Windows. It would just be nice to not keep switching back and forth.

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

                                            pfSense is built in FreeBSD and FreeBSD is not Linux. 😉
                                            So I wouldn't expect that command to work. You would need a FreeBSD port.

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