pfSense Support Subscription

Author Topic: SG-1000 CPU usage and webgui hanging  (Read 1018 times)

0 Members and 1 Guest are viewing this topic.

Offline lordbob75

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
SG-1000 CPU usage and webgui hanging
« on: June 23, 2017, 09:15:14 pm »
I've had my SG-1000 for a few months now, and I really like it, though I've been noticing some issues.

My CPU usage seems to always be at 100%, and any reductions in usage last seconds at best.  This occurs whether there is mere kilobytes of data, or I max out my connection.

I have no real idea if this is related, but the webgui is extremely slow.  Sometimes it can take literally minutes to load a page.  I realize the hardware isn't super powerful, so perhaps that's all it is, but it seems like it's too slow.

Also possibly related, the webgui will hang and then return a page unavailable error through the browser (as if my network was down).  This mostly only happens when I max out my download (60Mbps), which should be just over half of what the sg-1000 is supposed to handle.  Now, my connection seems to stay up while this is happening as Netflix usually continues to work, but sometimes sites won't load.  I know this can happen when the connection is overloaded, so I turned off the downloads, but the webgui doesn't want to come back and the connection issues to websites continue until I reboot the sg-1000.  I am not able to SSH into it either, it simply never connects.  It doesn't even give me a connection error.

I'm not sure this is the sg-1000 causing all of this, but it seems related.  Any ideas?  Any assistance is appreciated.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21495
  • Karma: +1458/-26
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #1 on: June 26, 2017, 08:04:23 am »
Connect to the console and watch the output of "top -aSH" at a shell prompt while you use the device. That will be more accurate than watching from the GUI, which consumes a lot of CPU itself.

What packages or services do you have enabled on the firewall? Any traffic shaping or limiters?
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline rnatalli

  • Jr. Member
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #2 on: June 26, 2017, 06:12:52 pm »
I've been testing one of these and it's a sensitive little sucker.  I'm running an OpenVPN client, PFBlocker NG, and Watchdog and it runs okay for SOHO.  One of the tricks is making sure none of your packages are updating too frequently and/or at peak times.  For example, when I setup PFBlocker originally, it was set to update its lists every couple hours and that would hang the interface, although the network traffic was flowing for the most part.  Set this for 3am and this problem has disappeared.

Offline chrcoluk

  • Sr. Member
  • ****
  • Posts: 398
  • Karma: +20/-50
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #3 on: June 26, 2017, 10:52:03 pm »
I discovered recently certain tasks will cause the GUI to hang.

e.g. if my WAN goes down, the process of attempting to reconnect can cause the GUI to hang, maybe this is one of the reasons for the planned changed after 2.4.

If the GUI does get stuck you can force a restart of php-fpm from the shell menu, but that can break tasks currently been run by any scripts.
pfSense 2.4
Qotom Q355G4 or Braswell N3150 with Jetway mini pcie 2x intel i350 lan - 4 gig Kingston 1333 C11 DDR3L
 - 60 gig kingston ssdnow ssd - ISP Sky UK

Offline lordbob75

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #4 on: June 28, 2017, 07:47:40 pm »
Connect to the console and watch the output of "top -aSH" at a shell prompt while you use the device. That will be more accurate than watching from the GUI, which consumes a lot of CPU itself.

What packages or services do you have enabled on the firewall? Any traffic shaping or limiters?
I've got:
BandwidthD (removing this though)
Net-SNMP (will remove in favour of telegraf)
openvpn-client-export
PFBlockerNG
Service_WatchDog
Softflowed (will remove in favour of telegraf)

PFBlockerNG just does DNS adblocking, no shaping.  I never setup any limiting or shaping.

I'll have to try console if this happens again.


I've been testing one of these and it's a sensitive little sucker.  I'm running an OpenVPN client, PFBlocker NG, and Watchdog and it runs okay for SOHO.  One of the tricks is making sure none of your packages are updating too frequently and/or at peak times.  For example, when I setup PFBlocker originally, it was set to update its lists every couple hours and that would hang the interface, although the network traffic was flowing for the most part.  Set this for 3am and this problem has disappeared.
My PFBlockerNG lists update one list per day late at night.  They were not running at the time this occured.


I discovered recently certain tasks will cause the GUI to hang.

e.g. if my WAN goes down, the process of attempting to reconnect can cause the GUI to hang, maybe this is one of the reasons for the planned changed after 2.4.

If the GUI does get stuck you can force a restart of php-fpm from the shell menu, but that can break tasks currently been run by any scripts.
Makes sense.  I figured there was a good chance it was just overloaded.  I cannot get to the shell from SSH though, will have to try on console next time.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21495
  • Karma: +1458/-26
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #5 on: June 29, 2017, 12:32:37 pm »
"PFBlockerNG just does DNS adblocking"

That feature can use quite a lot of memory, and the SG-1000 does not have a lot of memory to start with. When a FreeBSD system runs out of RAM one of the symptoms is that processes for the GUI/SSH/Console may stop responding until the RAM demand goes down. Eventually the process that requested the RAM and failed will stop and it will come back. If you see a serial console message about being out of swap space, then you need to cut down the number of things running or options configured since you're probably running it out of RAM.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline lordbob75

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #6 on: June 29, 2017, 11:52:40 pm »
"PFBlockerNG just does DNS adblocking"

That feature can use quite a lot of memory, and the SG-1000 does not have a lot of memory to start with. When a FreeBSD system runs out of RAM one of the symptoms is that processes for the GUI/SSH/Console may stop responding until the RAM demand goes down. Eventually the process that requested the RAM and failed will stop and it will come back. If you see a serial console message about being out of swap space, then you need to cut down the number of things running or options configured since you're probably running it out of RAM.

Interesting.  That's unfortunate, but makes sense.  I assume there is no way to add memory to it?  I'll have to check on the memory usage and see if it's possible to reduce.  I know some of my lists are probably unnecessary so I can probably trim it down some.

Thanks for the assistance!

Offline mezzoman

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #7 on: December 30, 2017, 06:24:23 pm »
I have this same issue, even with no packages.  (I had PFBLocker and OpenVPN installed but I removed them just to see if it would have a positive effect).  CPU at 100% continuously in the webGUI.  I did connect with a USB console cable and checked the processes with top -aSH.  netstat was at times 1200%+ of CPU.  It was immediately niced, but over the course of ~60 seconds it popped to the top (punn intended) 10 or so times ranging from 500% of CPU to 1200%.  Any insight is appreciated.  This is with no extra packages and even the internal DNS resolver/forwarder turned off.  (It was unbearable with it on ;-)

Thanks!

Offline Grimson

  • Full Member
  • ***
  • Posts: 263
  • Karma: +36/-2
    • View Profile

Offline mezzoman

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: SG-1000 CPU usage and webgui hanging
« Reply #9 on: December 30, 2017, 06:58:42 pm »
Thanks!