skip to main content
research-article
Open Access

Ludo Hashing: Compact, Fast, and Dynamic Key-value Lookups for Practical Network Systems

Authors Info & Claims
Published:12 June 2020Publication History
Skip Abstract Section

Abstract

Key-value lookup engines running in fast memory are crucial components of many networked and distributed systems such as packet forwarding, virtual network functions, content distribution networks, distributed storage, and cloud/edge computing. These lookup engines must be memory-efficient because fast memory is small and expensive. This work presents a new key-value lookup design, called Ludo Hashing, which costs the least space (3.76 + 1.05l bits per key-value item for l-bit values) among known compact lookup solutions including the recently proposed partial-key Cuckoo and Bloomier perfect hashing. In addition to its space efficiency, Ludo Hashing works well with most practical systems by supporting fast lookups, fast updates, and concurrent writing/reading. We implement Ludo Hashing and evaluate it with both micro-benchmark and two network systems deployed in CloudLab. The results show that in practice Ludo Hashing saves 40% to 80%+ memory cost compared to existing dynamic solutions. It costs only a few GB memory for 1 billion key-value items and achieves high lookup throughput: over 65 million queries per second on a single node with multiple threads.

References

  1. CloudLab. https://www.cloudlab.us/.Google ScholarGoogle Scholar
  2. Implementation of farmhash. https://github.com/google/farmhash.Google ScholarGoogle Scholar
  3. Implementation of Ludo Hashing in CGoogle ScholarGoogle Scholar
  4. . https://github.com/QianLabUCSC/Ludo.Google ScholarGoogle Scholar
  5. Implementation of Othello: a concise and fast data structure for classification. https://github.com/sdyy1990/Othello.Google ScholarGoogle Scholar
  6. Intel DPDK: Data Plane Development Kit. https://www.dpdk.org.Google ScholarGoogle Scholar
  7. Pktgen-DPDK. https://github.com/pktgen/Pktgen-DPDK.Google ScholarGoogle Scholar
  8. Implementation of presized cuckoo map. https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/util/presized_cuckoo_map.h, 2016.Google ScholarGoogle Scholar
  9. Abu-Libdeh, H., Costa, P., Rowstron, A., O'Shea, G., and Donnelly, A. Symbiotic routing in future data centers. In Proc. of ACM SIGCOMM (2010).Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Belazzougui, D., Boldi, P., Pagh, R., and Vigna, S. Monotone minimal perfect hashing: searching a sorted table with $O(1)$ accesses. In Proc. of ACM SODA (2009).Google ScholarGoogle ScholarCross RefCross Ref
  11. Belazzougui, D., and Botelho, F. C. Hash, displace, and compress. In Proc. of Algorithms-ESA (2009).Google ScholarGoogle ScholarCross RefCross Ref
  12. Bloom, B. H. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM 13, 7 (1970), 422--426.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Cain, J. A., Sanders, P., and Wormald, N. The Random Graph Threshold for k-orientiability and a Fast Algorithm for Optimal Multiple-Choice Allocation. In Proc. of ACM-SIAM SODA (2007).Google ScholarGoogle Scholar
  14. Charles, D., and Chellapilla, K. Bloomier Filters: A Second Look. In Proc. of European Symposium on Algorithms (2008).Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Charles, D., and Chellapilla, K. Bloomier Filters: A Second Look. In Proc. of ESA (2008).Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Chazelle, B., Kilian, J., Rubinfeld, R., and Tal, A. The Bloomier Filter: An Efficient Data Structure for Static Support Lookup Tables. In Proc. of ACM SODA (2004), pp. 30--39.Google ScholarGoogle Scholar
  17. Eisenbud, D. E., Yi, C., Contavalli, C., Smith, C., Kononov, R., Mann-Hielscher, E., Cilingiroglu, A., Cheyney, B., Shang, W., and Hosein, J. D. Maglev: A Fast and Reliable Software Network Load Balancer. In Proc. of USENIX NSDI (2016).Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Erlingsson, U., Manasse, M., and McSherry, F. A cool and practical alternative to traditional hash tables. In Proc. 7th Workshop on Distributed Data and Structures (WDAS'06) (2006).Google ScholarGoogle Scholar
  19. Esposito, E., Graf, T. M., and Vigna, S. Recsplit: Minimal perfect hashing via recursive splitting. Tech. rep., 2019.Google ScholarGoogle Scholar
  20. Fan, B., Andersen, D., and Kaminsky, M. MemC3: Compact and Concurrent MemCache with Dumber Caching and Smarter Hashing. In Proc. of USENIX NSDI (2013).Google ScholarGoogle Scholar
  21. Fan, B., Andersen, D. G., Kaminsky, M., and Mitzenmacher, M. D. Cuckoo filter: Practically better than bloom. In Proceedings of the 10th ACM International on Conference on emerging Networking Experiments and Technologies (2014), ACM.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Fan, B., Zhou, D., Lim, H., Kaminsky, M., and Andersen, D. G. When cycles are cheap, some tables can be huge. In Proc. of USENIX HotOS (2013).Google ScholarGoogle Scholar
  23. Fan, L., Cao, P., Almeida, J., and Broder, A. Z. Summary Cache: A Scalable Wide-Area Web Cache Sharing Protocol. IEEE/ACM Transactions on Networking (2000).Google ScholarGoogle Scholar
  24. Fernholz, D., and Ramachandran, V. The k-orientability Thresholds for $G_n,p$. In Proc. of ACM/SIAM SODA (2007).Google ScholarGoogle Scholar
  25. Fountoulakis, N., Khosla, M., and Panagiotou, K. The multiple-orientability thresholds for random hypergraphs. In Proc. of ACM/SIAM SODA (2011).Google ScholarGoogle ScholarCross RefCross Ref
  26. Gao, P., and Wormald, N. C. Load balancing and orientability thresholds for random hypergraphs. In Proc. of ACM STOC (2010).Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Genuzio, M., Ottaviano, G., and Vigna, S. Fast Scalable Construction of (Minimal Perfect Hash) Functions. In Proceedings of the International Symposium on Experimental Algorithms (2016).Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Greenberg, A., Hamilton, J. R., Jain, N., Kandula, S., Kim, C., Lahiri, P., Maltz, D. A., Patel, P., and Sengupta, S. VL2: a scalable and flexible data center network. In Proceedings of ACM SIGCOMM (2009).Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Jain, S., Chen, Y., Jain, S., and Zhang, Z.-L. VIRO: A Scalable, Robust and Name-space Independent Virtual Id ROuting for Future Networks. In Proc. of IEEE INFOCOM (2011).Google ScholarGoogle Scholar
  30. Kim, C., Caesar, M., and Rexford, J. Floodless in SEATTLE: A Scalable Ethernet Architecture for Large Enterprises. In Proc. of Sigcomm (2008).Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Kirsch, A., and Mitzenmacher, M. Using a queue to de-amortize cuckoo hashing in hardware. In Proceedings of the Forty-Fifth Annual Allerton Conference on Communication, Control, and Computing (2007), vol. 75.Google ScholarGoogle Scholar
  32. Kirsch, A., Mitzenmacher, M., and Wieder, U. More robust hashing: Cuckoo hashing with a stash. SIAM Journal on Computing (2009).Google ScholarGoogle Scholar
  33. Larisch, J., Choffnes, D., Levin, D., Maggs, B. M., Mislove, A., and Wilson, C. CRLite: A Scalable System for Pushing All TLS Revocations to All Browsers. In Proc. of IEEE S&P (2017).Google ScholarGoogle ScholarCross RefCross Ref
  34. Lelarge, M. A new approach to the orientation of random hypergraphs.. In Proc. of ACM-SIAM SODA (2012).Google ScholarGoogle ScholarCross RefCross Ref
  35. Li, X., Andersen, D., Kaminsky, M., and Freedman, M. J. Algorithmic improvements for fast concurrent cuckoo hashing. In Proc. of ACM EuroSys (2014).Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Lim, H., Fan, B., Andersen, D. G., and Kaminsky, M. SILT: A Memory-Efficient, High-Performance Key-Value Store. In Proc. of ACM SOSP (2011).Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Maggs, B. M., and Sitaraman, R. K. Algorithmic Nuggets in Content Delivery. ACM SIGCOMM Computer Communication Review (2015).Google ScholarGoogle Scholar
  38. Majewski, B. S., Wormald, N. C., Havas, G., and Czech, Z. J. A Family of Perfect Hashing Methods. The Computer Journal (1996).Google ScholarGoogle Scholar
  39. Mao, R., Zeng, H., Kim, C., Lee, J., and Yu, M. SilkRoad: Making Stateful Layer-4 Load Balancing Fast and Cheap Using Switching ASICs. In Proc. of ACM SIGCOMM (2017).Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Martn Dietzfelbinger and Christoph Weidling . Balanced allocation and dictionaries with tightly packed constant size bins. Theoretical Computer Science (2007).Google ScholarGoogle Scholar
  41. McKeown, N., Anderson, T., Balakrishnan, H., Parulkar, G., Peterson, L., Rexford, J., Shenker, S., and Turner, J. Openflow: Enabling innovation in campus networks. SIGCOMM Comput. Commun. Rev. (2008).Google ScholarGoogle Scholar
  42. Pagh, R., and Rodler, F. F. Cuckoo hashing. Journal of Algorithms (2004).Google ScholarGoogle Scholar
  43. Parekh, A. K., and Gallager, R. G. A generalized processor sharing approach to flow control in integrated services networks: the single-node case. IEEE/ACM Transactions on Networking 1, 3 (1993), 344--357.Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Patel, P., Bansal, D., Yuan, L., Murthy, A., Greenberg, A., Maltz, D. A., Kern, R., Kumar, H., Zikos, M., Wu, H., Kim, C., and Karri, N. Ananta: Cloud scale load balancing.Google ScholarGoogle Scholar
  45. Pontarelli, S., Reviriego, P., and Mitzenmacher, M. Emoma: Exact match in one memory access. IEEE Transactions on Knowledge and Data Engineering (2017).Google ScholarGoogle Scholar
  46. Qian, C., and Lam, S. ROME: Routing On Metropolitan-scale Ethernet. In Proceedings of IEEE ICNP (2012).Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Raab, M., and Steger, A. Balls into Bins -- A Simple and Tight Analysis. In Lecture Notes in Computer Science (1998).Google ScholarGoogle Scholar
  48. Raychaudhuri, D., Nagaraja, K., and Venkataramani, A. MobilityFirst: A Robust and Trustworthy MobilityCentric Architecture for the Future Internet. Mobile Computer Communication Review (2012).Google ScholarGoogle Scholar
  49. Schlinker, B., et al. Engineering Egress with Edge Fabric: Steering Oceans of Content to the World. In Proc. of ACM SIGCOMM (2017).Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Shi, S., Qian, C., and Wang, M. Re-designing Compact-structure based Forwarding for Programmable Networks. In Proc. of IEEE ICNP (2019).Google ScholarGoogle ScholarCross RefCross Ref
  51. Shi, W., Cao, J., Zhang, Q., Li, Y., and Xu, L. Edge computing: Vision and challenges. IEEE Internet of Things Journal 3, 5 (2016).Google ScholarGoogle Scholar
  52. Wang, M., et al. Collaborative Validation of Public-Key Certificates for IoT by Distributed Caching. In Proc. of IEEE INFOCOM (2019).Google ScholarGoogle ScholarCross RefCross Ref
  53. Wang, M., Zhou, M., Shi, S., and Qian, C. Vacuum filters: more space-efficient and faster replacement for bloom and cuckoo filters. Proceedings of the VLDB Endowment (2019).Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Wang, M., Zhou, M., Shi, S., and Qian, C. Vacuum Filters: More Space-Efficient and Faster Replacement for Bloom and Cuckoo Filters. In Proceedings of VLDB (2020).Google ScholarGoogle Scholar
  55. Weil, S. A., Brandt, S. A., Miller, E. L., Long, D. D. E., and Maltzahn, C. Ceph: A scalable, high-performance distributed file system. In Proc. of USENIX OSDI (2006).Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Wieder, U. Hashing, Load Balancing and Multiple Choice. Now Publishers, 2017.Google ScholarGoogle Scholar
  57. Yang, T., Yang, D., Jiang, J., Gao, S., Cui, B., Shi, L., and Li, X. Coloring Embedder: a Memory Efficient Data Structure for Answering Multi-set Query. In Proc. of IEEE ICDE (2019).Google ScholarGoogle Scholar
  58. Yap, K.-K., et al. Taking the Edge off with Espresso: Scale, Reliability and Programmability for Global Internet Peering. In Proc. of ACM SIGCOMM (2017).Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Yu, M., Fabrikant, A., and Rexford, J. BUFFALO: Bloom filter forwarding architecture for large organizations. In Proc. of ACM CoNEXT (2009).Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Yu, Y., Belazzougui, D., Qian, C., and Zhang, Q. Memory-efficient and Ultra-fast Network Lookup and Forwarding using Othello Hashing. IEEE/ACM Transactions on Networking (2018).Google ScholarGoogle Scholar
  61. Yu, Y., Li, X., and Qian, C. SDLB: A Scalable and Dynamic Software Load Balancer for Fog and Mobile Edge Computing. In Proc. of ACM SIGCOMM Workshop on Mobile Edge Computing (MECCOM) (2017).Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Zhou, D., Fan, B., Lim, H., Andersen, D. G., Kaminsky, M., Mitzenmacher, M., Wang, R., and Singh, A. Scaling up clustered network appliances with scalebricks. In SIGCOMM (2015).Google ScholarGoogle Scholar
  63. Zhou, D., Fan, B., Lim, H., Kaminsky, M., and Andersen, D. G. Scalable, High Performance Ethernet Forwarding with CuckooSwitch. In Proc. of ACM CoNEXT (2013).Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Ludo Hashing: Compact, Fast, and Dynamic Key-value Lookups for Practical Network Systems

        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

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!