System and method for identifying hot data and flows in a solid state drive
By using a combination of two Bloom filter arrays and counters in a multi-stream enabled solid-state disk (SSD), combined with digital masking logic, the problem of high false alarm rate of the Bloom filter is solved, and the correct allocation of data and performance improvement is achieved.
Patent Information
- Application Number
- CN201811189703.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-02-13
- Filing Date
- 2018-10-12
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2038-10-12
AI Technical Summary
The prior art is difficult to effectively reduce the false alarm rate of the Bloom filter in multi-stream enabled solid state disks (SSDs), resulting in incorrect allocation of data to the wrong streams, increasing the burden of internal physical writes.
Using a combination of two Bloom filter arrays and counters, the false positive rate is reduced by digital masking logic. The specific method includes inserting elements into the Bloom filter array and updating the counter, updating the Bloom filter using masking logic, thereby reducing the false positive rate.
It effectively reduces the false positive rate of the Bloom filter, ensures that the data is correctly allocated to the stream, reduces the burden of internal physical writes, and improves the performance of SSD.
Smart Images

Figure CN109684231B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims the benefit of and priority to U.S. Provisional Patent Application Serial No. 62 / 574,643, filed on October 19, 2017, the entire disclosure of which is incorporated herein by reference. Technical Field
[0003] The present disclosure relates generally to multi-stream enabled solid state disks (SSDs), and more particularly, to methods for identifying hot data and streams of an SSD. Background Art
[0004] Multi-streaming enables solid-state drives (SSDs) (e.g., NAND flash-based SSDs) to more efficiently place data based on "similar" characteristics, thereby reducing write amplification and improving SSD performance. In some cases, the host system can explicitly open streams in the SSD and send write requests to different streams based on the expected lifespan of different streams. A multi-stream enabled SSD ensures that data in a specific stream with similar lifespans are physically written together in the NAND flash space (or NAND flash blocks), and separates data with different lifespans into different streams. Therefore, efficient stream allocation is required to properly use a multi-stream SSD.
[0005] Existing applications running on the host system can be modified at the application layer to provide stream allocation for multiple streams. Modifying applications at the application layer is inefficient because it requires work for each individual application creator. Alternatively, a process running on the host system can keep a log of previously used data in a table or queue for stream allocation. This approach can require a large amount of memory, processing power, or other resources to insert, search, update, and delete data held in queues and tables.
[0006] Bloom filters (BFs) can be used to test the membership of a particular element within a data set. Bloom filters are specifically designed to provide space efficiency. For example, a Bloom filter can provide a query response of "definitely not in the set" or "possibly in the set". In order to provide fast query speeds and low memory consumption, Bloom filters sometimes give "false positives", that is, the Bloom filter responds that an entry exists even though the entry does not exist in the set. The more elements you add to a data set, the greater the chance of a false positive.
[0007] The empty Bloom filter comprises a data array of m bits that are all initially set to 0, i.e., an empty data array. A total of k different hash functions can be defined, and each hash function maps or hashes a portion of the set elements to one or more locations in the data array by producing a uniform random distribution. The number of hash functions k is typically much smaller than the number of bits m in the data array. The number of bits m in the data array is generally set to be proportional to the number of elements to be added; the exact choice of k and the proportionality constant of m can be determined by the expected false alarm rate of the Bloom filter.
[0008] Thus, Bloom filters provide fast lookups or fast query responses compared to other data structures (such as lists, queues, trees, etc.). However, unlike other data structures (such as lists, queues, trees, etc.), Bloom filters have several disadvantages. For example, Bloom filters do not allow deletion of data within a data set. Therefore, as the amount of data hashed into a Bloom filter increases, the probability of false positives and the false positive error rate increase. Bloom filters were originally proposed for applications where the amount of source data would require an impractically large amount of memory if "conventional" error-free hashing techniques were applied.
[0009] When Bloom filters are used for stream allocation in multi-stream applications, false positives can be harmful. For example, in the case of a false positive, a Bloom filter means that even if the incoming data has never been seen before (or the incoming data is cold data), the data can be assigned to a stream identifier (ID) as hot data. This can result in data being incorrectly assigned to the wrong stream. In addition, this cold data along with other hot data is copied every time during garbage collection. Therefore, high false positives can lead to high internal physical writes. On the other hand, for multi-stream applications, missed negatives are not as harmful as false positives because older stream IDs will continue to be used. Therefore, Bloom filters cannot be used directly for data temperature identification or stream identification. Summary of the invention
[0010] According to one embodiment, a method for a Bloom filter for multiple streams includes: providing a Bloom filter including two Bloom filter arrays, counters corresponding to the two Bloom filter arrays, and masking logic; inserting elements into one or more of the two Bloom filter arrays using multiple hash functions; updating the counter based on the insertion of the elements; updating the Bloom filter by inserting one or more additional elements into one or more of the two Bloom filter arrays and updating the counter; and, using the one or more additional elements to mask data stored in the Bloom filter to pseudo-delete the data using the masking logic and reduce the false alarm rate of the Bloom filter.
[0011] According to another embodiment, a solid state disk (SSD) includes: a flash memory; a flash controller configured to interact with the flash memory; a host interface configured to interact with a host computer; and a multi-stream manager configured to dispatch requests for accessing the flash memory to multiple streams. The multi-stream manager includes: two Bloom filter arrays, counters corresponding to the two Bloom filter arrays, and masking logic. The multi-stream manager is configured to: update the Bloom filter by inserting one or more additional elements into one or more of the two Bloom filter arrays and updating the counter; and, use the one or more additional elements to mask data stored in the Bloom filter to pseudo-erase the data using the masking logic and reduce the false alarm rate of the Bloom filter.
[0012] The above and other preferred features, including various novel details of the embodiments and combinations of events, will now be described in more detail with reference to the accompanying drawings and pointed out in the claims. It will be understood that the specific systems and methods described herein are shown in a manner that is only illustrative and not limiting. As will be appreciated by those skilled in the art, the principles and features described herein can be adopted in a large number of various embodiments without departing from the scope of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which are included as a part of this specification, illustrate presently preferred embodiments and, together with the general description given above and the detailed description of the preferred embodiments given below, serve to explain and teach the principles described herein.
[0014] Figure 1 An example solid state disk (SSD) including a multi-stream manager according to one embodiment is shown;
[0015] Figure 2 An example of a shielding technique for a Bloom filter according to one embodiment is shown;
[0016] Figure 3 shows a graphical representation of an example Bloom filter system including two arrays and a counter according to one embodiment;
[0017] Figure 4 shows a flowchart for operating an example Bloom filter to mask data according to one embodiment; and
[0018] Figure 5 A flow chart for operating an example Bloom filter to identify stream identifiers in a multi-stream SSD is shown according to one embodiment.
[0019] The drawings are not necessarily drawn to scale, and for illustrative purposes, elements of similar structure or function are generally represented by similar reference numerals throughout the drawings. The drawings are intended only to facilitate the description of the various embodiments described herein. The drawings do not describe every aspect of the teachings disclosed herein and do not limit the scope of the claims. DETAILED DESCRIPTION
[0020] Each of the features and teachings disclosed herein can be used alone or in combination with other features and teachings to provide a multi-stream enabled solid state disk SSD and a method for identifying hot data and streams of the SSD. Representative examples of many of these additional features and teachings, both individually and in combination, are further described in detail with reference to the accompanying drawings. This specific embodiment is intended only to teach those skilled in the art further details for practicing various aspects of the present teachings, and is not intended to limit the scope of the claims. Therefore, the feature combinations disclosed above in the specific embodiments are not necessarily used to practice the present teachings in the broadest manner. Instead, the specific embodiments are taught only to describe specific representative examples of the present teachings.
[0021] In the following description, for illustrative purposes only, specific terms are set forth to provide a thorough understanding of the present disclosure. However, it is apparent to those skilled in the art that these specific details are not required to practice the teachings of the present disclosure.
[0022] Some parts of the specific embodiments herein are shown in accordance with the algorithm and symbolic representation of the operation of the data bits in the computer memory. These algorithmic descriptions and representations are used by the technical personnel in the field of data processing to effectively express the essence of their work to other technical personnel in the field. Here and in a general sense, the algorithm is envisioned as a methodical sequence of steps leading to the desired result. These steps are steps that require physical manipulation of physical quantities. Although not necessary, these quantities usually take the form of electrical or magnetic signals that can be stored, transferred, combined, compared and manipulated by others. It has been proven that sometimes for convenience, but mostly for the reason of customary usage, these signals are referred to as bits, values, elements, symbols, characters, items, numbers, etc.
[0023] It should be noted, however, that these and similar terms will be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless otherwise explicitly stated in the following discussion, it should be recognized that throughout the specification, discussions utilizing terms such as "processing," "computing," "calculating," "determining," "displaying," etc. refer to the actions and processes of a computer system or similar electronic computing device that transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data represented as physical quantities within the computer system's memories or registers or other information storage, transmission, or display devices.
[0024] Furthermore, various features of the representative examples and dependent claims may be combined in ways not specifically and explicitly listed to provide additional useful embodiments of the present teachings. It is also particularly noted that all value ranges or indicative groups of entities disclose every possible intermediate value or intermediate entity for the original disclosure purpose as well as for the purpose of defining the claimed subject matter. It is also particularly noted that the sizes or shapes of the components shown in the drawings are designed to help understand how to practice the present disclosure and are not intended to limit the sizes and shapes shown in the examples.
[0025] The present disclosure describes a system utilizing a Bloom filter for identifying data temperature among multiple flows and managing flow IDs of data to dispatch access requests from hosts. According to one embodiment, the current Bloom filter includes digital masking logic for masking prior data stored in the Bloom filter. Compared to conventional data structures such as tables, queues, etc., the current Bloom filter has a space-efficient data structure for identifying data temperature. The current Bloom filter can provide any number of categories according to its application requirements, rather than just dividing data into two categories of "hot" and "cold".
[0026] Examples of digital masking logic include, but are not limited to, XOR gates. Masking of prior data is effectively (but not actually) deleting (also referred to herein as pseudo-deleting) prior data stored in the Bloom filter. Prior data can be temporarily "deleted", but can be restored to have the original data after another data is inserted into the Bloom filter. In this way, through pseudo-deletion, the Bloom filter can accommodate newly incoming data without compromising the false alarm rate. As a result, the current Bloom filter can reduce the false alarm rate even when the amount of data hashed into the Bloom filter increases. Prior data can be masked using any data, including, but not limited to: newly incoming data, any previously received incoming data, and masking data provided by the user. Regardless of what data is used to mask the Bloom filter, the array of the Bloom filter can be restored to its original state by masking the data.
[0027] Figure 1An example solid state disk (SSD) including a multi-stream manager according to one embodiment is shown. The SSD 100 includes a host interface 110 configured to interact with a host computer 150, a multi-stream manager 120, a flash controller 130, and a flash memory 140. The host interface 110 is configured to couple the SSD 100 to the host computer 150. The host interface 110 may be compatible with any of Peripheral Component Interconnect (PCI) Express (PCIe), Serial Attached SCSI (SAS), and Serial AT Attachment or other known technologies in the art. Alternatively, the SSD 100 may be coupled to the host computer over a network structure such as Ethernet, Fibre Channel, wireless bandwidth, and other network structures. In this case, the SSD 100 may be compatible with Non-Volatile Memory Express (NVMe) (NVM-oF), and the SSD 100 may be referred to as an Ethernet-attached SSD or simply eSSD.
[0028] The multi-stream manager 120 includes a Bloom filter array 121 and a masking logic 122 for performing a masking operation on the Bloom filter array 121. The multi-stream manager 120 can dispatch the access request received from the host computer 150 to the appropriate stream based on the characteristics of the access request and the association with the stream. For example, the multi-stream manager 120 can store data with similar characteristics (e.g., failure time) on the same physical erase block of the flash memory 140 to efficiently perform garbage collection. Therefore, the multi-stream manager 120 can reduce the write amplification factor (WAF) of the SSD 100. The masking logic 122 can temporarily mask the newly entered data by deleting the newly entered data to the Bloom filter array 121. Reference will be made to Figure 2 A detailed description of the masking technique performed by masking logic 122 is further described in detail.
[0029] In one embodiment, the multi-stream manager 120 may be implemented in dedicated hardware logic, such as an application specific integrated circuit (ASIC), or may be implemented as software or firmware implemented in a general purpose processor or controller. In some embodiments, the multi-stream manager 120 may be integrated into the flash controller 130. The flash controller 130 may provide a flash interface 135 to the flash memory 140.
[0030] Although in Figure 1100, but note that in some embodiments, the multi-stream manager 120 may be implemented in the host computer 150 without departing from the scope of the present disclosure. On the host side, the host computer 150 may establish a predetermined number of streams to access the SSD 100, for example, 8 to 16 streams. In this case, the multi-stream manager 120 may utilize the Bloom filter array 121 from the host side to identify hot data and host streams, and the SSD 100 may interact with the host computer 150 only via the multiple streams established between the host computer 150 and the SSD 100 based on the data and stream identification on the host side.
[0031] When the multi-stream manager 120 is implemented in the SSD 100, applications running on the host computer 150 may not need to be changed or reauthorized to implement the multi-stream capability. In this case, the SSD 100 may be coupled to another host computer without losing knowledge of the Bloom filter array 121. The data temperature (hot or cold) based on the frequency of access requests may be determined within the SSD 100, and thus, applications running on the host computer 150 may simply access data stored in the SSD 100 without knowing that the SSD 100 is capable of multi-streaming.
[0032] According to one embodiment, the current Bloom filter is used to identify hot data stored in the SSD. In addition, the same Bloom filter can be used in a multi-stream application to identify a stream ID corresponding to hot data or cold data among multiple streams. The host computer 150 can explicitly open the streams in the SSD 100 and send write requests to different streams according to the expected life of different streams. In this regard, the current Bloom filter for multi-stream applications is also referred to as a Bloom stream here.
[0033] Figure 2 An example of a masking technique for a Bloom filter according to one embodiment is shown. The Bloom filter has a 7-bit data array. Note that Figure 2 The current Bloom filters shown in are examples only, and the data array may have any number of bits without departing from the scope of the present disclosure.
[0034] In the current example, the Bloom filter has a 7-bit array (or register). Initially, the register bits are empty, so the array is an empty register including individual 0s for all 7 bits. New data A is inserted into the Bloom filter array using digital XOR logic, and the Bloom filter array is updated accordingly.
[0035] Next, assume that another data B arrives, which needs to be stored in the same 7-bit array. Subsequently, data B is inserted into the Bloom filter array by using masking, that is, the previous state of the Bloom filter array is XORed with the newly arrived data B. In the current example, data A has previously been inserted into the Bloom filter array, so data B is masked on data A, that is, A(XOR)B. Therefore, the Bloom filter array is updated to the current state that stores both data A and data B. The data inserted into the Bloom filter can be pseudo-deleted by applying the XOR logic again. Here, pseudo-deletion means that the data can be restored by reapplying the XOR logic again. The Bloom filter array can be restored to its previous state (that is, data A) corresponding to the state before the insertion of data B.
[0036] Current XOR masking techniques allow a certain degree of multiplexing of Bloom filters by storing multiple data at the same bit of the Bloom filter. The number of masking and recovery cycles can be any number of times. As long as the Bloom filter stores the history of the inserted data (e.g., using a counter), the Bloom filter can restore its value to any previous state. For example, current XOR masking can be used to create space for new incoming data and reduce the false alarm rate of the Bloom filter. A Bloom filter with a lower false alarm rate can be sufficient to identify a heat flow among multiple heat flows established between a host computer and an SSD.
[0037] According to one embodiment, a current Bloom filter having a data array of a predetermined size can be used for multi-stream applications by inserting and masking data. When masking (or inserting) data in the original Bloom filter array, bits may be invalid and the original data in the Bloom filter array may be lost. To overcome this problem, the current Bloom filter includes two Bloom filter arrays and a counter. The counter stores the total combined frequency of the data in the two Bloom filter arrays. For ease of explanation, the following example uses two Bloom filter arrays. However, it should be understood that more than two Bloom filter arrays can be used for more convenient and efficient data insertion and masking without departing from the scope of the present disclosure.
[0038] Figure 3A graphical representation of an example Bloom filter system including two arrays and a counter according to one embodiment is shown. The Bloom filter includes a first array BFi and a second array BFi'. The counter records the number of accesses to each bit in the array to specify the frequency of the corresponding bit. The two arrays BFi and BFi' are two Bloom filter arrays in which data is hashed by the same hash function. In the current example, three hash functions f1, f2 and f3 are shown to indicate an example use of the current Bloom filter system; however, it should be understood that the current Bloom filter system can be associated with any number of hash functions. Each hash function can set one bit or more bits of each of the two Bloom filter arrays BFi and BFi'.
[0039] Periodically, the current state of the two Bloom filter arrays and the counters can be saved in a historical data structure including historical Bloom filters and historical counters, and the historical Bloom filters and historical counters are then used to allocate flows. After the current state is stored in the historical data structure, the two Bloom filter arrays are set to empty or cleared to store new data, and the counters are restarted. Periodically copying the Bloom filter state to the historical data structure can capture the recency (and frequency) of the data inserted into the Bloom filter. After a specific time interval, the Bloom filter can ignore past data activity and move forward as a new Bloom filter to focus more on current data activity. The current Bloom filter structure can not only identify hot spots of the SSD, but also detect changes in the hot spots by updating itself when the hot spots change over time, thereby allocating flow IDs accordingly.
[0040] In one embodiment, a timer may be utilized to periodically save the Bloom filter array and counter at predetermined time intervals. Alternatively, an application running on the host computer 150 or the multi-stream manager 120 may determine the appropriate time to store the Bloom filter in the historical data structure. For example, the Bloom filter may switch a mode of operation, and prior to switching, the Bloom filter stores a snapshot of the Bloom filter array and counters so that when it returns to the original mode, the Bloom filter may restore the Bloom filter array and counters to their original state. In another example, the multi-stream manager 120 monitors each bit of the Bloom filter array and determines to reset the Bloom filter and counter when the number of bits of the Bloom filter array exceeds a threshold. In this manner, by applying decay to the historical counters, more recent data may be given greater importance.
[0041] Two Bloom filter arrays BFi and BFi' are passed to perform an OR operation (BFi||BFi') between them to be stored as historical Bloom filters. Of course, in one of the Bloom filter arrays, all data exists in an unmasked form. In the current example, the presence (or composition) of specific data with a high corresponding counter bit in the Bloom filter array indicates that the data is frequently accessed, that is, hot data. The OR operation can determine whether the data exists in at least one of the Bloom filter arrays. The ORed historical Bloom filter arrays and historical counters can indicate the specific frequency of access to specific data stored in the SSD, and the frequency can be used to allocate streams for accessing the data. The frequency of access can correspond to a time period from the time the Bloom filter arrays and counters are reset or nullified until they are stored in the historical data structure.
[0042] Reference Figure 1 , the multi-stream manager 120 may allocate multiple logical address spaces (LBA spaces) corresponding to access requests received from the host computer 150 to the SSD 100, as if the SSD 100 includes multiple virtual drives. The data that the multi-stream manager 120 allocates to a specific stream may have similar characteristics, such as expected life cycle, write seriality, life span, timing pattern, I / O size, file type, and / or I / O traffic pattern. The write command received from the host computer 150 may include metadata or an identifier of the requested data, and the write command may be associated with a specific stream among the multiple streams (or allocated to a specific stream ID) based on the metadata and / or their own characteristics.
[0043] According to one embodiment, the multi-stream manager 120 may determine the frequency of accessing data stored in a specific LBA of the SSD 100. For example, the frequency of accessing data may be determined by a history counter value corresponding to a bit in an ORed Bloom filter array stored in a history data structure. Based on the frequency, the multi-stream manager 120 may assign the accessed LBA to a specific stream among the streams that have been established between the host computer 150 and the SSD 100.
[0044] Next, the details of the algorithm implementation of the Bloom filter related to data insertion and acquisition of the stream ID of the data and the update of the history counter will be described. It should be understood that the current Bloom filter can be used for caching, tiering, etc. to efficiently capture the heat of the data and make decisions based on the data temperature information. The following routine shows how to implement stream allocation in a multi-stream enabled SSD.
[0045] The multi-stream manager includes a submission queue to store entries received from the host computer. The insert Bloom filter routine (here referred to as INSERT_BF()) is used to insert entries Xi from the submission queue into the Bloom filter. One of the two Bloom filter arrays is designated as the current Bloom filter and first attempts to insert data into the current Bloom filter. When the data to be stored arrives, the data is hashed to identify the bits in the Bloom filter. Subsequently, an attempt is made to store the hashed data in the current Bloom filter (in BF and BF'). If the current Bloom filter already has the data, the other Bloom filter becomes the current Bloom filter and the data is masked onto the new current Bloom filter. The corresponding counter bit is increased. The above insertion process is given by the following Algorithm 1INSERT_BF(). Through this process of inserting data, it is ensured that one of the Bloom filter arrays always contains a clean (i.e., unmasked) copy of the data.
[0046]
[0047] Another important operation of the multi-stream manager is to determine the stream ID of the data based on the Bloom filter structure. The Get Stream Bloom Filter routine (here called GET_STREAM_BF()) is used to obtain the stream ID from the Bloom filter. The stream ID can be determined based on the historical counter value of the hash bit for the data in the historical Bloom filter. The data is hashed into multiple bits in the Bloom filter. The index of the bit with the lowest frequency count is identified. If the bit is set, the data has been seen through the Bloom filter, and the counter value corresponding to the bit indicates the relative frequency of the data. Subsequently, using the frequency factor derived from the historical counter, the stream ID can be obtained by applying the function f. If the bit is empty, the data has never been seen before and the data does not exist in the Bloom filter.
[0048]
[0049] Here, the function f located at line 8 of the GET_STREAM_BF routine represents a class function, which can be derived from basic mathematical operations. The function f can vary depending on where and how the data structure of the current Bloom filter is applied. For example, the following exemplary functions fun1, fun2, and fun3 can be used to obtain stream IDs in a multi-stream enabled SSD.
[0050]
[0051] The update history routine (here called UPDATA_HIST()) is used to update the historical data structure of the Bloom filter using the entry Xi. As described above, the current states of the two Bloom filter arrays and the counter are periodically saved as "historical Bloom filter" and "historical counter", and the historical Bloom filter and the historical counter are used to allocate streams. An example of this conversion is shown by Algorithm 3 below. The historical Bloom filter is constructed by the OR operation of the two Bloom filter arrays and the previous historical Bloom filter state. In the current example, a decay factor of 2 is used for the frequency count stored in the counter for each time interval. Therefore, at each interval, the value of the current counter is added to the decayed value of the historical counter. If the cumulative counter is empty for any bit, it means that the data was hot once and then became very cold. In this case, whenever the cumulative counter value is empty, the Bloom filter value of the corresponding bit is also set to empty, thereby maintaining consistency.
[0052]
[0053] Figure 4 A flow chart for operating an example Bloom filter to mask data according to one embodiment is shown. The multi-stream manager 120 operates a Bloom filter including two Bloom filter arrays, counters corresponding to the two Bloom filter arrays, and masking logic. The multi-stream manager 120 inserts elements into one or more of the two Bloom filter arrays using multiple hash functions (401) and updates the counters based on the insertion of the elements (402). The multi-stream manager 120 also updates the Bloom filter by inserting one or more additional elements into one or more of the two Bloom filter arrays and updating the counters, and uses the one or more additional elements to mask the data stored in the Bloom filter to pseudo-delete the data using the masking logic and reduce the false alarm rate of the Bloom filter (403). The multi-stream manager 120 determines whether to save the Bloom filter data and the counter value in the historical data structure (404). For example, after switching the operating mode of the Bloom filter or when the number of bits of the two Bloom filter arrays exceeds a threshold, the Bloom filter data and the counter value can be periodically saved.
[0054] When the multi-stream manager 120 determines to save the Bloom filter data and the counter value in the history data structure, the multi-stream manager 120 performs an OR operation between the two Bloom filter arrays to generate a third Bloom filter array (405) and saves the counter value of the third Bloom filter array and the counter (406). After saving, the multi-stream manager 120 resets the two Bloom filter arrays and the counter (407) and continues the process of inserting data elements into the Bloom filter arrays and updating the counters accordingly.
[0055] Figure 5 A flow chart for operating an example Bloom filter to identify stream identifiers in a multi-stream SSD according to one embodiment is shown. The multi-stream manager 120 resets the Bloom filter array and counters (501). When the Bloom filter is first started (e.g., when the SSD is new or a new application is started on the host computer 150) or is reset, the Bloom filter array is an empty array and the counters include individual zeros. The multi-stream manager 120 may insert data into the Bloom filter array and update the counters (502) using one or more hash functions and masking logic 122. If a historical data structure lookup is requested (503), the multi-stream manager 120 may restore the Bloom filter array and counters from the historical data structure (511). Otherwise, the timer for resetting the Bloom filter expires (504: yes), the multi-stream manager 120 performs an OR operation between the two Bloom filter arrays and stores the ORed Bloom filter arrays and corresponding counters in the historical data structure (505). The process is repeated when the Bloom filter is reset to accommodate new incoming data while reducing the false alarm rate. When requested, a Bloom filter can utilize the history data structure to restore a previous state.
[0056] According to one embodiment, a method includes: providing a Bloom filter including two Bloom filter arrays, counters corresponding to the two Bloom filter arrays, and masking logic; inserting elements into one or more of the two Bloom filter arrays using multiple hash functions; updating the counter based on the insertion of the elements; updating the Bloom filter by inserting one or more additional elements into one or more of the two Bloom filter arrays and updating the counter; and, using the one or more additional elements to mask data stored in the Bloom filter to pseudo-delete the data using the masking logic and reduce the false alarm rate of the Bloom filter.
[0057] The method further includes: performing an OR operation between the two Bloom filter arrays to generate a third Bloom filter array; and saving the third Bloom filter array and a counter value of the counter in a history data structure.
[0058] The third Bloom filter array and the counter value may be periodically saved in the history data structure.
[0059] The third Bloom filter array and the counter value may be saved in a history data structure before switching the operating mode of the Bloom filter.
[0060] The third Bloom filter array and the counter value may be saved in the history data structure when the number of bits of the two Bloom filter arrays exceeds a threshold.
[0061] The counter value may indicate a frequency of access to data stored in a solid state disk (SSD) at addresses identified by the plurality of hash functions.
[0062] The SSD may include a flash memory and a flash controller configured to interact with the flash memory.
[0063] The method may further include identifying a stream among a plurality of streams established to access the SSD based on a frequency of access.
[0064] The method may also include: testing the third Bloom filter array using multiple test functions to determine a frequency of accessing data corresponding to an access request to the SSD based on a counter value of a counter, the access request being received from a host computer; and accessing data stored in the SSD via the stream among the multiple streams.
[0065] The method may further include resetting the two Bloom filter arrays and the counter after saving the counter value of the third Bloom filter array and the counter in the history data structure.
[0066] The two Bloom filter arrays may be managed and used independently of each other.
[0067] According to another embodiment, a solid state disk (SSD) includes: a flash memory; a flash controller configured to interact with the flash memory; a host interface configured to interact with a host computer; and a multi-stream manager configured to dispatch requests for accessing the flash memory to multiple streams. The multi-stream manager includes: two Bloom filter arrays, counters corresponding to the two Bloom filter arrays, and masking logic. The multi-stream manager is configured to: update the Bloom filter by inserting one or more additional elements into one or more of the two Bloom filter arrays and updating the counter; and, use the one or more additional elements to mask data stored in the Bloom filter to pseudo-erase the data using the masking logic and reduce the false alarm rate of the Bloom filter.
[0068] The multi-flow manager may also be configured to generate a third Bloom filter array by performing an OR operation between the two Bloom filter arrays and store the third Bloom filter array corresponding to at least one of the two Bloom filter arrays and a counter value of the counter in the history data structure.
[0069] The multi-flow manager may also be configured to periodically save the third Bloom filter array and the counter value in the history data structure.
[0070] The multi-flow manager may also be configured to save the third Bloom filter array and the counter value in the history data structure before switching the operation mode of the Bloom filter.
[0071] The multi-flow manager may also be configured to save the third Bloom filter array and the counter value in the history data structure when the number of bits of the two Bloom filter arrays exceeds a threshold.
[0072] The counter value may indicate a frequency of accesses to data stored in the solid state disk at addresses identified by the plurality of hash functions.
[0073] The multi-stream manager may also be configured to identify a stream among the plurality of streams established to access the SSD based on a frequency of access.
[0074] The multi-stream manager can also be constructed to: test the third Bloom filter array using multiple test functions to determine the frequency of accessing data corresponding to an access request to the SSD based on a counter value of a counter, the access request being received from a host computer; and access data stored in the SSD via the stream among the multiple streams.
[0075] The multi-flow manager may manage the two Bloom filter arrays independently.
[0076] The multi-flow manager may also be configured to reset the two Bloom filter arrays and the counter after saving the counter value of the third Bloom filter array and the counter in the history data structure.
[0077] The above example embodiments have been described above to illustrate various embodiments of implementing systems and methods for providing a multi-stream enabled solid state disk (SSD) and methods for identifying hot data and streams of an SSD. Various modifications and variations of the disclosed embodiments will occur to those of ordinary skill in the art. Subject matter intended to be within the scope of the invention is set forth in the appended claims.
Claims
1. A method for dispatching a request for accessing a flash memory to a plurality of flows, comprising: Providing a Bloom filter including two Bloom filter arrays, counters corresponding to the two Bloom filter arrays, and masking logic; inserting elements into one or more of the two Bloom filter arrays using a plurality of hash functions; updating the counter based on the insertion of the element; updating the Bloom filter by inserting one or more additional elements into one or more of the two Bloom filter arrays and updating the counter; as well as Data stored in the Bloom filter is masked using the one or more additional elements to pseudo-erase the data using the masking logic and reduce a false positive rate of the Bloom filter.
2. The method according to claim 1, further comprising: performing an OR operation between the two Bloom filter arrays to generate a third Bloom filter array; as well as The third Bloom filter array and the counter value of the counter are saved in a history data structure.
3. The method according to claim 2, wherein: The third Bloom filter array and the counter value are periodically saved in the history data structure.
4. The method according to claim 2, wherein: The third Bloom filter array and the counter value are saved in the history data structure before switching the operation mode of the Bloom filter.
5. The method according to claim 2, wherein: The third Bloom filter array and the counter value are stored in the history data structure when the bit numbers of the two Bloom filter arrays exceed a threshold.
6. The method according to claim 2, wherein: The counter value indicates a frequency of accesses to data stored in the solid state disk at addresses identified by the plurality of hash functions.
7. The method according to claim 6, wherein: The solid state disk includes a flash memory and a flash controller configured to interact with the flash memory.
8. The method according to claim 6, further comprising: A stream among a plurality of streams established to access the solid state disk is identified based on the frequency of access.
9. The method according to claim 8, further comprising: testing the third Bloom filter array using a plurality of test functions to determine a frequency of accessing data corresponding to an access request to the solid-state disk based on the counter value of the counter, the access request being received from a host computer; as well as Data stored in the solid state disk is accessed via the stream of the plurality of streams.
10. The method according to claim 2, further comprising: After saving the counter values of the third Bloom filter array and the counter in the history data structure, the two Bloom filter arrays and the counter are reset.
11. The method according to claim 1, wherein: The two Bloom filter arrays are managed and used independently of each other.
12. A solid state disk, comprising: Flash memory; a flash memory controller configured to interact with the flash memory; a host interface configured to interact with a host computer; as well as a multi-stream manager configured to dispatch a request for accessing the flash memory to a plurality of streams, The multi-flow manager includes: two Bloom filter arrays, counters corresponding to the two Bloom filter arrays, and masking logic. Wherein, the multi-stream manager is constructed as follows: inserting elements into one or more of the two Bloom filter arrays using a plurality of hash functions; updating the counter based on the insertion of the element; updating the Bloom filter by inserting one or more additional elements into one or more of the two Bloom filter arrays and updating the counter; and Data stored in the Bloom filter is masked using the one or more additional elements to pseudo-erase the data using the masking logic and reduce a false positive rate of the Bloom filter.
13. The solid state disk according to claim 12, wherein: The multi-flow manager is further configured to generate a third Bloom filter array by performing an OR operation between the two Bloom filter arrays and store the third Bloom filter array and a counter value of the counter in a history data structure, the third Bloom filter array corresponding to at least one of the two Bloom filter arrays.
14. The solid state disk according to claim 13, wherein: The multi-flow manager is further configured to periodically save the third Bloom filter array and the counter value in the history data structure.
15. The solid state disk according to claim 13, wherein: The multi-flow manager is further configured to save the third Bloom filter array and the counter value in the history data structure before switching an operation mode of the Bloom filter.
16. The solid state disk according to claim 13, wherein: The multi-flow manager is further configured to save the third Bloom filter array and the counter value in the history data structure when the bit numbers of the two Bloom filter arrays exceed a threshold.
17. The solid state disk according to claim 13, wherein: The counter value indicates a frequency of access to data stored in the solid state disk at addresses identified by a plurality of hash functions.
18. The solid state disk according to claim 17, wherein: The multi-stream manager is further configured to identify a stream among a plurality of streams established to access the solid state disk based on the frequency of access.
19. The solid state disk according to claim 18, wherein: The multi-stream manager is further configured as follows: testing the third Bloom filter array using a plurality of test functions to determine a frequency of accessing data corresponding to an access request to the solid state disk based on the counter value of the counter, the access request being received from a host computer; and Data stored in the solid state disk is accessed via the stream of the plurality of streams.
20. The solid state disk according to claim 12, wherein: The multi-flow manager independently manages the two Bloom filter arrays.
21. The solid state disk according to claim 13, wherein: The multi-flow manager is configured to reset the two Bloom filter arrays and the counter after saving the counter values of the third Bloom filter array and the counter in the history data structure.
Citation Information
Patent Citations
System and method for preventing replay attacks
US20050022009A1
Monitoring Values of Signals within an Integrated Circuit
US20090043993A1