Buffered Bloom Filters on Solid State Storage

Buffered Bloom Filters on Solid State Storage

Buffered Bloom Filters on Solid State Storage Mustafa Canim George A. Mihaila Bishwaranjan University of Texas at Dallas IBM Watson Research Center Bhattacharjee Richardson, TX, USA Hawthorne, NY, USA IBM Watson Research Center [email protected] [email protected] Hawthorne, NY, USA [email protected] Christian A. Lang Kenneth A. Ross IBM Watson Research Center Columbia University Hawthorne, NY, USA New York, NY, USA [email protected] [email protected] ABSTRACT one or more random I/O operations, which would become Bloom Filters are widely used in many applications includ- a severe performance bottleneck. Therefore, simply plac- ing database management systems. With a certain allowable ing the filters on disk will not provide a sufficient quality of error rate, this data structure provides an efficient solution service particularly for time critical applications. for membership queries. The error rate is inversely pro- A less naive approach can be used when probes come in δ portional to the size of the Bloom filter. Currently, Bloom bulk. Instead of one large filter, we store disjoint filters. filters are stored in main memory because the low locality A record is hashed to one of the δ filters during the build of operations makes them impractical on secondary storage. or probe, and the access is performed on the smaller filter. In multi-user database management systems, where there is However, instead of performing the access immediately, we a high contention for the shared memory heap, the limited instead store the access request in a main-memory buffer. memory available for allocating a Bloom filter may cause a Only when a buffer becomes full (or when we flush a buffer high rate of false positives. In this paper we are proposing periodically) do the accesses actually get applied to the cor- a technique to reduce the memory requirement for Bloom responding filter partition. Because all of the accesses to filters with the help of solid state storage devices (SSD). By the component filter get applied at once, we improve the using a limited memory space for buffering the read/write access locality, amortizing the I/O cost and cache-miss cost requests, we can afford a larger SSD space for the actual of retrieving the filter into RAM/cache over a large number Bloom filter bit vector. In our experiments we show that of accesses. This idea is motivated by a similar idea used by with significantly less memory requirement and fewer hash Zhou and Ross for buffering accesses to B-trees to improve functions the proposed technique reduces the false positive locality of reference [23]. rate effectively. In addition, the proposed data structure As we shall see experimentally, even this buffering ap- runs faster than the traditional Bloom filters by grouping proach performs poorly when the secondary storage device the inserted records with respect to their locality on the is a hard disk. The random I/O-cost is sufficiently large that filter. it dominates the overall cost and limits throughput. How- ever, more recent secondary storage devices based on solid state flash memory have demonstrated much better random 1. INTRODUCTION I/O performance. We therefore study whether such devices The Bloom filter is a probabilistic data structure opti- have the potential to provide cost-effective solutions for ac- mized for very efficient membership queries [4]. It provides cessing large Bloom filters. a very compact representation of sets. This efficiency comes To perform this study, we have chosen to use what is to- at the price of reduced precision: specifically, the Bloom fil- day a high-end flash memory device, namely the Fusion-IO card [10]. See Table 1 for the specifications of this device. ter may incorrectly indicate that an element is present in 1 the original set, thus occasionally generating false positives As of May 2010, the retail price of this device is about $38 (but no false negatives). The false positive rate is directly per gigabyte. A higher-capacity MLC device by the same proportional to the compression ratio. Thus, in order to vendor has 60% of the throughput, but a price of $15 per gi- lower the false positive rate, a larger amount of memory is gabyte. Note that such flash devices are in a relatively early required. stage of development, and prices are expected to drop as Bloom filters are used in a wide variety of application ar- they become more widely adopted. Industry experts seem eas, such as databases [1], distributed information retrieval [20], to agree (see e.g., [11]) that within the next few years the network computing [5], and bioinformatics [15]. Some of price per Gigabyte of SSDs will be more than an order of these applications require large Bloom filters to reduce the magnitude below the price of main memory, and approach- false positive rate. In memory limited environments dedi- ing the price of hard disks. cating large memories for Bloom filters may not be feasible. 1All quoted prices were obtained from the Dell web-site. A naive approach to tackle this issue would be to put the For comparison purposes, the retail price of server RAM Bloom filter on secondary storage, either explicitly or by is about $82 per gigabyte using 8GB DIMMs, or $25 per using memory-mapped I/O. Each probe would then require gigabyte using 4GB DIMMs. The main contribution of the paper is an SSD-aware Bloom ther data reduction because the local conditions on the two filter algorithm that reduces the main memory usage by a tables are independent. In fact, the fraction of each table factor of at least four without any performance or quality that contributes to an output row for this query is θ1θ2. It loss. would be unrealistic to expect the storage subsystem to per- form the full join. In the absence of special clustering prop- 1.1 Motivating example erties, the join operation would require substantial CPU and To motivate the need for Bloom filters utilizing flash stor- memory resources. What is more, this join might be part of age, consider the following example based on the TPC-H a larger query plan in which these tables are not joined di- schema. Suppose a user poses the following query rectly, and performing the full join of these two tables would be suboptimal. Select * Nevertheless, we argue that the storage subsystem could From Lineitem L, Orders O effectively optimize the bandwidth requirements by applying Where L.Orderkey=O.Orderkey a Bloom filter to L and O before transmitting the data. Two And L.Quantity>1 Bloom filters would be created, one for L and one for O, And O.Orderstatus=’P’ representing the set of Orderkey values satisfying the local In relational algebra, we might write this query as selection conditions. These filters would then be used to further reduce the data in the other table before data is 1 σC1(L) J σC2(O) transmitted across the data channel to the compute nodes. where C1 and C2 are the local selection conditions on each The challenge in such a system is performing the Bloom table, and J is the join condition on Orderkey. Suppose that filter reduction in a low-resource environment such as a stor- the selectivities of C1 and C2 are θ1 and θ2 respectively, and age subsystem. We expect to have a small amount of RAM that C1 and C2 are statistically independent over the join relative to the total disk capacity, and much of that RAM of L and O. Note that Orderkey is a foreign key from L to O. could be devoted to other functions such as caching. On If this database was stored in a distributed fashion, with the other hand, the storage subsystem does have plentiful L and O stored at different sites, then data transmission can persistent storage. We therefore propose an approach that be reduced by employing a semijoin or Bloom filter [18]. For leverages the persistent storage, particularly solid state stor- example, one could ship age that has high random-I/O rates. Our approach allows efficient Bloom filter reduction to scale to much larger con- P = πOrderkey(σC2(O)) figurations than could be handled with RAM alone. In the remainder of this paper, we first recap the char- or a Bloom filter of P from the site hosting O to the site acteristics of traditional Bloom filters (TBF). In section 3, hosting L in order to reduce the amount of data from L we introduce our extensions to the TBF that allows it to that needs to be transmitted over the network. When the be SSD-resident without sacrificing creation and probing network is the bottleneck, such data reduction improves per- efficiency. The resulting data structure is called “buffered formance significantly. Bloom filter” (BBF). Finally, section 4 presents detailed ex- Now imagine that both O and L are stored in a com- periments for a variety of BBF usage scenarios. Section 5 plex storage subsystem. This subsystem contains a variety discusses related work and section 6 concludes the paper. of resources, including multiple persistent devices of various kinds, including hard disk drives and solid state drives. The subsystem contains a limited amount of processing power 2. TRADITIONAL BLOOM FILTERS and memory, sufficient to manage and optimize the stor- To introduce the traditional Bloom filters we use the frame- age system, but not designed to perform computations that work and notations described in [9, 17, 13]. A Bloom filter is require extensive CPU or memory resources. The storage a method to represent a set S = {R1, R2, ..., Rn} to support subsystem serves as the storage layer for many processing membership queries.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us