[Halld-offline] removing mutex locks around hddm i/o calls
Richard Jones
richard.t.jones at uconn.edu
Tue Mar 20 12:36:12 EDT 2018
Hello Sean,
I have been running tests with the new hits shadowing code in mcsmear, and
noticed that I do not get much speed-up when I run with multiple threads.
It occurred to me to make sure that there are no mutex locks in the code,
but when I looked in MyProcessor, there they are !! Woops.
I went through the MyProcessor.cc code and commented out all of the calls
to pthread_mutex_lock and pthread_mutex_unlock around hddm i/o, and now it
runs with full
speed-up, at least up to 4 threads. Maybe those locks have been there from
the beginning? I am happy I found them now, and can get rid of them, as I
am now seeing a x4 speed-up in throughput for rho events, running mcsmear
with 4 threads.
The thought occurs to me, could the same thing be happening in REST
production? Do we have mutex locks around the hddm output call? If
so, we may also be paying a price in terms of multi-thread performance
there. David probably already would have seen this and removed them, but I
thought it would be good to ask, since I found these locks in mcsmear.
Presumably this is the same mcsmear (master branch) that is being used for
production?
-Richard Jones
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20180320/fd3a12ee/attachment.html>
More information about the Halld-offline
mailing list