Hi all, CTest has a very useful feature that performs load balancing. This works by comparing the current system load to a target load.
The current implementation defers to SystemInformationImplementation::GetLoadAverage() to return a value. This is implemented on the platforms that have getloadavg() by returning the first value of that. While this function is present on many UNIX platforms, on Linux it means something slightly different than on say Solaris and *BSD. Namely on the former it is representing a "system load" and on the latter it is "CPU load", which is a subtle but rather important distinction. The system load includes processes which are in the uninterruptable state on purpose, a rather interesting blog post by Brendan Gregg has some juicy details: http://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html Now, this has recently become a problem for us, as on some of our systems there are some kernel level processes active that by design are in the uninterruptable state, therefore contributing to the system load average, even if they do not affect the CPU load of the system. The number of processes in this state can easily outnumber the number of cores (i.e. 11 uninterruptable processes vs 4 CPU threads). So an idle system can have a load of > 10, for instance. At present we are working around this by setting a higher load to manage the tests, this as you might imagine is not a perfect solution as the number of uninterruptable processes does vary over time. The implementation of this feature specifically mentions checking for CPU load, which to be consistent on all platforms would require checking slightly different details on Linux. Is the intent for CTest to specifically manage CPU load or system load overall? The original commit message and comments point more towards the former. The Windows implementation of GetLoadAverage() also points towards merely CPU load. A Linux specific implementation would have to, most likely, investigate /proc/stat and derive a CPU load from that. Any ideas/suggestions? Thanks, W This transmission contains information that may be confidential and contain personal views which are not necessarily those of YouView TV Ltd. YouView TV Ltd (Co No:7308805) is a limited liability company registered in England and Wales with its registered address at YouView TV Ltd, 3rd Floor, 10 Lower Thames Street, London, EC3R 6YT. For details see our web site at http://www.youview.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers