Samsung TV 2 binding and CPU utilization

Hi all,
i have a situation where whenever i enable SamsungTV binding on any of the latest snapshots on Raspberry PI3 it drives JAVA process to consume high CPU utilization it jumps sometimes to 56% and constantly it does not go below 36%
when i remove that binding the JAVA CPU utilization drops to max 7%
is there something i do wrong ? knowing that the binding works fine and can discover the TVs in my home

Please, set samsungtv binding log level to trace by following command in the karaf console.

log:set TRACE org.openhab.binding.samsungtv

And post logs to here, then we can hopefully see whatā€™s it going-on.

By default samsung tv binding polls resources from the tv ones per every second. You can slow down polling frequency fron binding configuration.

1 Like

@pauli_anttila
it seems that what you are saying is true, it attempts to update the values of items extremely quick i could not actually read the log until i stopped it :slight_smile:

but this seems to be only for this specific binding

here is how JAVA humps

1209 openhab 20 0 458736 196672 13672 S 57.3 20.7 16:03.91 java

and here is a sample of almost 2 seconds

04:18:59.303 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.307 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.319 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:18:59.345 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.346 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.347 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.358 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:18:59.387 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:18:59.414 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:18:59.448 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:18:59.465 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.470 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.473 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:18:59.499 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:18:59.511 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.514 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.516 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.525 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:18:59.556 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:18:59.592 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:18:59.622 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:18:59.638 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.640 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.653 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:18:59.681 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.682 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.683 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.691 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:18:59.719 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:18:59.761 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:18:59.787 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:18:59.806 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.807 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.814 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:18:59.838 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:18:59.848 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.849 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.850 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.864 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:18:59.901 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:18:59.937 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:18:59.965 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:18:59.967 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:18:59.969 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.000 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:19:00.008 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.012 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.016 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.032 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:19:00.057 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:19:00.085 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:19:00.125 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:19:00.148 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.153 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.153 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:19:00.178 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:19:00.205 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.208 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:19:00.209 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.213 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.236 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:19:00.271 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:19:00.305 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:19:00.340 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:19:00.342 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.345 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.367 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:19:00.442 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.444 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:19:00.446 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.449 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.475 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:19:00.502 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:19:00.538 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:19:00.577 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.577 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:19:00.581 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.616 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:19:00.623 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.626 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.629 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.645 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:19:00.682 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:19:00.716 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:19:00.746 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:19:00.746 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.748 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.771 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:19:00.785 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.786 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.787 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.795 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update
04:19:00.831 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentM uteā€™ value havenā€™t been changed, ignore update
04:19:00.870 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentB rightnessā€™ value havenā€™t been changed, ignore update
04:19:00.899 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC ontrastā€™ value havenā€™t been changed, ignore update
04:19:00.899 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.901 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.934 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentS harpnessā€™ value havenā€™t been changed, ignore update
04:19:00.946 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.947 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.948 [TRACE] [internal.service.MainTVServerService] - Value havenā€™t been changed, ignore update
04:19:00.958 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentC olorTemperatureā€™ value havenā€™t been changed, ignore update
04:19:00.984 [TRACE] [nternal.service.MediaRendererService] - Variable ā€˜CurrentV olumeā€™ value havenā€™t been changed, ignore update

i was surprised as when i checked the binding configuration it seems that the pull interval was set to 100 millisecond which i am sure i did not change it before

anyways i set it to 3000 milliseconds and it seems much better now

I have the exact same issue here as described above. when turning on the TV CPU load of openhab process is increasing from around 10 to above 30%. I get the same log file as above from Basem_AlSaeed. However my refresh interval is set to 1000 ms. so it update much more than configured.

Any idea how to solve?

I changed the update from 1000ms (while it actually updates every 100ms) to 10000ms(10 sec) at that time the update also is 10 sec, So that is ok. Though the high cpu load stays. Put it back to 1000ms and the update rate is now 1000ms So that looks ok now. But high cpu load is still there once tv is turned on.

nice to see the correlation between higher CPU once the TV is turned onā€¦