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

2.40 idle cpu usage

Scheduled Pinned Locked Moved General pfSense Questions
11 Posts 5 Posters 1.4k 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.
  • H
    Harvy66
    last edited by Oct 20, 2017, 1:24 PM

    Accessing the web ui can eat up quite a bit of CPU in general because of PHP. Assuming 2.3.x and 2.4.x being having roughly the same CPU usage, a reason why CPU usage may seem higher is if 2.4 is better at idling the CPU. Check your CPU frequency. I have a 3.2ghz CPU, but under most loads, it's around 300mhz because it's mostly idle and it makes PHP seem much higher because CPU load is relative to the current frequency.

    1 Reply Last reply Reply Quote 0
    • V
      valnar
      last edited by Oct 20, 2017, 1:31 PM

      I'm comparing an old ALIX board on 2.34 vs my new APU2 running 2.40, so that could be true.  I'll reload 2.34 on the APU2 and see what happens.  thanks!

      1 Reply Last reply Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator
        last edited by Oct 20, 2017, 1:38 PM

        Very good point Harvy66.. Mine is really idle.. but cpu bounces up to 20% on esxi host monitor.. But the cpu is running at 122mhz ;)  On a really old AMD Turion II neo.. And that is with web gui open in my browser.

        idlecpu.png
        idlecpu.png_thumb

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • V
          valnar
          last edited by Oct 20, 2017, 2:06 PM

          I'm not sure how much I can change on a little 'old APU2 board, but it would be interesting to test that theory on an Intel box where you disable certain Speedstep mechanisms in the BIOS and look to see what it says.  Any takers?

          1 Reply Last reply Reply Quote 0
          • M
            m3xiz
            last edited by Oct 21, 2017, 7:20 AM

            I can safely say that I do not understand the explanation. I had the same issue on 2.4 running at 29% with no extra traffic compare to the 2.3, which was around 2%.
            How can I be sure that everything is ok? What is th3 link with the cpu frequency and the cpu utilisation…For extra complexity, I am running this pfsense on a esxi and configure it with 2 CPU.
            I imagine also that the cpu frquency can change over time...Conclusion: I am lost here.

            All clarifications are welcome  :D

            1 Reply Last reply Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by Oct 21, 2017, 8:06 AM

              Think of it this way… Pfsense is doing something all the time, even when "idle" all computers do..

              If your cpu clock is 1ghz and you see cpu usage at 1% lets call it...

              Now your cpu clocks down and is only running at 500mhz.. Your cpu is slower, so that same idle work the cpu was doing going to take more of that slow cpu to do that work.. so say 2% would be seen.  But its not that simple of ratio..

              So the point is that when a cpu clocks down from its full rate, then doing a specific amount of work would be seen at a different % then when the cpu was clocked at full % to do the same work.  You would need to make sure your cpu stays locked at full to compare them..  Which is not good for power usage, etc.

              The point being don't be so hung up on what the cpu % says when pfsense isn't doing anything.. What is doing when your using it and needing it to do its thing is more important.

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • V
                valnar
                last edited by Oct 21, 2017, 12:43 PM

                It's not that we're pointing fingers and saying anything is necessarily wrong folks, it's all about understanding!  I just want to learn.

                If the same piece of hardware has idle CPU at 1% on 2.3 but 9% on 2.4, I just want to know why, even if it's a red herring.  In my case though, I admittedly used two different pieces of hardware so I wanted clarification that is is a bug/feature/intended.

                1 Reply Last reply Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator
                  last edited by Oct 21, 2017, 1:41 PM

                  I don't think anyone is pointing fingers or anything is wrong.. I think your question is a very good/valid one.

                  I just don't have enough indepth understanding of different cpu's etc. etc.  To know what would be a normal value for your cpu and clock and if its clocking down, etc.  Or what you might have running in the background or what pfsense might be routing/firewalling, etc.

                  I personally just don't get so hung up if graph on the webgui shows 1% or 20%…. or bouncing between them.. I would prob be a bit concerned if showing high numbers and wasn't even doing anything.. Or if the device was running warm.. Or pulling more power than it should be when idle, etc.

                  I don't recall the little widget cpu thing ever being all that accurate of indicator, etc.  What does your top show you would be more useful info to what is going on.  Or even iostat for that matter show you cpu usage.  systat another good one... what does that show you?

                  Have you looked at top after hitting shift +s

                  Or what about htop... its not a default package but it is available via the pfsense repository... just pkg install htop

                  What trying to say is there lots of better ways to view what the cpu is doing and what its working on vs that little cpu widget ;)

                  systat.png
                  systat.png_thumb
                  shift_s.png
                  shift_s.png_thumb

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • ?
                    Guest
                    last edited by Oct 21, 2017, 4:20 PM

                    It's not that we're pointing fingers and saying anything is necessarily wrong folks, it's all about understanding!  I just want to learn.

                    My guess on that is that ZFS is needing more horse or cpu power and if there will be something likes encryption
                    in the game on top of this it might be the answer for me why since version 2.5 AES-NI is a must be too.

                    If the same piece of hardware has idle CPU at 1% on 2.3 but 9% on 2.4, I just want to know why, even if it's a red herring.  In my case though, I admittedly used two different pieces of hardware so I wanted clarification that is is a bug/feature/intended.

                    Version 2.1 > 2.2 it was a huge step, version 2.2 > 2.3 was a greater step and from version 2.3 > 2.4 it was a big step
                    now we are seeing perhaps something is changing from version 2.4 to 2.5 again and at least the biggest step from
                    version 2.5 to 3.0 as I am seeing it right. If this will be encounter on "other systems" from other "vendors" no
                    one cares and no one is asking why. MS Server is here a good example fo that; no one is hoping to get the same
                    performance on hardware for MS Server 2003/2008 if he installs then MS Server 2012/2016 on it or that he
                    needs real new hardware based on the drivers. And so many of the users were complaining that they were not
                    able to use their beloved Alix boards anymore since version 2.3 and since 2.4 any kind of 32Bit Hardware
                    and since version 2.5 when AES-NI is a must be this will be returning once more again I think.

                    What is with version 2.4 and no ZFS, let it also spiking the CPU so high?
                    Did you try out PowerD (high adaptive) to get not nailed on one MHz/GHz frequency?
                    Is perhaps ZFS "only" needing more horse (cpu) power and no one is knowing that exactly?

                    I'm comparing an old ALIX board on 2.34 vs my new APU2 running 2.40, so that could be true.  I'll reload 2.34 on the APU2 and see what happens.  thanks!

                    What is with 2.4 without ZFS? Is it then slow as now again? Or is the CPU scaling up to high?
                    It is not really fair to compare 32Bit hardware and system against 64Bit hardware and OS, for sure
                    but as I see it right it can also be pointed to a totally other thing we all lost here. The release jump
                    it self could also be causing some let us say not really wished or wanted effects, because at first
                    the entire version of 2.4 should be based on the FreeBSD 11.0 version and not it is based on the
                    FreeBSD version 11.1, could this also causing some things that are not really running well now?
                    No Plan Survives Contact with the Internet

                    In real I think only the developers will be able to tell something about the higher scaling cpu.

                    1 Reply Last reply Reply Quote 0
                    • M
                      m3xiz
                      last edited by Oct 22, 2017, 8:08 AM

                      Johnpoz, you just clarify in 30 lines a 3 page article I found via google. Needless to say that I was completely confused after that article.

                      Thank you. Very much appreciated.

                      M.

                      1 Reply Last reply Reply Quote 0
                      11 out of 11
                      • First post
                        11/11
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received