Geoscience Reference
In-Depth Information
handler nor the new parallel event handler is suitable for use with the parallel version
of JDEQSim. Buffering and sorting of events need to be implemented between the
micro-simulation and the event handler in order to make this possible.
In the following section, additional issues and possible improvements related to
event handling are discussed.
9.5.2
Event Handling
9.5.2.1
Performance
According to the experiments conducted, parallel event-handing scales well if the
load is well balanced. But this is often not the case when one or several event
handlers involved contain many disk I/O operations. In this case, these event
handlers pose a bottleneck to the current parallelization approach in several ways:
firstly, as I/O operations are slow, event handlers involving many I/O operations are
the slowest event handlers; secondly, as writing to a hard disk is limited by the speed
of the hard disk, this becomes even more of an issue because such handlers slow
each other down even further or might even be influenced by other I/O operations
on the same computer.
In order to solve this problem, one might distinguish event handlers based
on the criterion if other modules in the simulation depend on their output. Only
such modules which fulfill this criterion require that event handling is completed
before the next step in the MATSim loop is executed. Of the five default event
handlers, this is only the case for two of the event handlers (EventsToScore and
TravelTimeCalculator). The other three event handlers only produce output for later
analysis. This means that these three event handlers could continue their processing
while the rest of the MATSim iterations continue. This approach could certainly be
used to reduce the overall computational time of MATSim.
A second performance improvement could be achieved by replacing the current
round-robin algorithm, which assigns an even number of event handlers to all
threads with one which performs better load balancing. This could be achieved in the
following way: the average runtime of the different event handlers could be tracked
and a load balancing could be performed, every couple of iterations, while taking
this information into account.
9.5.2.2
Usability
While event handling is a simple way for users to access the output of the MATSim
simulation and also to extend the simulation itself, with parallel event handling and
other performance improvements, the possibility of making errors especially for
novice users of MATSim increases.
Search WWH ::




Custom Search