@Laurens This is the Top 10 of your threads sorted descending on CPU time descending with an extra computed Total CPU time % column (using a spreadsheet):
Id | Name | CPU time | Total CPU time % |
---|---|---|---|
86 | features-1-thread-1 | 5119732 | 28.1% |
153 | HTTP Refresh Service | 4918099 | 27.0% |
447 | pool-60-thread-1 | 3439530 | 18.9% |
266 | ESH-persist-Monitor-1 | 1150952 | 6.3% |
38 | Thread-14 | 512823 | 2.8% |
37 | Thread-13 | 504785 | 2.8% |
256 | pool-47-thread-1 | 338963 | 1.9% |
178 | upnp-main-3 | 232411 | 1.3% |
35378 | ESH-thingHandler-12 | 207675 | 1.1% |
177 | upnp-main-2 | 181246 | 1.0% |
The features-1-thread-1 seems to be a Karaf thread. It’ll probably be used for starting and installing/uninstalling openHAB bundles and bindings. Did you start from scratch or install/uninstall any bindings? How long was openHAB running when you created the thread list? It may be a Karaf issue when this thread remains busy and its CPU time keeps increasing.
The HTTP Refresh Service thread seems to be used by the HTTP binding for refreshing the state of your items. So it will be more busy the more items you have and the more frequent these are refreshed.
It’s not really clear what the pool-60-thread-1 is used for. Maybe you can create a stack trace for it and see what code it is executing?
This is my thread list of an openHAB 2.2.0 instance running without CPU issues for about 2 months now.
Id | Name | CPU time | Total CPU time % |
---|---|---|---|
213 | Thread-74 | 49340842 | 16.4% |
143 | ESH-thingHandler-1 | 36876063 | 12.3% |
151 | ESH-thingHandler-4 | 36601637 | 12.2% |
150 | ESH-thingHandler-3 | 36326230 | 12.1% |
152 | ESH-thingHandler-5 | 35857121 | 11.9% |
149 | ESH-thingHandler-2 | 35318407 | 11.7% |
215 | Plugwise MessageProcessorThread | 12027739 | 4.0% |
38 | Thread-14 | 10925330 | 3.6% |
37 | Thread-13 | 10898461 | 3.6% |
214 | Plugwise MessageSenderThread | 3436501 | 1.1% |
The stacktrace of Thread-74 contains “gnu.io.RXTXPort” which means it is used for serial communications. In my setup that means it is used for communicating with my Plugwise Stick via USB. The thing handler threads are mostly busy with polling state for my other openHAB bindings (TCP and UDP communications in my setup).