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

100% CPU Usage

Scheduled Pinned Locked Moved General pfSense Questions
16 Posts 4 Posters 5.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.
  • L
    LordCadbury
    last edited by Feb 4, 2015, 11:34 AM

    Hi

    I've been running my pfsense install as a VM for a few months now with no issues. The VM is has a single core and 1GB of Ram and a dedicated dual HP (intel) nic, there are 5 interfaces, 1 WAN (on em1) and 4 on em0 (3 VLANS). I'm running 2.2 and have a few packages running, bandwidthd, darkstat, Open-VM-Tools, pfBlockerNG, Postfix (not configured), RRD summary, snort, squid3 and squidGaurd.

    The CPU usage in pfsense Dashboard shows 100% and 3.4Ghz of consumed host CPU under vSphere even though there is almost zero traffic across any of the interfaces. I've attached a copy of the System Activity screen which shows squid at the top with WPCU 1.98% but I'm not entirely that's a bad thing.

    Do anyone have any suggestions where I can look next for more clues?

    Thanks

    ![Screen Shot 04 -02-15 at 11.23 AM.JPG](/public/imported_attachments/1/Screen Shot 04 -02-15 at 11.23 AM.JPG)
    ![Screen Shot 04 -02-15 at 11.23 AM.JPG_thumb](/public/imported_attachments/1/Screen Shot 04 -02-15 at 11.23 AM.JPG_thumb)

    1 Reply Last reply Reply Quote 0
    • M
      muswellhillbilly
      last edited by Feb 4, 2015, 11:59 AM

      Try running 'top -S'. This will show kernel activity. Also, try 'ps -aux | head' to see which processes are using the most CPU.

      1 Reply Last reply Reply Quote 0
      • L
        LordCadbury
        last edited by Feb 4, 2015, 1:00 PM

        I hadn't noticed your reply and I killed the squid service, and the CPU usage dropped back down to 0%. I think that this thread may need to be moved to packages?

        1 Reply Last reply Reply Quote 0
        • K
          kejianshi
          last edited by Feb 4, 2015, 1:05 PM

          Yeah - Sending a screen shot of very low CPU utilization doesn't exactly support your thread title…

          1 Reply Last reply Reply Quote 0
          • L
            LordCadbury
            last edited by Feb 4, 2015, 2:34 PM Feb 4, 2015, 2:27 PM

            @muswellhillbilly:

            Try running 'top -S'. This will show kernel activity. Also, try 'ps -aux | head' to see which processes are using the most CPU.

            I ran the 2 commands, attached are the outputs.

            Added a screen shot of the Summary > resources tab in vSphere.

            ![Screen Shot 04 -02-15 at 02.20 PM.JPG](/public/imported_attachments/1/Screen Shot 04 -02-15 at 02.20 PM.JPG)
            ![Screen Shot 04 -02-15 at 02.19 PM.JPG](/public/imported_attachments/1/Screen Shot 04 -02-15 at 02.19 PM.JPG)
            ![Screen Shot 04 -02-15 at 02.29 PM 001.JPG](/public/imported_attachments/1/Screen Shot 04 -02-15 at 02.29 PM 001.JPG)
            ![Screen Shot 04 -02-15 at 02.20 PM.JPG_thumb](/public/imported_attachments/1/Screen Shot 04 -02-15 at 02.20 PM.JPG_thumb)
            ![Screen Shot 04 -02-15 at 02.19 PM.JPG_thumb](/public/imported_attachments/1/Screen Shot 04 -02-15 at 02.19 PM.JPG_thumb)
            ![Screen Shot 04 -02-15 at 02.29 PM 001.JPG_thumb](/public/imported_attachments/1/Screen Shot 04 -02-15 at 02.29 PM 001.JPG_thumb)

            1 Reply Last reply Reply Quote 0
            • H
              Harvy66
              last edited by Feb 4, 2015, 2:49 PM Feb 4, 2015, 2:42 PM

              While the individual percentages show about 6%, all with squid, the load averages show 400% on a single core. Because top isn't showing what is actually creating that load, even though it is counting that load, my first guess would be a strange VM interaction with network or storage drivers. My first guess would be something to do with the storage driver because squid is the only thing listed as using CPU.

              I have only theoretical understandings of how VMs work and no practice, so I could be wrong with my guesses.

              1 Reply Last reply Reply Quote 0
              • M
                muswellhillbilly
                last edited by Feb 4, 2015, 3:07 PM Feb 4, 2015, 2:49 PM

                What does the Dashboard on the pfsense show now? (Status/Dashboard) Does this reflect the same usage you're seeing on VSphere?

                Another thought: It may be that Squid or some other process may be spawning numerous other processes which individually don't take up much cpu but collectively do. Can you run a 'ps -aux > cpu.txt' and post the 'cpu.txt' file?

                1 Reply Last reply Reply Quote 0
                • L
                  LordCadbury
                  last edited by Feb 4, 2015, 3:10 PM

                  Attached is a screenshot of both.

                  ![Screen Shot 04 -02-15 at 03.05 PM.JPG](/public/imported_attachments/1/Screen Shot 04 -02-15 at 03.05 PM.JPG)
                  ![Screen Shot 04 -02-15 at 03.05 PM.JPG_thumb](/public/imported_attachments/1/Screen Shot 04 -02-15 at 03.05 PM.JPG_thumb)

                  1 Reply Last reply Reply Quote 0
                  • H
                    Harvy66
                    last edited by Feb 4, 2015, 3:18 PM

                    It is very interesting that you're at 100% load but PFSense says you're 3.3ghz CPU is at 411mhz. What are your PowerD settings?

                    1 Reply Last reply Reply Quote 0
                    • M
                      muswellhillbilly
                      last edited by Feb 4, 2015, 4:38 PM

                      Yet another thought: Are you running VMWare Tools on this guest?

                      1 Reply Last reply Reply Quote 0
                      • L
                        LordCadbury
                        last edited by Feb 4, 2015, 4:56 PM

                        Open-VM-Tools is inatalled and powerd is off.

                        1 Reply Last reply Reply Quote 0
                        • M
                          muswellhillbilly
                          last edited by Feb 5, 2015, 2:22 PM

                          Ok, I've done a bit of Googling (wonderful thing, Google!), and found that this is a more common problem than perhaps you thought. There are a number of posts on this very forum which raise the issue, eg: https://forum.pfsense.org/index.php?topic=70092.0. You might have a look at some of the other forum entries to see if anyone else has come up with a solution.

                          One thing which did come up was the use of the VMXNET NIC driver as an alternative to the E1000 driver. Apparently there have been instances where the use of the wrong NIC driver has resulted in this sort of CPU behaviour. I don't know which ones you may be using on your VM, but you might try changing these as a test. Apparently pfSense will work with the VMXNET3 driver, so perhaps give that a go.

                          See also: https://forum.pfsense.org/index.php?topic=56858.0

                          1 Reply Last reply Reply Quote 0
                          • L
                            LordCadbury
                            last edited by Feb 5, 2015, 4:17 PM

                            The vm has a dedicated dual port HP (intel) nic so its not using the software E1000 or VMXNET3 nics/drivers. The spike in CPU has only been since upgrading to 2.2 and or when squid is running. Attached are 2 out puts from 'ps -aux'.

                            Thanks

                            cpu_no_squid.txt
                            cpu_with_squid.txt

                            1 Reply Last reply Reply Quote 0
                            • M
                              muswellhillbilly
                              last edited by Feb 5, 2015, 4:43 PM

                              The VM has to have the NICs defined within the VM settings in VMWare. Your hardware is using the Intel equipment, sure, but the VM will have to have it's own NICs defined in the guest parameters.

                              The output files you've posted seem to show Squid running in both cases, so I can't see any difference between them from that perspective.

                              1 Reply Last reply Reply Quote 0
                              • L
                                LordCadbury
                                last edited by Feb 6, 2015, 8:48 AM

                                I apologise for not making myself clear but I use VT-d to pass through a dual port HP NIC to my VM, so no NIC's are defined in the VM settings.

                                I've attached 2 ps -aux out puts, high_cpu.txt is from when squid was running and installed and low_cpu.txt is from after uninstalling squid and squid-guard. To me the output files do not suggest that the squid process(es) are the issue, however, monitoring the actual CPU usage before and after uninstalling squid/squid-guard from the hypervisor does suggest that squid may be at fault.

                                Does anyone else agree? Does this thread need moving?

                                1 Reply Last reply Reply Quote 0
                                • M
                                  muswellhillbilly
                                  last edited by Feb 6, 2015, 9:07 AM

                                  Given you have a VMWare stack available, have you tried installing a test pfSense system in parallel to see whether you can duplicate these effects on a different guest on the same VM environment? It might be worth setting this up using NICs defined within the VM config instead and see whether the same issue arises. I've heard of a number of issues concerning upgrading to 2.2 and maybe a clean install would be a useful way to establish if the problem is down to the (in-place?) upgrade.

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