I have benchmarked mcsMQTT 3.5.4.0 to assess the CPU utilization in the various forms of Express mode vs. Full support. The test was done a RPi model 3. No other plugins were running. Mosquitto was also running on same computer.
The chart below shows the reduction in CPU use by using the Express mode settings. In Express mode all history recording is bypassed. This included the history for charting and the history associated with the last payload. If a browser page is visible then the payload/lastdate information is not updated. The transformations using regular expressions, numeric expressions, rate devices and accumulation devices are not available.
Express mode is well suited for production use of MQTT payloads. Full support mode is well suited for investigation and special needs of some topics and payloads.
The selection of Express vs. Full support is done on a Topic by Topic basis so a user can customize the configuration to best balance CPU vs. features needed for each Topic.
Express mode was introduced in version 3.5. Currently 3.5.3.0 is in the updater. It does not support JSON and VSP in Express mode. Express mode is selected on the Association tab with the E column checkbox. The General tab has a setting to default to Full vs. Express when a Topic is associated with a Device.
3.5.4.0 will be released soon and available now at http://mcsSprinklers.com/mcsMQTT_3_5_4_0.zip, but does not yet have the manual updated. This provides the user-selections for including JSON decoding and VSP processing. From the table it can be seen that VSP has a trivial time penalty. JSON decoding into independent devices also has a relatively low CPU penalty. The selections to enable these two features is on the General tab.
The chart below shows the reduction in CPU use by using the Express mode settings. In Express mode all history recording is bypassed. This included the history for charting and the history associated with the last payload. If a browser page is visible then the payload/lastdate information is not updated. The transformations using regular expressions, numeric expressions, rate devices and accumulation devices are not available.
Express mode is well suited for production use of MQTT payloads. Full support mode is well suited for investigation and special needs of some topics and payloads.
The selection of Express vs. Full support is done on a Topic by Topic basis so a user can customize the configuration to best balance CPU vs. features needed for each Topic.
Express mode was introduced in version 3.5. Currently 3.5.3.0 is in the updater. It does not support JSON and VSP in Express mode. Express mode is selected on the Association tab with the E column checkbox. The General tab has a setting to default to Full vs. Express when a Topic is associated with a Device.
3.5.4.0 will be released soon and available now at http://mcsSprinklers.com/mcsMQTT_3_5_4_0.zip, but does not yet have the manual updated. This provides the user-selections for including JSON decoding and VSP processing. From the table it can be seen that VSP has a trivial time penalty. JSON decoding into independent devices also has a relatively low CPU penalty. The selections to enable these two features is on the General tab.
Code:
Full Support Express Percentage Reduction VSP 200 ms 9 ms 95% [ON/OFF toggle] Number 200 ms 8 ms 96% [Incrementing value] JSON 1 Number 310 ms 13 ms 96% [JSON contains 4 keys, one number accepted] JSON 2-numbers, VSP, Text 510 ms 32 ms 94% [127 ms/device Full vs. 8 ms/device Express]
Comment