Abstract
With the advent of chip multiprocessors, exploiting intratransaction parallelism in database systems is an attractive way of improving transaction performance. However, exploiting intratransaction parallelism is difficult for two reasons: first, significant changes are required to avoid races or conflicts within the DBMS; and second, adding threads to transactions requires a high level of sophistication from transaction programmers. In this article we show how dividing a transaction into speculative threads solves both problems—it minimizes the changes required to the DBMS, and the details of parallelization are hidden from the transaction programmer. Our technique requires a limited number of small, localized changes to a subset of the low-level data structures in the DBMS. Through this method of incrementally parallelizing transactions, we can dramatically improve performance: on a simulated four-processor chip-multiprocessor, we improve the response time by 44--66% for three of the five TPC-C transactions, assuming the availability of idle processors.
- Akkary, H. and Driscoll, M. 1998. A dynamic multithreading processor. In Proceedings of MICRO-31. Google Scholar
Digital Library
- Arvind and Culler, D. 1986. Dataflow architectures. In Annual Reviews in Computer Science. Vol. 1. Palo Alto, CA. 225--253. Google Scholar
Digital Library
- Berger, E. D., McKinley, K. S., Blumofe, R. D., and Wilson, P. R. 2000. Hoard: A scalable memory allocator for multithreaded applications. In Proceedings of the 9th ASPLOS. Google Scholar
Digital Library
- Bhowmik, A. and Franklin, M. 2002. A general compiler framework for speculative multithreading. In Proceedings of the 14th SPAA. Google Scholar
Digital Library
- Colohan, C., Ailamaki, A., Steffan, J., and Mowry, T. 2006. Tolerating dependences between large speculative threads via sub-threads. In Proceedings of the 33rd ISCA. Google Scholar
Digital Library
- Colohan, C. B. 2005. Applying thread-level speculation to database transactions. Ph.D. dissertation. Carnegie Mellon University, Pittsburgh, PA. Google Scholar
Digital Library
- Colohan, C. B., Ailamaki, A., Steffan., J. G., and Mowry, T. C. 2007. CMP support for large and dependent speculative threads. IEEE Trans. Paralled Distrib. Syst. 18, 8, 1041--1054. Google Scholar
Digital Library
- Eggers, S. and Jeremiassen, T. 1991. Eliminating false sharing. In Proceedings of the 1991 International Conference on Parallel Processing. Vol. I. 377--381.Google Scholar
- Franklin, M. and Sohi, G. 1996. ARB: A hardware mechanism for dynamic reordering of memory references. IEEE Trans. Comput. 45, 5 (May), 552--571. Google Scholar
Digital Library
- Garcia-Molina, H. and Salem, K. 1987. Sagas. In Proceedings of the 1987 ACM SIGMOD International Conference on Management of Data. ACM Press, New York, NY. 249--259. Google Scholar
Digital Library
- Garzarán, M., Prvulovic, M., Llabería, J., Viñals, V., Rauchwerger, L., and Torrellas, J. 2003. Tradeoffs in buffering memory state for thread-level speculation in multiprocessors. In Proceedings of the 9th HPCA. Google Scholar
Digital Library
- Gharachorloo, K., Lenoski, D., Laudon, J., Gibbons, P., Gupta, A., and Hennessy, J. 1990. Memory consistency and event ordering in scalable shared-memory multiprocessors. In Proceedings of the 17th Annual International Symposium on Computer Architecture. 15--26. Google Scholar
Digital Library
- Gopal, S., Vijaykumar, T., Smith, J., and Sohi, G. 1998. Speculative versioning cache. In Proceedings of the 4th HPCA. Google Scholar
Digital Library
- Gray, J. 1993. The Benchmark Handbook for Transaction Processing Systems. Morgan-Kaufmann Publishers, San Francisco, CA. Google Scholar
Digital Library
- Gupta, M. and Nim, R. 1998. Techniques for speculative run-time parallelization of loops. In Proceedings of Supercomputing'98. Google Scholar
Digital Library
- Halstead, Jr., R. 1985. Multilisp: A language for concurrent symbolic computation. ACM Trans. Prog. Lang. Syst. 7, 4, 501--538. Google Scholar
Digital Library
- Hammond, L., Carlstrom, B. D., Wong, V., Hertzberg, B., Chen, M., Kozyrakis, C., and Olukotun, K. 2004a. Programming with transactional coherence and consistency (TCC). In Proceedings of the 11th ASPLOS. Google Scholar
Digital Library
- Hammond, L., Hubbert, B., Siu, M., Prabhu, M., Chen, M., and Olukotun, K. 2000. The Stanford Hydra CMP. IEEE Micro. 20, 2, 71--84. Google Scholar
Digital Library
- Hammond, L., Wong, V., Chen, M., Carlstrom, B. D., Davis, J. D., Hertzberg, B., Prabhu, M. K., Wijaya, H., Kozyrakis, C., and Olukotun, K. 2004b. Transactional memory coherence and consistency. In Proceedings of the 31st ISCA. Google Scholar
Digital Library
- Herlihy, M. and Moss, J. 1993. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th ISCA. Google Scholar
Digital Library
- IBM Corporation. 2004. IBM DB2 Universal Database Administration Guide: Performance. IBM Corporation, Yorktown Heights, NY.Google Scholar
- Jeremiassen, T. E. and Eggers, S. J. 1995. Reducing false sharing on shared memory multiprocessors through compile time data transformations. In PPOPP'95: Proceedings of the Fifth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. 179-- 188. Google Scholar
Digital Library
- Johnson, T., Eigenmann, R., and Vijaykumar, T. 2004. Min-cut program decomposition for thread-level speculation. In Proceedings of the ACM SIGPLAN'04 Conference on Programming Language Design and Implementation. Google Scholar
Digital Library
- Kaufmann, H. and Schek, H. 1996. Extending TP-monitors for intra-transaction parallelism. In Proceedings of the 4th PDIS. Google Scholar
Digital Library
- Knight, T. 1986. An architecture for mostly functional languages. In Proceedings of the ACM Lisp and Functional Programming Conference. 500--519. Google Scholar
Digital Library
- Kung, H. and Robinson, J. 1981. On optimistic methods for concurrency control. ACM Trans. Database Syst. 6, 2, 213--226. Google Scholar
Digital Library
- Mahlke, S., Chen, W., Gyllenhaal, J., and Hwu, W. 1992. Compiler code transformations for superscalar-based high-performance systems. In Proceedings of the International Conference on Supercomputing. Google Scholar
Digital Library
- Marcuello, P. and González, A. 1999. Clustered speculative multithreaded processors. In Proceedings of the ACM International Conference on Supercomputing. Google Scholar
Digital Library
- Martínez, J. F. and Torrellas, J. 2002. Speculative synchronization: Applying thread-level speculation to explicitly parallel applications. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems (San Jose, CA). Google Scholar
Digital Library
- McFarling, S. 1993. Combining branch predictors. Tech. rep. TN-36. Digital Western Research Laboratory, Palo Alto, CA.Google Scholar
- McWherter, D., Schroeder, B., Ailamaki, A., and Harchol-Balter, M. 2004. Priority mechanisms for OLTP and transactional Web applications. In Proceedings of the IEEE International Conference on Data Engineering. Google Scholar
Digital Library
- McWherter, D. T., Schroeder, B., Ailamaki, A., and Harchol-Balter, M. 2005. Improving preemptive prioritization via statistical characterization of OLTP locking. In Proceedings of the IEEE International Conference on Data Engineering. Google Scholar
Digital Library
- Miller, J. and Lau, H. 2001. Microsoft SQL Server 2000 Resource Kit. Chapter RDBMS: Performance Tuning Guide for Data Warehousing. Microsoft Press: Redmond, WA. 575--653.Google Scholar
- Mohan, C., Haderle, D., Lindsay, B., Pirahesh, H., and Schwarz, P. 1992. ARIES: A transaction recovery method supporting fine-granularity locking and partial rollbacks using write-ahead logging. ACM Trans. Database Syst. 17, 1, 94--162. Google Scholar
Digital Library
- Morrisett, G. and Herlihy, M. 1993. Optimistic parallelization. Tech. rep. CMU-CS-93-171. School of Computer Science, Carnegie Mellon University, Pittsburgh, PA.Google Scholar
- Olson, M., Bostic, K., and Seltzer, M. 1999. Berkeley DB. In Proceedings of the Summer Usenix Technical Conference. Google Scholar
Digital Library
- Olukotun, K., Hammond, L., and Willey, M. 1999. Improving the performance of speculatively parallel applications on the hydra CMP. In Proceedings of the 13th Annual ACM International Conference on Supercomputing. Google Scholar
Digital Library
- Ooi, C. L., Kim, S. W., Park, I., Eigenmann, R., Falsafi, B., and Vijaykumar, T. N. 2001. Multiplex: Unifying conventional and speculative thread-level parallelism on a chip multiprocessor. In Proceedings of the International Conference on Supercomputing. Google Scholar
Digital Library
- Oplinger, J., Heine, D., and Lam, M. 1999. In search of speculative thread-level parallelism. In Proceedings of PACT '99. Google Scholar
Digital Library
- Prabhu, M. and Olukotun, K. 2003. Using thread-level speculation to simplify manual parallelization. In Proceedings of the ACM SIGPLAN 2003 Symposium on Principles & Practice of Parallel Programming. Google Scholar
Digital Library
- Prvulovic, M., Garzarán, M. J., Rauchwerger, L., and Torrellas, J. 2001. Removing architectural bottlenecks to the scalability of speculative parallelization. In Proceedings of the 28th ISCA. Google Scholar
Digital Library
- Rajwar, R. and Goodman, J. 2001. Speculative lock elision: Enabling highly concurrent multithreaded execution. In Proceedings of the 34th Annual International Symposium on Microarchitecture. Google Scholar
Digital Library
- Rauchwerger, L. and Padua, D. 1999. The LRPD test: Speculative run-time parallelization of loops with privatization and reduction parallelization. IEEE Trans. Parallel Distrib. Syst. 10, 2, 160--172. Google Scholar
Digital Library
- Rotenberg, E., Jacobson, Q., Sazeides, Y., and Smith, J. 1997. Trace processors. In Proceedings of the 30th Annual IEEE/ACM International Symposium on Microarchitecture. Google Scholar
Digital Library
- Rundberg, P. and Stenstrom, P. 2000. Low-cost thread-level data dependence speculation on multiprocessors. In Proceedings of the Fourth Workshop on Multithreaded Execution, Architecture and Compilation.Google Scholar
- Rys, M., Norrie, M., and Schek, H. 1996. Intra-transaction parallelism in the mapping of an object model to a relational multi-processor system. In Proceedings of the 22nd VLDB. Google Scholar
Digital Library
- Shasha, D., Llirbat, F., Simon, E., and Valduriez, P. 1995. Transaction chopping: Algorithms and performance studies. ACM Trans. Database Syst. 20, 3, 325--363. Google Scholar
Digital Library
- Shinnar, A., Tarditi, D., Plesko, M., and Steensgaard, B. 2004. Integrating support for undo with exception handling. Tech. rep. MSR-TR-2004-140. Microsoft Research. Redmond, WA.Google Scholar
- Silberschatz, A., Galvin, P., and Gagne, G. 2002. Operating System Concepts. John Wiley & Sons, New York, NY. Google Scholar
Digital Library
- Sohi, G., Breach, S., and Vijaykumar, T. 1995. Multiscalar processors. In Proceedings of the 22nd ISCA. Google Scholar
Digital Library
- Steffan, J., Colohan, C., and Mowry, T. 1997. Architectural support for thread-level data speculation. Tech. rep. CMU-CS-97-188. School of Computer Science, Carnegie Mellon University, Pittsburgh, PA.Google Scholar
- Steffan, J., Colohan, C., Zhai, A., and Mowry, T. 2000. A scalable approach to thread-level speculation. In Proceedings of ISCA 27. Google Scholar
Digital Library
- Steffan, J., Colohan, C., Zhai, A., and Mowry, T. 2002. Improving value communication for thread-level speculation. In Proceedings of the 8th HPCA. Google Scholar
Digital Library
- Steffan, J. and Mowry, T. 1998. The potential for using thread-level data speculation to facilitate automatic parallellization. In Proceedings of the 4th HPCA. Google Scholar
Digital Library
- Steffan, J. G., Colohan, C. B., Zhai, A., and Mowry, T. C. 2005. The stampede approach to thread-level speculation. ACM Trans. Comput. Syst. 23, 3 (Aug.), 253--300. Google Scholar
Digital Library
- Torrellas, J., Lam, M., and Hennessy, J. 1990. Shared data placement optimizations to reduce multiprocessor cache miss rates. In Proceedings of the 1990 International Conference on Parallel Processing. Vol. II. 266--270.Google Scholar
- Transaction Processing Performance Council. 2005. TPC benchmark C standard specification revision 5.4. Go online to http://www.tpc.org.Google Scholar
- Tremblay, M. 1999. MAJC: Microprocessor architecture for Java computing. In Proceedings of HotChips '99.Google Scholar
- Vijaykumar, T. 1998. Compiling for the multiscalar architecture. Ph.D. dissertation. University of Wisconsin-Madison, Madison, WI. Google Scholar
Digital Library
- Yeager, K. 1996. The MIPS R10000 superscalar microprocessor. IEEE Micro 16, 2, 28--40. Google Scholar
Digital Library
- Zhai, A., Colohan, C., Steffan, J., and Mowry, T. 2002. Compiler optimization of scalar value communication between speculative threads. In Proceedings of the 10th ASPLOS. Google Scholar
Digital Library
- Zhai, A., Colohan, C., Steffan, J., and Mowry, T. 2004. Compiler optimization of memory-resident value communication between speculative threads. In Proceedings of the International Symposium on Code Generation and Optimization. Google Scholar
Digital Library
- Zhang, Y., Rauchwerger, L., and Torrellas, J. 1999. Hardware for speculative parallelization of partially-parallel loops in DSM multiprocessors. In Proceedings of the 5th HPCA. 135--141. Google Scholar
Digital Library
- Zuzarte, C. 2005. Personal communication.Google Scholar
Index Terms
Incrementally parallelizing database transactions with thread-level speculation
Recommendations
The STAMPede approach to thread-level speculation
Multithreaded processor architectures are becoming increasingly commonplace: many current and upcoming designs support chip multiprocessing, simultaneous multithreading, or both. While it is relatively straightforward to use these architectures to ...
Compiler and hardware support for reducing the synchronization of speculative threads
Thread-level speculation (TLS) allows us to automatically parallelize general-purpose programs by supporting parallel execution of threads that might not actually be independent. In this article, we focus on one important limitation of program ...






Comments