Re: [cmake-developers] CTest load balancing
On 16/10/2019 15:10, Brad King wrote: > On 10/16/19 10:05 AM, Wouter Klouwen wrote: >> Is the intent for CTest to specifically manage CPU load or system load >> overall? > > I don't think a careful distinction was made at the time. > > If Linux needs some updates to be consistent with other platforms > then that would be fine with me. Unfortunately this may be easier said than done. Most of the data relevant to this lives in /proc. Indeed the getloadavg() implementation of glibc merely reads /proc/loadavg*. For load average the scheduler keeps track of the running 1, 5, 15 minute running averages. There's /proc/stat which keeps a running total of the CPU usage - the first lines beginning with `cpu` - but for the purposes of this it is in the format of usage since boot. In order to replicate a CPU utilisation only load, you'd effectively have to pick a point in time to start and then measure since the reference point, which makes things a bit complicated. >From the same file you could also take the lines `procs_running` and `procs_blocked`, sum them and present them as a pseudo load. It would be a fairly robust calculation. I don't know if this would be quite correct though. I might just create an issue for this. W *: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/getloadavg.c;hb=HEAD th > > -Brad > > > [External email. Treat hyperlinks and attachments with caution] > 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
Re: [cmake-developers] CTest load balancing
On 10/16/19 10:05 AM, Wouter Klouwen wrote: > Is the intent for CTest to specifically manage CPU load or system load > overall? I don't think a careful distinction was made at the time. If Linux needs some updates to be consistent with other platforms then that would be fine with me. -Brad -- 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
[cmake-developers] CTest load balancing
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