IP Library Granted Patent US 10,013,177
Granted Patent B2
US 10,013,177 · App. 15/130,792 · Granted Jul 3, 2018

Low write amplification in solid state drive

Inventors: Chun Liu (San Jose, CA); Umesh Maheshwari (San Jose, CA)
Assignee: Hewlett Packard Enterprise Development LP
G06F3/061G06F3/0656G06F3/0679G06F3/0688
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,013,177
App. No.
15/130,792
Granted
Jul 3, 2018
Kind
B2
Abstract

Methods, systems, and computer programs are presented for storing data in a solid state drive (SSD). One method includes an operation for detecting a plurality of streams writing to the SSD, each stream writing in sectors, a page including a plurality of sectors and a block including a plurality of pages. A write operation includes writing at least one complete page, and an erase operation includes erasing at least one complete block. The method further includes operations for allocating a write buffer for each stream in RAM memory, and for storing each received sector of a stream in the corresponding write buffer. When a write buffer stores enough sectors to fill a page, content of the write buffer is written to a page in flash memory such that the page is filled. Further, the write buffer is freed after writing the content of the write buffer to the flash memory.

Claims (56)

1. A method for storing data in a solid state drive (SSD), the method comprising:

detecting a plurality of streams writing to the SSD, wherein each stream of the plurality of streams writes data to the SSD in sectors, wherein a page includes a plurality of sectors, wherein a block includes a plurality of pages and has a block size, wherein a write operation to the SSD includes writing at least one page, wherein an erase operation in the SSD includes erasing at least one block;

allocating a respective write buffer for each of the plurality of streams in a random access memory (RAM), wherein a tag is defined for each of the plurality of streams, and wherein the tag for a stream is equal to a logical block address of a sector within the stream divided by the block size;

storing, for each stream of the plurality of streams, each received sector of the stream in the allocated write buffer of the stream;

in response to a write buffer storing sufficient sectors to fill a page, writing content of the write buffer to fill a page in the SSD;

freeing the write buffer after writing the content of the write buffer to the SSD;

configuring a waiting buffer in the RAM, the waiting buffer including entries of received sectors that are not associated with any of the detected plurality of streams;

detecting two sectors in the waiting buffer having a same tag;

creating a new stream for the detected two sectors; and

moving the detected two sectors from the waiting buffer to the write buffer of the created new stream.

2. The method as recited in claim 1 , further including:

defining a buffer allocation table in the RAM, each entry in the buffer allocation table being associated with a respective write buffer, wherein each entry in the buffer allocation table includes the tag defined for a stream, a last offset in the write buffer, a buffer ID of the write buffer, an open block ID, and an address in the SSD.

3. The method as recited in claim 2 , wherein writing content of the write buffer to fill the page further includes:

finding a free page in the block identified by the open block ID; and

writing the page to the free page.

4. The method as recited in claim 1 , further including:

defining an open blocks table in the RAM to store information regarding blocks having free pages.

5. The method as recited in claim 4 , further including:

in response to a block mapped in the open blocks table being filled, taking the filled block off the open blocks table and creating a new entry in the open blocks table for a block with at least one empty page.

6. The method as recited in claim 1 , wherein each write buffer has a size equal to a size of a page of the SSD.

7. The method as recited in claim 1 , wherein the write unit is equal to a size of a page and an erase unit is equal to a size of a block.

8. A system comprising:

a memory storing a computer program having program instructions; and

a processor to execute the computer program to:

detect a plurality of streams writing to a solid state drive (SSD), wherein each stream of the plurality of streams writes data to the SSD in sectors, wherein a page includes a plurality of sectors, wherein a block includes a plurality of pages and has a block size, wherein a write operation to the SSD includes writing at least one page, wherein an erase operation in the SSD includes erasing at least one block; and

allocate a respective write buffer for each of the plurality of streams in a random access memory (RAM), wherein a tag is defined for each of the plurality of streams, and wherein the tag for a stream is equal to a logical block address of a sector within the stream divided by the block size;

store, for each stream of the plurality of streams, each received sector of the stream in the allocated write buffer of the stream; and

in response to a write buffer storing sufficient sectors to fill a page, write content of the write buffer to fill a page in the SSD;

free the write buffer after writing the content of the write buffer to the SSD;

configure a waiting buffer in the RAM, the waiting buffer including entries of received sectors that are not associated with any of the detected plurality of streams;

detect two sectors in the waiting buffer having a same tag;

creating a new stream for the detected two sectors; and

move the detected two sectors from the waiting buffer to the write buffer of the created new stream.

9. The system as recited in claim 8 , wherein the processor is to execute the computer program to define a buffer allocation table in the RAM memory, each entry in the buffer allocation table being associated with a respective write buffer, wherein each entry in the buffer allocation table includes the tag defined for a stream of the plurality of streams, a last offset in the write buffer, a buffer ID of the write buffer, an open block ID, and an address in the SSD.

10. The system as recited in claim 9 , wherein to write the content of the write buffer to fill the page, the processor is to execute the computer program to find a free page in the block identified by the open block ID, and write the page to the free page.

11. The system as recited in claim 9 , wherein the processor is to execute the computer program to define an open blocks table in the RAM to store information regarding blocks having free pages, and in response to a block mapped in the open blocks table being filled, take the filled block off the open blocks table and to create a new entry in the open blocks table for a block with at least one empty page.

12. The system as recited in claim 8 , wherein the processor is to execute the computer program to configure a waiting buffer in the RAM, the waiting buffer including entries of received sectors that are not associated with any of the detected plurality of streams.

13. A non-transitory computer-readable storage medium storing machine readable instructions that when executed by a processor cause a processor to:

detect a plurality of streams writing to a solid state drive (SSD), wherein each stream of the plurality of streams writes data to the SSD in sectors, wherein a page includes a plurality of sectors, wherein a block includes a plurality of pages and has a block size, wherein a write operation to the SSD includes writing at least one complete page, wherein an erase operation in the SSD includes erasing at least one complete block;

allocate a respective write buffer for each stream of the plurality of streams in a random access memory (RAM), wherein a tag is defined for each of the plurality of streams, and wherein the tag for a stream is equal to a logical block address of a sector within the stream divided by the block size;

store, for each stream of the plurality of streams, each received sector of the stream in the allocated write buffer of the stream;

in response to a write buffer storing sufficient sectors to fill a page, write content of the write buffer to a page in flash memory such that the page is filled;

free the write buffer after writing the content of the write buffer to the SSD;

configure a waiting buffer in the RAM, the waiting buffer including entries of received sectors that are not associated with any of the detected plurality of streams;

detect two sectors in the waiting buffer having a same tag;

create a new stream for the detected two sectors; and

move the detected two sectors from the waiting buffer to the write buffer of the created new stream.

14. The storage medium as recited in claim 13 , wherein the instructions are further to cause the processor to:

define a buffer allocation table in the RAM, each entry in the buffer allocation table being associated with a respective write buffer, wherein each entry in the buffer allocation table includes the tag defined for a stream of the plurality of streams, a last offset in the write buffer, a buffer ID of the write buffer, an open block ID, and an address in the SSD.

15. The storage medium as recited in claim 14 , wherein, to write the page, the instructions are further to cause the processor to:

find a free page in the block identified by the open block ID; and

write the page to the free page.

16. The storage medium as recited in claim 13 , wherein the instructions are further to cause the processor to:

define an open blocks table in the RAM to store information regarding blocks having free pages.

17. The storage medium as recited in claim 16 , wherein the instructions are further to cause the processor to:

in response to a block mapped in the open blocks table being filled, the processor is to take the filled block off the open blocks table and create a new entry in the open blocks table for a block with at least one empty page.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 14, 2017
From: NIMBLE STORAGE, INC.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 042810/0906 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 15, 2016
From: LIU, CHUN; MAHESHWARI, UMESH
To: NIMBLE STORAGE, INC.
Reel/Frame 038297/0506 →
Continuity (2)
Provisional Application 62149827 · Apr 20, 2015
Related Publication 20160306552A1 · Oct 20, 2016
Cited By (47)
US 12,197,390 US 12,204,413 US 12,204,768 US 12,204,788 US 12,212,624 US 12,216,903 US 12,229,402 US 12,229,437 US 12,235,743 US 12,236,117 US 12,242,425 US 12,253,922 US 12,253,941 US 12,271,264 US 12,271,359 US 12,277,106 US 12,282,799 US 12,293,111 US 12,314,131 US 12,314,163 US 12,314,170 US 12,314,183 US 12,340,107 US 12,341,848 US 12,366,972 US 12,373,289 US 12,373,340 US 12,379,854 US 12,393,340 US 12,393,353 US 12,399,817 US 12,430,053 US 12,430,059 US 12,439,544 US 12,475,041 US 12,481,442 US 12,487,920 US 12,511,239 US 12,524,309 US 12,547,317 US 12,561,093 US 12,572,421 US 12,619,469 US 12,682,949 US 12,687,973 US 12,699,512 US 12,717,709