skip to main content
10.1145/2076623.2076640acmotherconferencesArticle/Chapter ViewAbstractPublication PagesideasConference Proceedingsconference-collections
research-article

Cache-conscious data placement in an in-memory key-value store

Published:21 September 2011Publication History

ABSTRACT

Key-value stores which keep the data entirely in main memory can serve applications whose performance criteria cannot be met by disk-based key-value stores. This paper evaluates the performance implications of cache-conscious data placement in an in-memory key-value store by examining how many values have to be stored consecutively in blocks in order to fully exploit memory locality during bandwidth-bound operations. We contribute by introducing a random block traversal main memory access pattern, by describing the corresponding memory access costs as well as by formally and experimentally deriving the correlation between block size and throughput. Our calculations and experiments vary the value and block sizes as well as their placement in the memory and derive their impact on cache-misses throughout the different memory hierarchies, the ability to prefetch data, and the number of needed CPU cycles to perform a certain set of data operations. The paper closes with the insight that a block-wise grouping of relatively few key-value pairs increases the throughput up to a factor six and with a discussion which implications a block-wise grouping of data has on the system design key-value store.

References

  1. A. Ailamaki, D. J. DeWitt, M. D. Hill, and D. A. Wood. Dbmss on a modern processor: Where does time go? In M. P. Atkinson, M. E. Orlowska, P. Valduriez, S. B. Zdonik, and M. L. Brodie, editors, VLDB, pages 266--277. Morgan Kaufmann, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. F. Chang, J. Dean, S. Ghemawat, W. C. Hsieh, D. A. Wallach, M. Burrows, T. Chandra, A. Fikes, and R. E. Gruber. Bigtable: a distributed storage system for structured data. In OSDI '06: Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation, pages 15--15, Berkeley, CA, USA, 2006. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Danga Interactive. memcached - a distributed memory object caching system. http://www.memcached.org/, Accessed on Nov 28 2010.Google ScholarGoogle Scholar
  4. J. Dean. Designs, Lessons and Advice from Building Large Distributed Systems. LADIS 2009 keynote. Available online at http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynoteladis2009.pdf, 2009.Google ScholarGoogle Scholar
  5. G. DeCandia, D. Hastorun, M. Jampani, G. Kakulapati, A. Lakshman, A. Pilchin, S. Sivasubramanian, P. Vosshall, and W. Vogels. Dynamo: amazon's highly available key-value store. In Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principles, SOSP '07, pages 205--220, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. J. DeWitt, R. H. Katz, F. Olken, L. D. Shapiro, M. R. Stonebraker, and D. A. Wood. Implementation techniques for main memory database systems. In Proceedings of the 1984 ACM SIGMOD international conference on Management of data, SIGMOD '84, pages 1--8, New York, NY, USA, 1984. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. U. Drepper. What Every Programmer Should Know About Memory. http://lwn.net/Articles/250967/, Accessed on Nov 28 2010.Google ScholarGoogle Scholar
  8. A. Lakshman and P. Malik. Cassandra: structured storage system on a p2p network. In Proceedings of the 28th ACM symposium on Principles of distributed computing, PODC '09, pages 5--5, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. W. Lin, S. K. Reinhardt, and D. Burger. Reducing dram latencies with an integrated memory hierarchy design. In Proceedings of the 7th International Symposium on High-Performance Computer Architecture, HPCA '01, page 301, Washington, DC, USA, 2001. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Manegold. The Calibrator (v0.9e), a Cache-Memory and TLB Calibration Tool. http://homepages.cwi.nl/manegold/Calibrator/, Accessed on Nov 14 2010.Google ScholarGoogle Scholar
  11. S. Manegold, P. Boncz, and M. L. Kersten. Generic database cost models for hierarchical memory systems. In Proceedings of the 28th international conference on Very Large Data Bases, VLDB '02, pages 191--202. VLDB Endowment, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Manegold, P. Boncz, and M. L. Kersten. Generic database cost models for hierarchical memory systems. Technical Report INS-R0203, CWI, Amsterdam, The Netherlands, March 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. K. Ousterhout, P. Agrawal, D. Erickson, C. Kozyrakis, J. Leverich, D. Mazières, S. Mitra, A. Narayanan, M. Rosenblum, S. M. Rumble, E. Stratmann, and R. Stutsman. The case for ramclouds: Scalable high-performance storage entirely in dram. In SIGOPS OSR. Stanford InfoLab, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. H. Pirk. Cache conscious data layouting for in-memory databases. Master's thesis, Humboldt-Universität zu Berlin, Germany, 2010.Google ScholarGoogle Scholar
  15. S. Sanfilippo. redis - a persistent key-value database with built-in net interface written in ansi-c for posix systems. http://code.google.com/p/redis/, Accessed on Nov 28 2010.Google ScholarGoogle Scholar
  16. R. Schöne, W. E. Nagel, and S. Pflüger. Analyzing cache bandwidth on the intel core 2 architecture. In C. H. Bischof, H. M. Bücker, P. Gibbon, G. R. Joubert, T. Lippert, B. Mohr, and F. J. Peters, editors, PARCO, volume 15 of Advances in Parallel Computing, pages 365--372. IOS Press, 2007.Google ScholarGoogle Scholar
  17. B. Trushkowsky, P. Bodik, A. Fox, M. J. Franklin, M. I. Jordan, and D. A. Patterson. The scads director: Scaling a distributed storage system under stringent performance requirements. In to be appear in Proceeding of FAST 2011 - 9th USENIX Conference on File and Storage Technologies, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Cache-conscious data placement in an in-memory key-value store

      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 Other conferences
        IDEAS '11: Proceedings of the 15th Symposium on International Database Engineering & Applications
        September 2011
        274 pages
        ISBN:9781450306270
        DOI:10.1145/2076623

        Copyright © 2011 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: 21 September 2011

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate74of210submissions,35%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader