不要乱打:如何在Flash上缓存哈希
Don't Thrash: How to Cache Your Hash on Flash
摘要:
本文提出了新的替代品,著名的布隆过滤器数据结构。布隆过滤器是一种支持集合插入和成员查询的紧凑数据结构,在数据库、存储系统和网络中有着广泛的应用。由于布隆过滤器执行频繁的随机读取和写入,它几乎只在RAM中使用,限制了它可以表示的集合的大小。本文首先介绍了商过滤器,它支持布隆过滤器的基本操作,在空间和时间方面实现了大致相当的性能,但具有更好的数据局部性。商过滤器上的操作只需要少量的连续访问。商过滤器比布隆过滤器有其他优点:它支持删除,可以动态调整大小,并且可以有效地合并两个商过滤器。然后,本文给出了两个数据结构,缓冲商过滤器和级联过滤器,利用商过滤器的优点,从而作为SSD优化的替代布隆过滤器。级联过滤器比缓冲商过滤器具有更好的渐近I/O性能,但缓冲商过滤器在中小数据集上优于级联过滤器。这两种数据结构都明显优于最近提出的SSD优化的布隆过滤器变体,例如电梯布隆过滤器、缓冲布隆过滤器和森林结构布隆过滤器。在实验中,级联过滤器和缓冲商过滤器执行插入比最快的布隆过滤器变体快8.6-11倍,执行查找快0.94-2.56倍。
英文摘要:
This paper presents new alternatives to the well-known Bloom filter data structure. The Bloom filter, a compact data structure supporting set insertion and membership queries, has found wide application in databases, storage systems, and networks. Because the Bloom filter performs frequent random reads and writes, it is used almost exclusively in RAM, limiting the size of the sets it can represent. This paper first describes the quotient filter, which supports the basic operations of the Bloom filter, achieving roughly comparable performance in terms of space and time, but with better data locality. Operations on the quotient filter require only a small number of contiguous accesses. The quotient filter has other advantages over the Bloom filter: it supports deletions, it can be dynamically resized, and two quotient filters can be efficiently merged. The paper then gives two data structures, the buffered quotient filter and the cascade filter, which exploit the quotient filter advantages and thus serve as SSD-optimized alternatives to the Bloom filter. The cascade filter has better asymptotic I/O performance than the buffered quotient filter, but the buffered quotient filter outperforms the cascade filter on small to medium data sets. Both data structures significantly outperform recently-proposed SSD-optimized Bloom filter variants, such as the elevator Bloom filter, buffered Bloom filter, and forest-structured Bloom filter. In experiments, the cascade filter and buffered quotient filter performed insertions 8.6-11 times faster than the fastest Bloom filter variant and performed lookups 0.94-2.56 times faster.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。