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

    Constant 20% CPU Usage

    Scheduled Pinned Locked Moved Hardware
    14 Posts 3 Posters 8.7k 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.
    • L
      LoopyJuice
      last edited by

      Having tried pfSense on a VM with one core of an E8200 2.6ghz with 1gb RAM I decided to build a box for it and i'm seeing strange CPU usage on the new one, 20% pretty constant as interrupt.

      The system is a Jetway JNC9C-550 dual 1.5 Atom with 2GB RAM and running a 4gb CF card via a pretty decent CF->SATA convertor.

      Device polling is off in pfSense

      Everything in the BIOS is set to AHCI but i'm unsure if this would be causing the following:

      top -SH

      $ top -SH
      last pid: 34936;  load averages:  0.01,  0.03,  0.00  up 0+07:57:29    09:36:39
      109 processes: 6 running, 84 sleeping, 19 waiting
      
      Mem: 40M Active, 17M Inact, 48M Wired, 212K Cache, 22M Buf, 1875M Free
      Swap: 2048M Total, 2048M Free
      
        PID USERNAME PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
         11 root     171 ki31     0K    32K RUN     3 472:36 100.00% {idle: cpu3}
         11 root     171 ki31     0K    32K CPU0    0 468:26 100.00% {idle: cpu0}
         11 root     171 ki31     0K    32K CPU1    1 465:29 100.00% {idle: cpu1}
         12 root     -60    -     0K   160K CPU2    2 302:08 74.17% {irq7: ppc0}
         11 root     171 ki31     0K    32K RUN     2 174:05 28.17% {idle: cpu2}
      27883 root      45    0 53684K 19304K piperd  1   0:11  0.98% php
         12 root     -32    -     0K   160K WAIT    0   8:18  0.78% {swi4: clock}
          0 root      44    0     0K    48K sched   1   1:20  0.00% {swapper}
         12 root     -28    -     0K   160K WAIT    3   1:13  0.00% {swi5: +}
      51087 root      76   20  3656K  1468K wait    0   0:22  0.00% sh
      27769 root      76    0 54708K 23840K accept  0   0:14  0.00% php
      58293 root      64   20  3316K  1348K select  1   0:11  0.00% apinger
         14 root     -16    -     0K     8K -       3   0:09  0.00% yarrow
      25854 root      44    0  8636K  6728K kqread  0   0:09  0.00% lighttpd
      34658 dhcpd     44    0  7776K  4040K select  3   0:06  0.00% dhcpd
          2 root      -8    -     0K     8K -       3   0:05  0.00% g_event
       7872 root      44    0  9488K  4280K select  1   0:05  0.00% {mpd5}
         22 root      44    -     0K     8K syncer  1   0:04  0.00% syncer
      
      

      vmstat -i

      $ vmstat -i
      interrupt                          total       rate
      irq7: ppc0                    1132748931      38445
      irq19: atapci0++                   37580          1
      cpu0: timer                     58891836       1998
      irq256: re0                       341589         11
      irq257: re1                       270573          9
      cpu1: timer                     58890797       1998
      cpu2: timer                     58890477       1998
      cpu3: timer                     58890703       1998
      Total                         1368962486      46462
      
      
      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Are you using the parallel port (ppc0) header for anything?
        If not I'd disable it in the bios.

        Steve

        1 Reply Last reply Reply Quote 0
        • L
          LoopyJuice
          last edited by

          Nope not using it for anything (not sure I saw any options relating to it but i'll give it a go tonight) also seem to be running into overheating issues running this board fanless :( - possbily due to one core being loaded at 80% constantly by the parallel port… we'll see! (extrapolating this from the fact that the web interface just timed out and I can't get back in!)

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

            Have you enabled powerd? That will reduce your power consumption and hence heating considerably. Without powerd running a lot of the atoms power saving features are not used.
            Probably best to sort one thing at a time though.  ::)

            Steve

            Edit: Forgot to ask if you're using 1.2.3 or 2.0Beta?
            Powerd is much easier to use under 2.0.

            1 Reply Last reply Reply Quote 0
            • L
              LoopyJuice
              last edited by

              I think at this precise moment Powerd is off - I did turn it on when I was messing around the other night but have since reinstalled a fresh copy I think, BETA 2.0 btw as 1.2.3 breaks my Vodafone Suresignal box thingy (PPPOA -> PPPOE bridge via a Draytek 2820n and have to have the pfSense WAN interface set to 1500 MTU and 1500 MSS clamping (god knows if this is a bad idea, probably but its the only way i've managed to get the fem-2-cell box working) - 1.2.3 didn't have separate fields for the two :()

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

                Hmm, Interesting.
                So you have the Draytek in bridge mode as a pppoa to pppoe box into your pfsense box and your Vodaphone femtocell behind it? And the Vodaphone box requires special settings to make it work?  ::)
                That's another issue.

                Powerd requires that the kernel timecounter be set to something other than TSC (since this changes with cpu speed) which it was by default on my system. If you enable powerd without changing this you just get loads of errors on the console and no actual power action. See my post here.

                1 Reply Last reply Reply Quote 0
                • L
                  LoopyJuice
                  last edited by

                  Yes i'm using the Draytek as a rather expensive true bridge :)

                  Double yes on the vodafone box being hopeless, it seems to setup the VPN with oversized packets and fails miserably if there is any fragmentation, it flat out refused to work under 1.2.3 no matter how much mtu messing, firewall messing, scrubbing settings, fragmented packet settings etc I did (never did try 1540 though so that the MSS would be 1500…)

                  1 Reply Last reply Reply Quote 0
                  • L
                    LoopyJuice
                    last edited by

                    [Update]

                    Disabling the parallel port in the BIOS fixed the cpu usage issue, I enabled powerd and now have nice status messages like:

                    Intel(R) Atom(TM) CPU N550 @ 1.50GHz
                    Current: 749 MHz, Max: 1499 MHz

                    None of this would stop it hitting the 75C shutdown temp within a matter of 45 mins to an hour and turning off when running totally passive.

                    I ordered a slim 100mm Kaze Scythe fan and 2x 40mm 3500 rpm ones too not sure what i'd need to get it working. As it turns out, 1x 40mm exhausting air out the top from above the heatsink and 1x40mm intake on the M350 cutout at the front makes it run luke warm instead of flesh-searingly hot :) can't hear the fans until your ear is around 15cm from the box so i'm happy now :)

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

                      I wonder if it's adjusting the core voltage correctly as well as the frequency. Can you read that at all with a tool like mbmon?
                      Anyway I guess if you have to get within 15cm to hear it it's pretty quiet.  8)

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • N
                        naddie
                        last edited by

                        @stephenw10:

                        I wonder if it's adjusting the core voltage correctly as well as the frequency. Can you read that at all with a tool like mbmon?
                        Anyway I guess if you have to get within 15cm to hear it it's pretty quiet.  8)

                        Steve

                        I wonder this, too.  I have powerd turned on, using an Atom D510, and while it says Current: 215 MHz, Max: 1667 MHz, my power meter reads around 30W no matter what I do.  I was able to shave 3W off (26-27W now) by turning off Hyperthreading, though.

                        I was hoping to see more of a drop in power usage by enabling powerd, but since I don't, I wonder if the core voltage was still at maximum even though it is clocked down.

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

                          Not on the D510. Desktop Atoms, DXXX, don't have speed step so it's not possible to reduce the core voltage dynamically. The speed reduction you are seeing is the result of throttling and doesn't provide much by way of power saving.  :(

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • N
                            naddie
                            last edited by

                            @stephenw10:

                            Not on the D510. Desktop Atoms, DXXX, don't have speed step so it's not possible to reduce the core voltage dynamically. The speed reduction you are seeing is the result of throttling and doesn't provide much by way of power saving.  :(

                            Steve

                            That is what I was afraid of.  Thanks for clarifying.  BTW, according to Intel, the D510 doesn't even have the ability to step down in clock.  I wonder how pfSense is able to do it (or maybe it's just reporting incorrectly?).

                            http://ark.intel.com/Product.aspx?id=43098

                            If it's going to eat up power, I hope to see the ability to make it work with MagicJack, too, so I eliminate another box.

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

                              @naddie:

                              BTW, according to Intel, the D510 doesn't even have the ability to step down in clock.  I wonder how pfSense is able to do it (or maybe it's just reporting incorrectly?).

                              Like I said what you are seeing is CPU throttling using ACPI 'T' states. This is where some instructions are replaced by a 'clock stop' instruction and no processing is carried out. It doesn't actually reduce the CPU frequency. Surprisingly hard to find a decent explanation but here is something.

                              To stop it using throttling you can add hint.acpi_throttle.0.disabled=1 to your loader.conf file.

                              Other than enabling speedstep the biggest single thing I found to reduce power consumption was to replace the PSU with a far more efficient one.

                              Steve

                              1 Reply Last reply Reply Quote 0
                              • N
                                naddie
                                last edited by

                                @stephenw10:

                                @naddie:

                                BTW, according to Intel, the D510 doesn't even have the ability to step down in clock.  I wonder how pfSense is able to do it (or maybe it's just reporting incorrectly?).

                                Like I said what you are seeing is CPU throttling using ACPI 'T' states. This is where some instructions are replaced by a 'clock stop' instruction and no processing is carried out. It doesn't actually reduce the CPU frequency. Surprisingly hard to find a decent explanation but here is something.

                                To stop it using throttling you can add hint.acpi_throttle.0.disabled=1 to your loader.conf file.

                                Other than enabling speedstep the biggest single thing I found to reduce power consumption was to replace the PSU with a far more efficient one.

                                Steve

                                Thanks for the link.  That helps explain things alot.  Since you're not reducing power consumption, I guess it doesn't matter if powerd is on or off except the potential to reduce performance if it's left on and soemthing goes awry.

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