Is there a way to trigger numa_balancing instantly?
Andreas Hollmann <[email protected]> Thu, 8 May 2014 18:13:06 +0200
| Newsgroups | org.kernel.vger.linux-numa |
|---|---|
| Message-ID | <CAGz0_-1-Nq1ttEHHoBDRUs57w-nEdmFvo6ZR+5y6imT3woRGbw@mail.gmail.com> |
Hi, is there a way to trigger numa_balancing instantly? For applications that consist of several phases it would be very useful to trigger numa_balancing instantly instead of waiting until it will be triggered automatically after a certain delay. The application could trigger a balancing operation when it comes from one phase to next phase and these two phases have completely different memory access patterns. Would it be possible to integrate a new sysctl that triggers the balancing for a certain pid? Something like echo $PID > /proc/sys/kernel/numa_balancing_now_pid or echo 1 > /proc/$PID/numa_balancing_now numa_balancing could be disabled globally and only triggerd in certain conditions. Additionally it would be nice to enable periodic numa_balancing only for certain processes and not globally. echo 1 > /proc/$PID/numa_balancing What do you think? -- Following sysctls are provided by numa_balancing in /proc/sys/kernel numa_balancing 0 numa_balancing_migrate_deferred 16 numa_balancing_scan_delay_ms 1000 numa_balancing_scan_period_max_ms 60000 numa_balancing_scan_period_min_ms 1000 numa_balancing_scan_size_mb 256 In https://www.kernel.org/doc/Documentation/sysctl/kernel.txt numa_balancing_settle_count is mentioned, but it seems that it disappeared, at least in on my kernel version (3.14). Best regards, Andreas Hollmann