Patent ID: 12229055

DETAILED DESCRIPTION

In some embodiments, a method is provided for a driver to receive a request to write data at a virtual location, write data at the next free physical location in sequence, and record a mapping between the virtual and physical locations. By always storing data on a next free block on the disk, this can be used to avoid a disk going through a read-modify-write cycle. This can improve throughput and write speed.

In this case, “next” may refer to the next in a sequence of blocks. The sequence may be determined based on the configuration of the particular persistent storage device. For example, “next” may be based, at least in part, on the block having the lowest expected seek time from the current block.

This method may be implemented via a driver. The driver may provide a functionality to write data, read data, and update data. In this way, the driver provides all the necessary functionality for a block device, such as a persistent storage device. In particular, the driver may be a userspace application which receives system calls from a kernel module and in turn writes data to the underlying persistent devices.

Writing

FIG.1shows an example approach for the driver handling a write request to a persistent storage device, such as a hard drive. This may be implemented in a driver running on a system.

At step101, a request is received to write data at a first location of the persistent storage device. The request may be received by a function call of the driver. The request may comprise the data or may comprise a pointer to where the data may be retrieved from (for example, a memory address).

The first location is a virtual location, since it may not correspond to a physical location on a persistent device. However, the first location is structured as if it were a physical location, since the redirection by the driver is hidden from a user of the driver. The request may therefore comprise an identifier of the first location, such as a block index and disk identifier. A subsequent request to read the data from the virtual location should therefore return the same data irrespective of the physical location of the data.

In some cases, the data may be part of a stream of data. A request to write data is therefore received (or treated as being received) for each block in the stream.

At step102, the data is written to a second location. The second location is a physical location which corresponds to a block on the persistent storage device. However, this may be different from any block indicated by the virtual location. The virtual location may not be correlated with the physical location.

In particular, the physical location may be a head of the persistent storage device, that is, the next free block of the persistent storage device or a sequence of next free blocks of the persistent storage device. This can be recorded at the persistent storage device by a head counter which records the index of the next free block of the persistent storage device. A free block is a block in which no data is stored, or if data is stored, there is no need for that data to be retrievable. In this way, the block is appended to the sequence of blocks which have already been written.

By writing to a next free block (which, by definition, is free), there is no need to determine whether the data at the indicated block has changed. This avoids the need to initially read from the block, and therefore can result in improved performance.

Moreover, because the physical location need not be correlated with the virtual location, there is no need for the requestor (such as a program) to determine where the next free block is to achieve this. The function of a location as a label to retrieve data is decoupled from the function of a location as a mechanism for managing a persistent storage device. These functions are performed by the virtual location and the physical location respectively.

At step103, a checksum for the data at the block indicated by the physical location is calculated. The checksum may be a cryptographic hash. This can be used to verify that data subsequently retrieved from the block is the same as the data stored at the block. In some cases, the checksum may comprise parity information which can correct some errors in the block.

At step104, metadata for the persistent storage device is updated.

The metadata comprises a mapping from the virtual location to the physical location. This links the virtual location (which the requestor or another process can use to indicate the intended data to be retrieved) to the physical location (where the actual data is stored). The metadata further comprises the checksum for each block.

The metadata may be stored on the persistent storage device. For example, this may be a predetermined part of the persistent storage device. Additionally or alternatively, the metadata is stored on a separate persistent storage device which may be optimized for use as a cache.

In some cases, updating metadata for the block comprises determining if metadata for the block indicated by the first location already exists. If it exists, the original metadata may be updated, and replacement metadata inserted (or the new metadata overwritten on the original metadata). This can prevent the metadata having multiple entries for the same data. The physical location corresponding to the previous location may be marked as dirty, indicating that it is free to be written over.

At step105, the head counter is updated to reflect the next free block.

This may comprise incrementing the head counter to the next block in the sequence of blocks of the persistent storage device (or wrapping around to the first block, once the final block has been reached). However, in some cases, certain blocks may be skipped (for example, if they correspond to faulty portions of the persistent storage device or if the persistent storage device is missing).

This may involve calculating a tail. The tail may correspond to the earliest block in the sequence of blocks before the head where there has been data written. The earliest block may not have the lowest index. If the incremented head counter is equal to the tail, this indicates that the nominal next free block indicated by the head counter is actually not free: it has data written to it. In this case, a notification, warning, or error may be raised and/or a garbage collection process may be performed. An example garbage collection process is shown with reference toFIG.8. Until the garbage collection process is completed, the driver may refuse to handle any more requests to write data.

Alternatively, the tail may be the location at which data could be written sequentially. In some cases, this may correspond to a garbage collected region.

In some cases, the tail may be recorded as a tail counter which is updated based on a garbage collection procedure.

This approach provides a high-performance approach to writing data to persistent storage devices, since the read-modify-write cycle of some conventional write approaches may be avoided. In addition, because data is written sequentially, this typically results in a faster write speed.

A further benefit is that the lifespan of persistent storage devices may be prolonged using the current approach. In conventional approaches, when a single block fails or reaches its maximum number of writes, the whole device is often replaced. For example, in the case of a hard disk, a single hot-spot (corresponding to one physical address) can cause a persistent storage device to reach the end of its life even if the bulk of the persistent storage device has never been written to. However, in the current approach, the head moves across the whole persistent storage device. Because data is always written to the head, this will naturally lead to equal levels of writing across the persistent storage device. That is, each block will generally be written to once before any block is written to a second time, irrespective of the virtual address of the data being written. This approach therefore may avoid premature wearing of persistent storage devices.

Example of Writing

FIG.2shows a worked example of how the approach shown inFIG.1can be used to write a stream of data to a persistent storage device. InFIG.2, the driver writes data to a single persistent storage device (such as a hard drive).

At200, the system is shown in its initial state. The head counter indicates location0as the next free block to be written to. The mapping is empty.

At201, the driver receives a request to write data a to virtual location6. Because the head counter indicates physical location0as the next free block, data a is written at physical location0, along with a checksum h(a). The mapping is updated to show a mapping from virtual location6to physical location0. The head counter is incremented to physical location1. The tail is computed to be at physical location0, which is different from the head counter.

At202, the driver receives a request to write data b to virtual location3. Because the head counter indicates physical location1as the next free block, data b is written at physical location1, along with a checksum h(b). The mapping is updated to show a mapping from virtual location3to physical location1. The head counter is incremented to physical location2. The tail is computed to be at physical location0, which is different from the head counter.

At203, the driver receives a request to write data c to virtual location2. Because the head counter indicates physical location2as the next free block, data c is written at physical location2, along with a checksum h(c). The mapping is updated to show a mapping from virtual location2to physical location2. The head counter is incremented to physical location3. The tail is computed to be at physical location0, which is different from the head counter.

At204, the driver receives a request to write data b′ to virtual location3. Because the head counter indicates physical location3as the next free block, data d is written at physical location3, along with a checksum h(b′). The mapping is updated to show a mapping from virtual location3to physical location3. This replaces the previous mapping from virtual location3to physical location1. Physical location1is therefore marked as dirty and can be freed in a garbage collection process. However, the data at physical location1remains at physical location1until this garbage collection process occurs.

The head counter is incremented to physical location4. The tail is computed to be at physical location0, which is different from the head counter. This example demonstrates the sequential nature of writing under the current approach. While the driver receives requests to write data at varied virtual locations, the driver actually writes in sequence. This avoids the need for the driver to read from the persistent storage device during write operations, and therefore may provide a higher performance for writing random data.

Writing to Arrays

A similar approach may be used to write data as a stripe across an array of persistent storage devices. In this way, a subset of the devices can be used for data and the remaining devices can be used for parity.

During configuration, the driver may be configured to have a particular resilience. That is, among an array of n persistent storage devices, data is stored in stripes across the data. Each stripe comprises n blocks, one of which is on each persistent storage device. Within each stripe, k of the blocks include data and m of the block are parity, such that n=k+m. Consequently, the data can be recovered if any k of the blocks within a stripe is available (whether the blocks are data or parity). This may be described as k+m parity. One common arrangement is 8+2 parity, where within a stripe there are 8 blocks of data and 2 blocks of parity, however any value for k and m may be used.

One approach for generating the parity data in such a scheme is to use erasure encoding. Erasure encoding is described in more detail below.

The blocks of each stripe are stored in the same indexed physical location on all of the persistent storage devices. For example, stripe0consists of the blocks at location0on every device. The driver can therefore maintain a single head counter that is common to all of the devices.

While a single head counter is described for simplicity, in practice each persistent storage device may maintain a separate head counter. This can allow for garbage collection to occur on one device while a write is occurring on another device.

It can be useful for subsequent stripes to use different drives for parity. One way to administer this is to nominate a starting drive for each stripe: stripe0starts at drive0, stripe1starts at drive1, and so on. This will naturally cause the parity blocks (which are written after the data blocks) to be on different drives.

FIG.3shows an example approach for handling a write request where data is to be stored in such stripes. This may be implemented in a driver running on a system.

At step301, a request to write k blocks of data is received. The request corresponds to a request received at step101.

At step302, after k data blocks have been received, the driver calculates parity data based on written data. This results in m blocks of parity data.

At step303, each of the k blocks of data and m blocks of parity data is written to corresponding persistent storage devices at the physical location indicated by the head counter. This results in the stripe being completed. In addition, k+m checksums are written to the metadata, each corresponding to a block.

At step304, the head counter is updated to reflect the physical location of the next free block at each device, in a similar manner to step105. Once a block has been written to each persistent storage device at the physical location indicated by the head counter, the head counter may be incremented to the next free location in the sequence.

This approach provides a high-performance approach to writing data to an array of persistent storage devices, since the read-modify-write cycle of some conventional write approaches may be avoided.

This also avoids the penalty that comes with higher parity in conventional approaches. Where data can be modified, the parity must be updated after every modification. Thus, if there are two parity blocks in a stripe, modifying a piece of data requires a read-modify-write cycle for the data itself, plus two further read-modify-write cycles for each parity block. This amplification places a performance limit on the level of parity that is practical within convention systems. In practice, parity is limited to 2 in conventional systems because of this.

In contrast, the approach shown inFIG.3does not involve any read-modify-write cycles. Increasing parity therefore increases the overhead at a much lower rate than conventional approaches. Accordingly, parity may be almost unlimited, and in practice 2, 4, or 12 parity may be used.

Similarly, the approach shown inFIG.3is not limited to any particular size of array, and there may be hundreds of persistent storage devices in the array. In practice, an array having around 10 persistent storage devices may be used.

Moreover, because the number of operations at each device is relatively low, even slower persistent storage devices may provide high levels of performance.

In some cases, one device in the array may fail or otherwise be unavailable. When this occurs, a block which may have intended to be written to that device may simply be written to the next device in the array. In this manner, a failed device does not substantially impede writing.

In such cases, the system may still be said to use k+m parity. However, for each stripe, there may end up being less than k data blocks (due to the failed device) written in a stripe to maintain n blocks of parity.

Example of Writing to Arrays

FIGS.4A and4Bshows an example process by which the approach shown inFIG.3can be used to write a stream of data to an array of persistent storage devices. InFIGS.4A and4B, the driver writes data to an array of five persistent devices. The driver is configured to use 3+2 parity (that is, 2 blocks of parity for every 3 blocks of data).

At400, the system is shown in its initial state. The head counter indicates location0as the next free block to be written to. The mapping is empty. Each of drives0,1,2,3, and4are empty.

At401, the driver receives a request to write data a to virtual location6. Because the head counter indicates physical location0as the next free block, data a is written at physical location0on drive0, along with a checksum h(a). The mapping is updated to show a mapping from virtual location6to physical location0on drive0. Because the stripe has not yet been completed, the head counter is not incremented.

At402, the driver receives a request to write data b to virtual location3. Because the head counter indicates physical location0as the next free block, data b is written at physical location0on drive1, along with a checksum h(b). The mapping is updated to show a mapping from virtual location3to physical location0on drive1. Because the stripe has not yet been completed, the head counter is not incremented.

At403, the driver receives a request to write data c to virtual location2. Because the head counter indicates physical location0as the next free block, data e is written at physical location0on drive2, along with a checksum h(c). The mapping is updated to show a mapping from virtual location2to physical location0on drive2. Because the stripe has not yet been completed, the head counter is not incremented.

Now that 3 data blocks have been written, the stripe is completed by adding parity blocks to the2remaining devices. The parity data is computed based on the data that has been written to the devices. This may be read from the devices, or it may be stored in memory. This results in parity data d and parity data e.

At404, because the head counter indicates physical location0as the next free block, parity data d is written at physical location0on drive3, along with a checksum h(d), and parity data e is written at physical location0on drive4, along with a checksum h(e). In addition, now that the stripe has been completed, the head counter is incremented to the next free location in the sequence, and is now 1.

In this way, a stripe may be written without the need for the driver to read from the persistent storage device during write operations, and therefore may provide a higher performance for writing random data with any level of parity.

Reading

FIG.5shows an example approach for handling a read request. This may be implemented in the same manner as the approach ofFIG.1.

At step501, a request is received to read data from a virtual location. The request may be received in the same manner as the request at step101. For example, this may be received by a function call of the driver. The request may comprise a pointer to where the data should be stored once retrieved (for example, a memory address).

At step502, a physical location for the data corresponding to the first location is obtained from the metadata. This may be obtained by finding the virtual location in the mapping of the metadata and finding the corresponding physical location which was previously stored at step104.

If the metadata does not contain references to the virtual location, the read request may fail, and an error may be raised.

At step503, the data is retrieved by reading from the physical location at the appropriate permanent storage device. The data may then be stored in a memory location indicated in the request or another location.

At step504, the retrieved data is validated to ensure that the retrieved data is the data which was originally stored. This may involve calculating a checksum for the retrieved data and comparing it to the checksum stored with the data. If the checksums match, it is highly likely the data was successfully retrieved.

If the checksums do not match, but the data can be recovered, this may be performed. This may make use of parity information stored in the same stripe as the data. If the errors cannot be corrected, a notification, warning, or error may be raised.

The retrieved data can then be returned to the process which issued the read request. This may comprise providing a success value (such as 0) as a return value to a function call.

In some cases, step504may be omitted. For example, on reads where it is desirable to maximize throughput, step504may be selectively skipped.

From the point of view of the other requestor, the data was stored at, and retrieved from, the virtual location. The management and configuration of the persistent storage device is therefore obscured from the process which attempts to read the data.

Block Reconstruction

Occasionally, it may not be possible to retrieve data at a particular physical location, or that physical location may be overly slow. This may occur if step503is unsuccessful due to the hardware failure of a block or device, or step504is unsuccessful due to retrieved, but unverified, data. When this occurs, a block reconstruction process may be undertaken.

FIG.6shows an example approach for handling block reconstruction of a missing block. In this example, the data is stored at an array of persistent storage devices which are configured to use k+m parity.

At step601, the driver reads data from at least k blocks in the same stripe as the missing block. Since each block in the stripe is from a different persistent storage device, it is highly unlikely in practice that multiple blocks within a stripe will become unavailable at the same time.

At step602, the driver uses the available data to reconstruct the data from the missing block. This is possible since, for k+m parity, any k blocks of a stripe can be used to reconstruct all the blocks within that stripe if the blocks in a stripe have been encoded using erasure encoding to produce the parity, any missing blocks can be derived by erasure decoding, as described below.

At step603, the reconstructed data is written at the head (that is, the next free block, as indicated by the head counter). This may be implemented in the same manner at steps102and103.

At step604, the metadata is updated such that the virtual location corresponding to the missing block is now mapped to the block at which the reconstructed data was written. The missing block can then be marked as dirty (if there is no hardware issue) or be recorded as unusable (if there is a hardware issue).

In this manner, the data can be recovered immediately after a single failed read. The block reconstruction process occurs quickly since only the failed block needs to be rewritten. This allows minimal speed loss: while there may be a slight delay in reconstructing the data after the first read, any subsequent reads will revert to the original speed even if the hardware issue has not been resolved.

When block reconstruction is required due to a failed persistent storage device, all blocks may be reconstructed and rewritten to non-failed devices. Once this process occurs, the speed of the array recovers from a degraded condition without the need to re-write any data of the other non-failed persistent storage devices.

Duplication

In some cases, it may be desirable to have a single virtual address corresponding to multiple physical addresses. The same data is duplicated at each physical address.

In this manner, a read request may read from any of the physical addresses corresponding to the virtual address. If the block at one of the physical addresses fails, the read request may resolve from any of the other physical addresses. The failed block may be reconstructed using a block reconstruction technique noted above. This can avoid the delay of reconstruction while still providing that reconstruction can occur.

Alternatively, in some cases duplicates may be stored at one or more immediately following physical addresses. If a first physical address is unavailable, the data can be retrieved from the next physical address where the data is duplicated.

Thus, from the point of view of a user, the array may appear to never be slow, even if there is a failure of a persistent storage device within the array.

Update

FIG.7shows an example approach for handling an update request. This may be implemented in the same manner as the approach ofFIG.1.

At step701, a request is received to update the data from a virtual location. The request may be received in the same manner as the request at step101. For example, this may be received by a function call of the driver.

At step702, references to the virtual location are removed from the metadata and the corresponding physical location is marked as dirty. This indicates that the physical location is free for future use.

Once the metadata is updated, there is no need for further persistent storage device operations. If the virtual location is not in the metadata, then the corresponding data at the physical location could not be retrieved. The physical location will eventually be reused after a garbage collection process has occurred.

Dirty Blocks

Updating data has been described in terms of selected blocks being marked as dirty. This may be implemented by each stripe maintaining a counter of the number of unused blocks in the stripe. When a block is marked dirty or is inaccessible (for example, due to a corresponding device failing), the number of gaps for the stripe may be incremented. When each data block is rewritten to the head (for example, during garbage collection), the number of gaps for the stripe may also be incremented.

Garbage Collection

When data indicated by a virtual location is updated, the corresponding physical location may be marked dirty indicating that the physical location can be reused. Thus, although data may initially be written sequentially on a persistent storage device, over time gaps in the sequence of data may appear.

One way to mitigate this is to periodically perform garbage collection. This aims to move data from the tail (that is, the earliest non-dirty block in the sequence of written blocks) to the head, until there are no gaps in the sequence.

Garbage collection may be performed in response to one or more garbage collection conditions being met.

A first garbage collection condition may be that a number of gaps on the persistent storage device exceeds a predetermined threshold. For example, where the number of gaps exceeds 1% of the capacity of the persistent storage device, the garbage collection condition may be met.

A second garbage collection condition may be that an activity level of a persistent storage device falls below a threshold. For example, if the persistent storage device has not been used for several minutes, a garbage collection process may commence.

A third garbage collection condition may be that a free capacity of the persistent storage device falls below a threshold. For example, when the head counter gets near to the tail, it may be useful to try to recover some usable space.

A fourth garbage collection condition may be that a certain time period has passed. That is, it may be useful for a garbage collection process to commence periodically.

Additionally or alternatively, garbage collection may occur any time the driver is not processing a request and there exists one or more dirty blocks.

FIG.8shows an example garbage collection process.

At step801, the tail is calculated. The tail is the non-dirty block (that is, the block which is storing data) that is earliest in the sequence of written blocks. In other words, this is the oldest written non-dirty block.

At step802, the data stored at the tail is written to the block indicated by the head counter.

At step803, the metadata for the persistent storage device is updated. A new entry mapping the virtual address for the newly written block to the head counter replaces the previous entry for that block.

At step804, the head counter is updated to reflect the next free block in the same manner as at step105.

This process is repeated until one of the garbage collection conditions is no longer met or until there are no dirty blocks left. By iteratively moving blocks from the tail to the head, eventually there will be no remaining gaps.

Moreover, this process can be stopped at any time. Once step804terminates, the driver is ready to process further requests (including writing new blocks). In this way, garbage collection can be started and stopped without causing significant downtime.

In this manner, overall storage capacity can be recovered when data is updated without limiting the performance of other requests.

Example of Garbage Collection

FIG.9shows a worked example approach for performing garbage collection. This may be performed by the same driver as that which performs the method ofFIG.1, for example.

InFIG.9, the driver is configured to use 2+1 parity (that is, 1 block of parity for each 2 blocks of data). In practice, the same approach may be applied to any level of parity. The head counter and mapping are omitted fromFIG.9.

At900, the system is shown with data that has previously been written. Drive0has blocks marked dirty at physical locations0and2. Drive1has a block marked dirty at physical location1. Drive2has a block marked dirty at physical location1. Blocks at locations6and7in all drives are empty. All other blocks in all drives have non-dirty data. The head counter is at physical location6, since that represents the next free block. The tail is at0, since the block at location0on drive1is the oldest non-parity non-dirty block.

At901, the data in all non-dirty, non-parity blocks at the tail (location0) has been moved to the head. The data at location0on drive0(a) is not moved, as it has been marked dirty. The data at location0on drive2(ab) is not moved, as it is parity data. Only the data at location0on drive1(b) is moved to the head. This has been moved to location6on drive0. Location6is derived from the head counter (which indicates location6as the next free block). Drive0is derived by cycling through the starting drive of each stripe since the stripe at location5started with drive2, the stripe at location6starts with drive0.

After the move, the mapping is updated so that the virtual location which previously mapped to location0on drive1now maps to location6on drive0. Location0on drive1is marked as dirty, since the data is no longer needed, and the block can be reused. The head counter remains at6. The tail moves to 2, since the next oldest non-dirty, non-parity data is at location2on drive2. All of location1is dirty or parity on all drives (or in other words, the number of gaps in stripe1is 2).

At902, the data in all non-dirty, non-parity blocks at the tail (location2) has been moved to the head. The data at location1on drive1(c), location1on drive2(d), and location2on drive0(f) is not moved, as it has been marked dirty. The data at location1on drive0(cd) and location2on drive1(ef) is not moved, as it is parity data. Only the data at location2on drive2(e) is moved to the head. This has been moved to location6on drive1. Location6is derived from the head counter (which indicates location6as the next free block). Drive1is derived from the previous written block in the stripe: since drive0was previously written to, drive1is the next drive in the sequence.

After the move, the mapping is updated so that the virtual location which previously mapped to location2on drive2now maps to location6on drive1. Location2on drive2is marked as dirty, since the data is no longer needed, and the block can be reused.

Since the data in stripe6is now completed, parity data (be) is calculated and written to the remaining block in stripe6(that is, at location6on drive2). The head counter moves to 7, since the next free block is in location7. The tail moves to 3, since the next oldest non-dirty, non-parity data is at location3on drives0and1.

Following this garbage collection process, all of locations0,1, and2on all drives is now free for use. Once stripe7is completed, the head counter will loop to stripe0. Garbage collection therefore allows a persistent storage device or array of persistent storage devices to be more fully utilized.

Erasure Coding

As noted above, erasure coding is an approach in which a piece of data is encoded to form n data fragments. The original data is recoverable from any k data fragments (k≤n). Each data fragment is a w-bit word, where w can be any positive integer. For example, 1-bit and 8-bit are common. Generally, the higher the values for n and w, the more computationally intensive the erasure encoding and decoding process is.

First, the original data is segmented into w×k-bit data segments.

Second, k data fragments d1. . . dkare formed by separating each data segment into k w-bit sized data words. These are data words.

Third, m=n−k data fragments c1. . . cmare formed based on linear combinations of the data words with coefficients, such that.
ci=ai,0d0+ . . . +ai,kdk
where the arithmetic is defined over the Galois field GF(2w). These are coding words.

The data fragments can be stored in a stripe over an array of persistent storage devices, such that the data fragments are distributed over the persistent storage devices. In some cases, different persistent storage devices can hold different numbers of data fragments. Optionally, a checksum based on the data segment is also stored. Once all data segments are stored, a further checksum based on the original data can also be stored.

There are multiple ways to select the coefficients. One approach is to use a Cauchy Reed-Solomon code. This occurs by selecting n numbers in GF(2w) and partitioning them into two distinct sets X={x1, . . . , xm} and Y={y1, . . . , yk}, with X∩Y=Ø such that:

ai,j=1xi+yj
where the arithmetic is defined over the Galois field GF(2w).

Once the data is stored, any k of the data fragments can be used to retrieve the data. For example, if the data words d1. . . dkwere obtained, these can be combined using the inverse of how they were segmented. If a coding word ciis used, a system of equations based on the equation noted above can be solved to obtain the missing data fragment.

In some situations, erasure encoding can be performed efficiently using one or more GPUs while the request itself is handled by one or more CPUs. This can result in improved overall performance.

Erasure encoding provides an approach which allows for high resilience and flexibility. The data fragments can be stored across multiple independent systems. If m or fewer fragments are lost, the corresponding data segment can be recovered, and thus the original data can be calculated. In addition, any k data fragments can be used to recover the original data, which allows any of the storing systems to respond.

System

FIG.10shows a block diagram of an example computer system1000.

The system1000comprises a CPU (central processing unit)1010, a main memory1020, one or more peripherals1030, and a GPU (graphics processing unit)1050. The CPU1010, main memory1020, peripherals1030, and GPU1050are connected by a bus1040. In the case of a PCIe (PCI Express) topology, the bus1040includes a root complex, and each of the peripherals1030and the GPU1050are PCIe endpoints. The GPU1050can communicate with the peripherals1030directly via the bus1040. In some cases, more than one CPU1010and/or more than one GPU1050is provided.

The peripherals1030may include persistent storage devices (such as hard disk drives, solid state drives, or the like), storage controllers (such as RAID controllers), network controllers (such as network interface cards), switches (such as PCIe switches configured to connect further peripherals), or any of a variety of devices.

The peripherals1030and the GPU1050may have access to the main memory1020via the bus1040. Through DMA (direct memory access), this can allow the peripheral1030or the GPU1050to read data to and write data from the main memory. This may involve copying the data from main memory1020to a memory local to the peripheral1030or the GPU1050.

In some cases, the memory space for the CPU1010and the GPU1050can be shared via unified virtual memory. This allows for a pointer to a single memory address to be passed between the CPU and the GPU without the need to copy data between a main memory1020and a local memory.

Computer system1000may be used to implement the methods noted above. For example, CPU1010or GPU1050may run a program which operates as a driver to one or more of the storage device peripherals1030.

The storage device peripherals1030may be of different types. A relatively fast storage device peripheral1030may be used to store metadata (such as a mapping between virtual and physical locations) and an array of relatively slow storage device peripherals1030may be used to store the underlying data. In some cases, some of the storage device peripherals1030used to store the underlying data can be of mixed types, including one or more hard disk drives, solid state drives, RAM devices, or non-volatile RAM devices.

Interpretation

A number of methods have been described above. It will be appreciated that any of these methods may be embodied by a series of instructions, which may form a computer program. These instructions, or this computer program, may be stored on a computer readable medium, which may be non-transitory. When executed, these instructions or this program may cause a processor, such as a CPU or GPU, to perform the described methods.

Where an approach has been described as being implemented by a processor, this may comprise a plurality of processors. That is, at least in the case of processors, the singular should be interpreted as including the plural. Where methods comprise multiple steps, different steps or different parts of a step may be performed by different processors. In some cases, one step may be performed by a first type of processor (for example, processing of large sets of data may be performed by a GPU) and another step may be performed by a second type of processor (such as metadata lookup being performed by a CPU).

The order of steps within methods may be altered, such that steps are performed out of order or in parallel, except where one step is dependent on another having been performed, or the context otherwise requires.

The term “comprises” and other grammatical forms is intended to have an inclusive meaning unless otherwise noted. That is, they should be taken to mean an inclusion of the listed components, and possibly of other non-specified components or elements.

While the present invention has been explained by the description of certain embodiments and with reference to the drawings, the invention is not intended to be restricted to such details. Additional advantages and modifications will readily appear to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details, representative apparatuses and methods, and illustrative examples shown and described. Accordingly, departures may be made from such details without departure from the spirit or scope of the general inventive concept.