[lkml]   [1999]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Overscheduling DOES happen with high web server load.
    In muc.lists.linux-kernel, you wrote:
    >> Ok, you are right. The real problem is we are calculating goodness
    >> O(A*B).
    >> A= Number of processes on the runqueue
    >> B= Number of times schedule is called
    >This is the amount of work we are doing, but I think you're on to the
    >wrong solution. Phil did a test: he patched schedule() to pick the
    >first schedulable process instead of the best one. That dropped the
    >amount of time consumed in schedule() from 20% to 1%. That's the same
    >as reducing the work from O(A*B) to O(B).
    >Why is schedule called so frequently? The thundering herd. You get a
    >new connection, everyone wakes up, only one gets work, and everyone
    >else goes back to sleep, each causing O(A) work to reschedule. M hits
    >per second, N processes, B=M*N. A=N. So the total work is O(M*N^2).

    It was shown earlier in the thread that no thundering herd occured in the test,
    because apache serializes the accept with a lock.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:51    [W:0.018 / U:2.868 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site