Load average的定义 load average如何计算 计算公式:load(t) = load(t-1) e^(-5/60) + n (1 - e^(-5/60)),迭代计算,其中n为run-queue length。 由Exponential Smoothing方程有,Y(t)= Y(t-1) + a*[X(t) - Y(t-1)],whereX(t) is the input raw data, Y(t - 1) is the value due to the previoussmoothing iteration and Y(t) is the new smoothed value.令a=1-b,b为e^(-5/60),就可以得到load average的计算公式。 采用此公式的好处:局部的load抖动不会对load average造成重大影响,使其平滑。 load average释疑 假设系统有两个CPU,那么其每个CPU的当前任务数为:Load average/2。这时候取得的数值可以参照上述2-5的标准来进行判断了。 |