Re: Interpreter vs hardware threads

From: Michael Hicks (mwh@dsl.cis.upenn.edu)
Date: Wed Mar 01 2000 - 19:55:08 MET

  • Next message: Max Skaller: "Re: GC + thread"

    > Does anyone know how fast the ocaml bytecode interpreter
    > 'switches' between threads (that is, what is the scheduling overhead?)
    > Assume most of the threads are waiting (say, on a condition variable).
    > Asume LOTS of threads (thousands).
    >
    > [Hardware threads are not fast enough]

    Remembering back to the thread scheduler in Ocaml 2.00 (I assume it's the
    same one), I recall that the context switch directly relates to how many
    threads are waiting. This is because at each CS point, every thread is
    checked to see if its timeout has expired or has some I/O ready. As a
    result, performance degrades sharply as you add more threads. With a small
    number of threads (around 10) on a Pentium II 300 MHz machine, we measured
    the context switch time to be about 100 microsecs. See our INFOCOM 99 paper
    for more info on the system we were measuring this in (our active network,
    PLANet): http://www.cis.upenn.edu/~switchware/papers/infocom99-plan.ps.

    Mike

    -- 
    Michael Hicks
    Ph.D. Candidate, the University of Pennsylvania
    http://www.cis.upenn.edu/~mwh            mailto://mwh@dsl.cis.upenn.edu
    "The pessimist sees difficulty in every opportunity.
    The optimist sees the opportunity in every difficulty." -- Winston Churchill
    



    This archive was generated by hypermail 2b29 : Wed Mar 01 2000 - 20:05:08 MET