5.3 Nested Transaction Results
5.3.4 Registered Versus Commit Rate
The final set of graphs provide a ratio between the average number of transactions registered and the average number of transactions to commit per session (for succinctness, let us refer to this as R/C). For example, when a test is executed with six threads, we would expect the average number of registered transactions n to be in the range of 0 ≤ x ≤ 6. If the subsequent number of transactions that commit is close to six then this suggests that the search strategy was effective in finding a permutation of transactions where most could commit successfully.
From these results a number of interesting conclusions can be inferred, namely: • The degree to which transactions register provides some measure of con- tention, but in the case of a high number of threads, we can also infer the level of parallelism being afforded by the platform.
• The degree to which transactions commit (such that R/C → 1) allows one to estimate how effective the particular search strategy was in finding a permutation of transactions where most could commit.
Figure 5.4: Nested Average Transaction Execution Time
The results showing the actual ratios of registered transactions versus commit- ted transactions (R/C) are provided in Figure 5.5. Looking firstly at Graph A, observe that as the number of threads increases, the number of registered trans-
Figure 5.5: Registered Versus Committed
actions also increases (the average never increases above eight, which we would expect given that the maximum level of parallelism afforded by the platform is eight threads). In Graph A, where only concurrent conflicts prevent a transac-
tion from committing, the ratio between R/C is always 1 (every transaction that registers is able to commit).
In Graph B, S-L1 semantic conflicts are introduced, and we can see that the number of transactions registering is roughly the same as in Graph A. This time however, in the case of the Greedy and the Pseudo-Thread strategies, the number of transactions which commit is often less than the number registering. This sug- gests that the Back-Tracking approach is more effective at finding permutations which allow for a greater commit rate. In Graph C, we can see that the effec- tiveness of the Pseudo-Thread approach has decreased further while the Back- Tracking approach still provides a higher commit rate (the Greedy approach is not shown because no transactions could commit under S-L2 semantic conflicts). In summary, the Back-Tracking algorithm appears the most effective for find- ing permutations of transactions which allow the highest number of commits. However, according to the results provided in Figure 5.3, the Pseudo-Thread approach produced the best throughput. This finding would suggest that locat- ing the best permutation does not always justify the extra time required for the search when throughput is the most important issue.
5.4
Summary
In this chapter a number of experiments were presented using an implementation of the Many Systems approach. In each experiment, we examined the transaction throughput and the average transaction execution time. To begin with, results where compared with an existing Contention Management Policy, to provide a measure of comparison between our approach and an existing technique. This was followed by further tests involving nested transactions, designed to evaluate the exploratory power of our approach. The goal of each test was to examine performance in the face of both concurrent and semantic conflicts. To summarise, the results presented in this chapter suggest:
• In comparison with an existing Contention Management Policy, Hugh shows significant improvement in throughput when the presence of semantic con-
flicts is increased. Without semantic conflicts, Hugh still provided compa- rable with Polka performance under both benchmarks.
• While different data structures (linked lists, hash tables) can affect the per- formance of a conventional system designed to resolve concurrent conflicts, the choice of data-structure has less of an impact when semantic conflicts are taken into account.
• When semantic conflict resolution is combined with nested transactions, transaction throughput deceases, and more elaborate search strategies may be required to allow transactions to commit. A Back-Tracking and Pseudo- Thread approach are presented and evaluated, with the latter having slightly better throughput.
As described in Section 5.1, the environment consisted of a platform with a capacity for eight hardware threads to run in parallel. In further experiments, it would be interesting to observe how the performance alters on platforms which provide more parallelism, especially with respect to the Pseudo-Thread search strategy, which suggests improvements can be obtained with greater parallel re- sources.
In Section 5.3, results have revealed that throughput has changed only mod- estly between the Pseudo-Thread and Back-Tracking algorithms. Although the Back-Tracking algorithm is more effective at committing more transactions per session (see Graph 5.5), interestingly, this doesn’t correspond to higher through- put in the application (presumably because of the extra time used to search for permutation that allows a small number of extra transactions to commit). As a result of this observation, in future work it may be worthwhile to alter the commit phase algorithms to prefer timely completion over locating the best permutation.
Conclusion
In this final chapter we provide a summary of the material that has been presented in this thesis, briefly discuss the implications of our work and suggest ideas for future work.
6.1
Thesis Summary
This thesis began with the description of a Many Systems Model in an abstract process language CSP. The model described an approach to Concurrency Control based on state-space exploration. An implementation of our approach in the form of a Universal Construction was described, to provide Contention Management for Software Transactional Memory systems. The implementation is designed to provide conflict resolution which incorporates both concurrent conflict resolution and semantic conflict resolution (where transactions explicitly abort because of some logical condition in the program). We then extended the implementation to deal with nested transactions before providing results which demonstrated the performance of our approach.