Openhab 4.0.x rules need a lot of memory

If you still have CPU issues with the fix, configure htop to show custom thread names so it is more clear what is consuming your CPU, see:

You can also do this with top as described in the FAQ: