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

Implementing database operations using SIMD instructions

Published:03 June 2002Publication History

ABSTRACT

Modern CPUs have instructions that allow basic operations to be performed on several data elements in parallel. These instructions are called SIMD instructions, since they apply a single instruction to multiple data elements. SIMD technology was initially built into commodity processors in order to accelerate the performance of multimedia applications. SIMD instructions provide new opportunities for database engine design and implementation. We study various kinds of operations in a database context, and show how the inner loop of the operations can be accelerated using SIMD instructions. The use of SIMD instructions has two immediate performance benefits: It allows a degree of parallelism, so that many operands can be processed at once. It also often leads to the elimination of conditional branch instructions, reducing branch mispredictions.We consider the most important database operations, including sequential scans, aggregation, index operations, and joins. We present techniques for implementing these using SIMD instructions. We show that there are significant benefits in redesigning traditional query processing algorithms so that they can make better use of SIMD technology. Our study shows that using a SIMD parallelism of four, the CPU time for the new algorithms is from 10% to more than four times less than for the traditional algorithms. Superlinear speedups are obtained as a result of the elimination of branch misprediction effects.

References

  1. http://lava.cs.virginia.edu/bpred.html.Google ScholarGoogle Scholar
  2. Sybase IQ. http://www.sybase.com/products/archivedproducts/sybaseiq.Google ScholarGoogle Scholar
  3. 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
  4. 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
  5. P. Boncz, S. Manegold, and M. Kersten. Database architecture optimized for the new bottleneck: Memory access. In Proceedings of VLDB Conference, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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
  7. D. Comer. The ubiquitous B-tree. ACM Computing Surveys, 11(2):121-137, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. J. DeWitt, J. Naughton, and D. Schneider. A comparison of non-equijoin algorithms. In Proceedings of VLDB Conference, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Dietzfelbinger, T. Hagerup, J. Katajainen, and M. Penttonen. A reliable randomized algorithm for the closest-pair problem. J. Algorithms, 25:19-51, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Finkel and J. Bentley. Quad trees: A data structure for retrieval on composite keys. Acta Informatica, 4:1-9, 1974.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Graefe and P. Larson. B-tree indexes and CPU caches. In Proceedings of ICDE Conference, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Guttman. R-trees: A dynamic index structure for spatial searching. ACM SIGMOD on Management of Data, pages 47-54, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. InfoCharger Engine. Optimization for decision support solutions. 1998. (available from http://www.tandem.com/prod_des/ifchegpd/ifchegpd.htm).Google ScholarGoogle Scholar
  14. Intel Inc. Intel architecture software developer's manual. 2001.Google ScholarGoogle Scholar
  15. Intel Inc. Intel C++ compiler user's manual. 2001.Google ScholarGoogle Scholar
  16. Intel Inc. Intel IA64 architecture software developer's manual. 2001.Google ScholarGoogle Scholar
  17. 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
  18. S. Manegold, P. Boncz, and M. Kersten. What happens during a join? Dissecting CPU and memory optimization effects. In Proceedings of VLDB Conference, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P. O'Neil and D. Quass. Improved query performance with variant indexes. In Proceedings of ACM SIGMOD Conference, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. A. Patterson and J. L. Hennessy. Computer Architecture: A Quantitative Approach, Second Edition. Morgan Kaugmann, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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
  22. J. Rao and K. A. Ross. Making B+ trees cache conscious in main memory. In Proceedings of ACM SIGMOD Conference, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Robinson. The K-D-B tree: A search structure for large multidimensional dynamic indexes. ACM SIGMOD on Management of Data, pages 10-18, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. K. A. Ross. Conjunctive selection conditions in main memory. In ACM Symposium on Principles of Database Systems, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. N. Slingerland and A. J. Smith. Multimedia extensions for general purpose microprocessors: A survey. Technical report CSD-00-1124, University of California at Berkeley, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. H. R. Strong, G. Markovsky, and A. K. Chandra. Search within a page. JACM, 26(3), 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. SUN Microsystem Inc. VIS instruction set user's manual. 2000.Google ScholarGoogle Scholar
  28. Times Ten Performance Software Inc. TimesTen 4.3 and Front-Tier 2.3 product descriptions, 2002. Available at http://www.timesten.com.Google ScholarGoogle Scholar

Index Terms

  1. Implementing database operations using SIMD instructions

      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 '02: Proceedings of the 2002 ACM SIGMOD international conference on Management of data
        June 2002
        654 pages
        ISBN:1581134975
        DOI:10.1145/564691

        Copyright © 2002 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: 3 June 2002

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        SIGMOD '02 Paper Acceptance Rate42of240submissions,18%Overall Acceptance Rate785of4,003submissions,20%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader