Hi, as discussed with zeising@ here [1] I create a separate issue regarding high CPU usage after updating to ntopng from v3 to v4. We have several reports from OPNsense users and it's reproducable when swithing back and forth the version. I already reported the problem upstream here [2] and here [3], but a quick fix still doesn't work. Maybe other here can share their thought or maybe help diagnosing the problem. Best, Michael [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246896#c5 [2] https://lists.gt.net/ntop/users/49258 [3] https://github.com/ntop/ntopng/commit/607ba52263830c577e7b37c8c25320e60466a5f6
(In reply to Michael Muenz from comment #0) Thanks for the report! > as discussed with zeising@ here [1] I create a separate issue regarding high CPU I need to correct you, zeising was not involved, you discussed with madpilot@
Sorry, I was working on two issues at the same time, thought I had enough coffee :)
I build a new port ntopng-devel with latest dev-branch commit. Now the CPU is smooth again, but I cant build via poudriere: autoreconf-2.69: 'configure.ac' or 'configure.in' is required *** Error code 1 When I build the pkg via /usr/ports it builds fine.
(In reply to Michael Muenz from comment #3) Thanks for the testing! I'll take a look and try to cook an update to the port.
Created attachment 215461 [details] ntopng-devel
I added a shar with my testings. make package in ports runs fine and builds a clean package, but poudriere seems to be missing something.
(In reply to Michael Muenz from comment #6) I have tested the update and it works fine here in poudriere. Not sure what is happening on your machine. Do you have any local changes or custom configuration that could interfere?
Also, a quick test shows ntopng still having an high load with commit a020c6e. You are testing a commit from head. I'd avoid moving the port to head. We should identify which upstream commit actually fixes it.
Yes, as I previously said, I created a devel port with latest commit from dev-branch since they asked me to test if this still occurs in devel tree: https://github.com/ntop/ntopng/commit/607ba52263830c577e7b37c8c25320e60466a5f6#commitcomment-39827268 I don't think they will backport the fix since they are not aware which commit fixed it. :/
Created attachment 215537 [details] Fix for excessive CPU usage Hi, After some testing I think I identified the upstream fix in the dev branch. I'm attaching a patch to the current port applying the fix. It did fix the 100% CPU usage for me in some quick testing. Could you test this and report if it fixes the issue for you too? I'm also filing this as a pull request upstream shortly.
Upstream pull request: https://github.com/ntop/ntopng/pull/4039
A commit references this bug: Author: madpilot Date: Mon Jun 15 17:48:51 UTC 2020 New revision: 538924 URL: https://svnweb.freebsd.org/changeset/ports/538924 Log: - Update ntopng to latest upstream commit This includes a fix for high CPU usage PR: 246929 Submitted by: Michael Muenz <m.muenz@gmail.com> Changes: head/net/ntopng/Makefile head/net/ntopng/distinfo
The fix has been included upstream, and I updated the port to the latest upstream commit, so this should be really fixed now. Thanks for reporting!
Sorry, I didn't find the time today applying the patch. I just updated latest portstree and build fine in poudriere, CPU runs super-smooth. Thanks for you time :)