Self-optimizing Concurrency in Software Transactional Memory via Model-based Approach

In the era of multi-core systems, the need for tools simplifying the development of concurrent applications is increasingly looming. In such a context, Software Transactional Memory (STM) is recognized as an effective programming paradigm, thanks to its ability to guarantee consistency of data that are shared across concurrent threads in an application transparent manner. On the other hand, a core problem to cope with for STM, which has received great attention of late, deals with (dynamically) regulating the degree of concurrency, in order to deliver optimal performance. In fact, depending on the application workload, whose profile can also change over time, an oversized number of concurrent threads may cause loss in performance due to excessive data contention, which may give rise to excessively high transaction abort rate. Conversely, an undersized number of threads may hamper performance due to limited exploitation of parallelism. We address this problem by proposing a self-regulation approach of the concurrency level, which leverages a parametric analytical performance model aimed at predicting the scalability of the STM application as a function of the actual workload profile and the number of concurrent threads supposed to sustaining the execution. The regulation scheme allows achieving optimal performance during the whole lifetime of the application via dynamically resizing the number of concurrent threads according to the predictions by the model. The later is customized for a specific application/platform pair through regression analysis, which is based on a lightweight sampling phase. We also present a real implementation of the model-based concurrency self-regulation architecture integrated within the open source TinySTM framework. Further, the effectiveness of the proposal is evaluated via an experimental assessment based on standard STM benchmark applications.

[1]  Y. C. Tay,et al.  Locking performance in centralized databases , 1985, TODS.

[2]  Jean-François Méhaut,et al.  A machine learning-based approach for thread mapping on transactional memory applications , 2011, 2011 18th International Conference on High Performance Computing.

[3]  Meichun Hsu,et al.  Modeling Performance Impact of Hot Spots , 1996, Performance of Concurrency Control Mechanisms in Centralized Database Systems.

[4]  Bruno Ciciani,et al.  Machine Learning-Based Self-Adjusting Concurrency in Software Transactional Memory Systems , 2012, 2012 IEEE 20th International Symposium on Modeling, Analysis and Simulation of Computer and Telecommunication Systems.

[5]  Daniel A. Menascé,et al.  Performance evaluation of a two-phase commit based protocol for DDBs , 1982, PODS.

[6]  Torvald Riegel,et al.  Dynamic performance tuning of word-based software transactional memory , 2008, PPoPP.

[7]  Roberto Palmieri,et al.  On the analytical modeling of concurrency control algorithms for Software Transactional Memories: The case of Commit-Time-Locking , 2012, Perform. Evaluation.

[8]  Robert Ennals Software Transactional Memory Should Not Be Obstruction-Free , 2005 .

[9]  Philip S. Yu,et al.  On the analytical modeling of database concurrency control , 1993, JACM.

[10]  Neil J. Gunther Guerrilla capacity planning - a tactical approach to planning for highly scalable applications and services , 2006 .

[11]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[12]  Mikel Luján,et al.  Advanced Concurrency Control for Transactional Memory Using Transaction Commit Rate , 2008, Euro-Par.

[13]  Bruno Ciciani,et al.  A Performance Model of Multi-Version Concurrency Control , 2008, 2008 IEEE International Symposium on Modeling, Analysis and Simulation of Computers and Telecommunication Systems.

[14]  Alexander Thomasian,et al.  Concurrency control: methods, performance, and analysis , 1998, CSUR.

[15]  Alexander Thomasian,et al.  Performance Analysis of Centralized Databases with Optimistic Concurrency Control , 1987, Perform. Evaluation.

[16]  Sameer Kulkarni,et al.  Towards Applying Machine Learning to Adaptive Transactional Memory , 2011 .

[17]  Rachid Guerraoui,et al.  Preventing versus curing: avoiding conflicts in transactional memories , 2009, PODC '09.

[18]  Kunle Olukotun,et al.  STAMP: Stanford Transactional Applications for Multi-Processing , 2008, 2008 IEEE International Symposium on Workload Characterization.

[19]  Rachid Guerraoui,et al.  Predicting the Scalability of an STM: A Pragmatic Approach , 2010 .

[20]  Zhengyu He,et al.  Modeling the Run-time Behavior of Transactional Memory , 2010, 2010 IEEE International Symposium on Modeling, Analysis and Simulation of Computer and Telecommunication Systems.

[21]  Roberto Palmieri,et al.  Analytical modeling of lock-based concurrency control with arbitrary transaction data access patterns , 2010, WOSP/SIPEW '10.

[22]  Peter Norvig,et al.  Artificial Intelligence: A Modern Approach , 1995 .

[23]  Hsien-Hsin S. Lee,et al.  Adaptive transaction scheduling for transactional memory systems , 2008, SPAA '08.

[24]  Sameh Elnikety,et al.  Predicting replicated database scalability from standalone database profiling , 2009, EuroSys '09.

[25]  Pascal Felber,et al.  Identifying the Optimal Level of Parallelism in Transactional Memory Applications , 2013, NETYS.