OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Hardware and Performance »
  • High CPU-load
« previous next »
  • Print
Pages: [1]

Author Topic: High CPU-load  (Read 155 times)

ThomasE

  • Newbie
  • *
  • Posts: 25
  • Karma: 1
    • View Profile
High CPU-load
« on: December 02, 2024, 11:36:23 am »
Hi,

our system is a Intel(R) Xeon(R) E-2378 CPU @ 2.60GHz (8 cores, 8 threads) with 64GB of RAM and four Intel 10Gbit NICs. We're having about 300 VLAN interfaces and a symmetric 2GBit/s line to connect to the internet which will hopefully become 4GBit/s in the near future. Almost all traffic is internet traffic and thus limited by our external connection. We're running a captive portal with a few hundred connected clients and the usual DHCP, unbound DNS, NTP - all of which shouldn't need large amounts of CPU power.

During normal operation this setup works just fine (load ~5), but as soon as we do something out of the ordinary - for example starting updates on a large number of devices simultaneously - our system can't handle it any more. The load goes up to over 100, VPN gives up completely and everything else becomes just very, very slow. As the throughput hardly exceeds 2GBit/s as internal traffic is almost negligible, we're seriously concerned about what happens when we increase or bandwidth as planned.

We've already worked through some performances guides and have implemented the following changes:

  • machdep.hyperthreading_allowed = 0
  • net.isr.maxthreads =  -1
  • net.pf.source_nodes_hashsize
  • kern.ipc.maxsockbuf = 16777216

However, none of those seems to improve things significantly.

Current RAM usage never exceeds 3GB which is a bit odd IMHO. While I'm aware that 64GB may well be quite a bit more than needed, 3GB on the other hand seems pretty low considerung our rather big environment.

Do we really need better hardware or what other things are worth looking at to improve performance?

Regards
Thomas
Logged

meyergru

  • Hero Member
  • *****
  • Posts: 1757
  • Karma: 171
  • IT Aficionado
    • View Profile
    • congenio
Re: High CPU-load
« Reply #1 on: December 02, 2024, 11:48:56 am »
You should probably look at "top" to find the process that is causing this. I doubt that the plain routing would cause that high load. It could be some kind of secondary cause, like Zenarmor or suricata or probably even just logging of default firewall rules.
Logged
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 440 up, Bufferbloat A+

ThomasE

  • Newbie
  • *
  • Posts: 25
  • Karma: 1
    • View Profile
Re: High CPU-load
« Reply #2 on: December 02, 2024, 12:48:17 pm »
Quote from: meyergru on December 02, 2024, 11:48:56 am
You should probably look at "top" to find the process that is causing this. I doubt that the plain routing would cause that high load. It could be some kind of secondary cause, like Zenarmor or suricata or probably even just logging of default firewall rules.
There is indeed one process that's quite noticable:

Code: [Select]
/usr/local/sbin/lighttpd -f /var/etc/lighttpd-cp-zone-0.conf
It has an aggregated CPU time of 15 hours (uptime: 5 days) and uses up between 20% and 40% all the time. Looks like Captive Portal to me. While this is more than I expected, I would assume it remains somewhat constant and doesn't increase as traffic goes up...
Logged

meyergru

  • Hero Member
  • *****
  • Posts: 1757
  • Karma: 171
  • IT Aficionado
    • View Profile
    • congenio
Re: High CPU-load
« Reply #3 on: December 02, 2024, 01:10:18 pm »
I meant processes going up in usage while you have that kind of situation. I would think that excessive logging and some process that uses logs like Zenarmor, crowdsec wil then take more CPU cycles. Thus, reducing logging might fix it.
Logged
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 440 up, Bufferbloat A+

ThomasE

  • Newbie
  • *
  • Posts: 25
  • Karma: 1
    • View Profile
Re: High CPU-load
« Reply #4 on: December 02, 2024, 02:23:23 pm »
Quote from: meyergru on December 02, 2024, 01:10:18 pm
I meant processes going up in usage while you have that kind of situation. I would think that excessive logging and some process that uses logs like Zenarmor, crowdsec wil then take more CPU cycles. Thus, reducing logging might fix it.
We don't use Zenarmor, CrowdSec or anything known to take a lot of CPU... As I said, a handful of people connecting via OpenVPN (or trying to do so) plus the usual stuff (DHCP, DNS, NTP) - that's it. Firewall Logging is currently disabled and only used for debug purposes. Got to be missing something, but I don't know where to look... :-(

We need to wait for the next batch of updates to watch the system under heavy load. Besides [h]top - is there anything we should specifically look at?

Logged

meyergru

  • Hero Member
  • *****
  • Posts: 1757
  • Karma: 171
  • IT Aficionado
    • View Profile
    • congenio
Re: High CPU-load
« Reply #5 on: December 02, 2024, 03:09:28 pm »
You will most likely see the culprit when the situation arises.
Logged
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 440 up, Bufferbloat A+

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Hardware and Performance »
  • High CPU-load
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2