skip to main content
10.1145/1007568.1007592acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
Article

Buffering databse operations for enhanced instruction cache performance

Published:13 June 2004Publication History

ABSTRACT

As more and more query processing work can be done in main memory access is becoming a significant cost component of database operations. Recent database research has shown that most of the memory stalls are due to second-level cache data misses and first-level instruction cache misses. While a lot of research has focused on reducing the data cache misses, relatively little research has been done on improving the instruction cache performance of database systems.We first answer the question "Why does a database system incur so many instruction cache misses?" We demonstrate that current demand-pull pipelined query execution engines suffer from significant instruction cache thrashing between different operators. We propose techniques to buffer database operations during query execution to avoid instruction cache thrashing. We implement a new light-weight "buffer" operator and study various factors which may affect the cache performance. We also introduce a plan refinement algorithm that considers the query plan and decides whether it is beneficial to add additional "buffer" operators and where to put them. The benefit is mainly from better instruction locality and better hardware branch prediction. Our techniques can be easily integrated into current database systems without significant changes. Our experiments in a memory-resident PostgreSQL database system show that buffering techniques can reduce the number of instruction cache misses by up to 80% and improve query performance by up to 15%.

References

  1. LMbench - Tools for Performance Analysis. http://www.bitmover.com/lmbench/.Google ScholarGoogle Scholar
  2. A. Ailamaki, D. J. DeWitt, M. D. Hill, and M. Skounakis. Weaving relations for cache performance. In Proceedings of VLDB Conference, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Ailamaki, D. J. DeWitt, M. D. Hill, and D. A. Wood. DBMSs on a modern processor: Where does time go? In Proceedings of VLDB conference, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Annavaram, J. M. Patel, and E. S. Davidson. Call graph prefetching for database applications. In Proceedings of International Symposium on High Performance Computer Architecture, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. L. A. Barroso, K. Gharachorloo, and E. Bugnion. Memory system characterization of commercial workloads. In Proceedings of International Symposium on Computer Architecture, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Boncz, S. Manegold, and M. L. Kersten. Database architecture optimized for the new bottleneck: Memory access. In Proceedings of VLDB Conference, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. I.-C. K. Chen, C.-C. Lee, and T. N. Mudge. Instruction prefetching using branch prediction information. In Proceedings of International Symposium on Microarchitecture, 1997.Google ScholarGoogle Scholar
  8. S. Chen, P. B. Gibbons, and T. C. Mowry. Improving index performance through prefetching. In Proceedings of ACM SIGMOD Conference, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. Chen, P. B. Gibbons, T. C. Mowry, and G. Valentin. Fractal prefetching B+-trees: Optimizing both cache and disk performance. In Proceedings of ACM SIGMOD Conference, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N. Gloy and M. D. Smith. Procedure placement using temporal-ordering information. ACM Transactions on Programming Languages and Systems, 21(5): 977--1027, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Graefe. Volcano, an extensible and parallel query evaluation system. IEEE Transactions on knowledge and data enginnering, 6(6):934--944, 1994.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. M. Haas et al. Starburst mid-flight: as the dust clears. IEEE Transactions on knowledge and data engineering, 2(1):143, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. H. Hashemi, D. R. Kaeli, and B. Calder. Efficient procedure mapping using cache line coloring. In SIGPLAN Conference on Programming Language Design and Implementation, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. G. Hinton, D. Sager, M. Upton, D. Boggs, D. Carmean, A. Kyker, and P. Roussel. The microarchitecture of the Pentium 4 processor. Intel Technology Journal, 1st Quarter, 2001.Google ScholarGoogle Scholar
  15. Intel Corp. VTune performance analyzer. http://www.intel.com/software/products/vtune/.Google ScholarGoogle Scholar
  16. Intel Inc. IA32 intel architecture optimization reference manual. 2003.Google ScholarGoogle Scholar
  17. K. Keeton, D. A. Patterson, Y. Q. He, R. C. Raphael, and W. E. Baker. Performance characterization of a quad pentium pro smp using oltp workloads. In Proceedings of the 25th International Symposium on Computer Architecture, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Kim, S. K. Cha, and K. Kwon. Optimizing multidimensional index trees for main memory access. In Proceedings of ACM SIGMOD Conference, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C.-K. Luk and T. C. Mowry. Cooperative prefetching: Compiler and hardware support for effective instruction prefetching in modern processors. In International Symposium on Microarchitecture, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. M. G. Maynard, C. M. Donnelly, and B. R. Olszewski. Contrasting characteristics and cache performance of technical and multi-user commercial workloads. In Proceedings of International Conference on Architectural Support for Programming Languages and Operating Systems, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S. Padmanabhan, T. Malkemus, R. Agarwal, and A. Jhingran. Block oriented processing of relational database operations in modern computer architectures. In Proceedings of ICDE Conference, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. E. Perl and R. L. Sites. Studies of windows nt performance using dynamic execution traces. In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. K. Pettis and R. C. Hansen. Profile guided code positioning. In Proceedings of ACM SIGPLAN conference, 1990 Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Ramirez et al. Optimization of instruction fetch for decision support workloads. In Proceedings of the International Conference on Parallel Processing, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Ramirez et al. Code layout optmizations for transaction processing workloads. In Proceedings of International Symposium on Computer Architecture, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. Rao and K. A. Ross. Cache conscious indexing for decision-support in main memory. In Proceedings of VLDB Conference, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Rao and K. A. Ross. Making B+ trees chache conscious in main memory. In Proceedings of ACM SIGMOD Conference, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. P. G. Selinger, M. M. Astrahan, D. D. Chamberlin, R. A. Lorie, and T. G. Price. Access with selection in a relational database management system. In Proceedings of ACM SIGMOD Conference, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Shatdal, C. Kant, and J. F. Naughton. Cache conscious algorithms for relational query processing. In Proceedings of VLDB Conference, pages 510--521, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. Smith and W. C. Hsu. Prefetching in supercomputer instruction caches. In Proceedings of Supercomputing, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Stonebraker, L. A. Rowe, and M. Hirohama. The implementation of Postgres. In Transactions on Knowledge and Data Engineering, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Transaction Processing Performance Council. TPC Benchmark H. Available via http://www.tpc.com/tpch/.Google ScholarGoogle Scholar
  33. J. Zhou and K. A. Ross. Buffering accesses to memory-resident index structures. In Proceedings of VLDB Conference, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  1. Buffering databse operations for enhanced instruction cache performance

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          SIGMOD '04: Proceedings of the 2004 ACM SIGMOD international conference on Management of data
          June 2004
          988 pages
          ISBN:1581138598
          DOI:10.1145/1007568

          Copyright © 2004 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 13 June 2004

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          Overall Acceptance Rate785of4,003submissions,20%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader