Geoscience Reference
In-Depth Information
JQueueSim
C++ DEQSim
JDEQSim
3:00:00 AM
2:30:00 AM
2:00:00 AM
1:30:00 AM
1:00:00 AM
12:30:00 AM
12:00:00 AM
0
100
200
300
400
Number of Events (in Million)
Fig. 9.5
The influence of network size on the three micro-simulations
For JQueueSim the situation is different. While Scenarios A and B generate the
same magnitude of events, the run times are substantially different. This has to do
with the substantially different ratio of network-to-population size. Therefore, in
Scenario A, JQueueSim performs extremely badly compared to JDEQSim. In fact,
JDEQSim is more than 17 times faster than JQueueSim in Scenario A, while for
Scenarios B and C, it is around four times faster.
9.4.3
Scalability of Event Handlers
While the first two experiments look at the overall performance increase, due to both
the micro-simulation and parallel event handling, in this section we only look at the
latter. As mentioned earlier, the event handler with the longest computation time
defines the runtime of parallel event handling. Therefore, in order to test how parallel
event handling would scale with multiple event handlers and threads, identical test
handlers are added to the simulation. The test handler performs computationally
intensive tasks and does not involve any disk I/O. This is important because event
handlers requiring I/O are inherently difficult to parallelize due to the speed limit of
the hard drive and are therefore not suitable for this experiment.
Figure 9.6 shows the speedup for the different runs, where different numbers
of handlers are involved. This experiment shows that parallel event-handling scales
linearly up to 4 threads, but the speedup with 8 threads already drops to around 6.
This drop is severe if we consider that only little use of Java's synchronized keyword
 
Search WWH ::




Custom Search