https://github.com/torvalds/linux/blob/master/kernel/sched/loadavg.c#L320-L322
從 linux 原始碼上面可以看到這三行
avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n); avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n); avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n);
透過以下指令可以知道 kernel HZ 的設定值
grep 'CONFIG_HZ=' /boot/config-$(uname -r)
預設直目前大多還是 250 https://lwn.net/Articles/145973/
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up