[SOLVED] hostwatch at 100% CPU

Started by tessus, January 17, 2026, 03:54:15 PM

Previous topic - Next topic
January 22, 2026, 12:59:59 PM #45 Last Edit: January 22, 2026, 01:06:53 PM by meyergru
I now installed 1.0.6 and re-enabled the service again. It works and CPU is not at 100%, but there is a hefty number of disk writes in bursts every minute and also, the SQLite db journal file is deleted after each transaction data batch has been committed. Using rollback capability in such a way incurs a huge penalty on writes, especially on ZFS.

Just a guess here: But I think that SQL rollback capability is not needed for this purpose and when I glanced at the hostwatch code, I found that the journaling mode is WAL, where other modes (like MEMORY or even OFF) might be more appropriate.


On a side note: I had some strange effects with the old version of the service - namely, that my own ping-based discovery tool suddenly had entries for every IP in the subnet active. Don't ask, IDK why or how this happened. I just disabled the service for the time being.

Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

https://github.com/opnsense/hostwatch/commit/482b45ce is on the way but not in 1.0.6.

For specific issues it may make sense to raise a ticket, but multiple versions are in flight now so it would be better to wait for the final one that's going into 26.1 to make reports on.


Cheers,
Franco

I tried hostwatch-1.0.6.pkg, although I am still experiencing HDD Thrashing...

Restored hostwatch 1.0.5 from 25.7.11_2 and therefore I will run with Automatic Discovery disabled for now...

Quote from: LHoust on January 22, 2026, 07:02:06 PMI tried hostwatch-1.0.6.pkg, although I am still experiencing HDD Thrashing...

Restored hostwatch 1.0.5 from 25.7.11_2 and therefore I will run with Automatic Discovery disabled for now...

"I ran iostat -w 1 da0 and the data is conclusive. While throughput is low (~0.15 MB/s), the tps (Transactions Per Second) is constantly spiking between 20 and 30 with Hostwatch 1.0.6.

For a mechanical HDD, this high frequency of tiny 6KB writes forces constant head seeking. This confirms the issue isn't the amount of data being logged, but the frequency of the SQLite commits. I'll be keeping discovery OFF until a version with Batch/Lazy Writing is released."

My system crashed today.  Thanks for all the notes on here.  I disabled the hostwatch and logs and it's running again. 
There should be some indicator on the dashboard that monitors disk usage better.