Re: RMS and threads

From: SteveL (infovax_at_hotmail.com)
Date: 09/22/04


Date: 22 Sep 2004 08:10:41 -0700

Thanks for your reply.

>when you use the master to control, all overlap is gone.

I don't quite see why this is the case. If I have, say, a 4 CPU
system, one master thread and two worker threads then there's no reason
why they can't all execute simultaneously.

For as long as the threads are still busy (writing their little batch
of records - between 1 and 100 on each wakeup), I expect them to
execute concurrently. That's the whole premise for my use of threads
in this application.

I do expect some overhead, of course, but perhaps less than I'm
currently seeing.

>This should be more pronounced when disk IO is involved

Can you elaborate on that for me? Is there something within RMS which
doesn't make full use of a multi-CPU system, or which otherwise
serialises on a per-process rather than a per-thread basis?

I recall from the dim, distant past that some component of RMS (the
XQP?) had a hard-coded affinity for CPU 0, but I thought that had been
lifted.

On my 2 CPU system (an AlphaServer ES47 7/1000), each thread seems to
be idle (waiting on its condition variable) for an average of 0.0005
seconds per "wake-up" when I have the cross-thread synchonisation
enabled.

To my mind, this is pretty quick, although the accumulated time does
make a significant difference to the end result, but others have
suggested that there's a problem to be solved here somewhere.

I guess the real questions are.... 1) is there anything in RMS that is
not entirely thread-efficient, and.... 2) just how fast can kernel
threads be scheduled for execution if they're always going from wait,
to computable, to I/O, and back to wait again?

Any and all ideas, references, etc, much appreciated.
Thanks again,
SteveL.



Relevant Pages

  • Re: [PATCH 0/3] ring-buffer: less locking and only disable preemption
    ... On Sat, 4 Oct 2008, Mathieu Desnoyers wrote: ... to execute a synchronizing instruction, prior to execution of the new ... before the new instruction is reachable by any CPU. ... 5-bytes call/nop code-patching case because all the breakpoint handlers ...
    (Linux-Kernel)
  • Re: Learning Machine Language - the 0s and 1s
    ... program directly in the 0s and 1s, where no program translates my code ... Where my code is executed directly by the CPU. ... to execute the code you're ... Hex is what is ...
    (alt.lang.asm)
  • Re: about cpu hw, how MBR and BIOS is executed ?
    ... > how is code in the MBR of a hard disk executed? ... > cpu code segment register and combining this with an ofset address..but ... > hardware so that it can execute the program. ...
    (comp.programming)
  • Re: Timing
    ... Determine how many native CPU cycles lapse during a 1 second period. ... before the next simulated instruction can execute. ... Then, when the next instruction wants to execute, it ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: per cpun+ spin locks coexistence?
    ... since we dont anymore use a softirq (timer) to reschedule the workqueue. ... schedule_workmakes no garantee that the work will be done by this cpu. ... , whcih can sleep right?) ... schedule_workis guaranteed to execute the work queue at least once, ...
    (Linux-Kernel)