System, method and storage medium for pre-fetching data

By dynamically adjusting the prefetch load and thread count, based on the utilization rate and conflict measurement of the prefetch cache, the resource conflict problem when prefetching data in the storage system is solved, and system performance and efficiency are improved.

CN116662219BActive Publication Date: 2024-11-15HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210408168.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-02-18
Filing Date
2022-04-19
Publication Date
2024-11-15
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

Under high I/O load conditions, resource conflicts are prone to occur when prefetching data in the storage system, resulting in system performance degradation and it is difficult to dynamically adjust the prefetch strategy to deal with load changes.

Method used

By dynamically adjusting the prefetch load, the dynamic prefetch engine adjusts the number of prefetch threads and resource usage based on the past utilization and access conflict metrics of the prefetch cache to optimize the cached prefetch data.

Benefits of technology

It effectively reduces resource conflicts, improves system performance, avoids resource waste related to prefetch data, and adapts to changes in I/O load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662219B_ABST
    Figure CN116662219B_ABST
Patent Text Reader

Abstract

The present disclosure relates to dynamically prefetching data from a storage device. In some examples, a system dynamically adjusts a prefetch load of a prefetch cache based on a measure of past utilization of the prefetch cache, wherein the prefetch load is used to prefetch data from the storage device into the prefetch cache.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to dynamically prefetching data from a storage device. Background Art

[0002] The system may include different types of storage devices. The first type of storage device is a persistent storage device for storing relatively large amounts of data. The persistent storage device may be implemented using storage devices such as disk-based storage devices, solid-state drives, and the like. Another type of storage device that may be included in the system is a smaller but faster storage device that may be used to cache portions of the data stored in the persistent storage device. The faster, smaller storage devices described above may be implemented using memory devices such as dynamic random access memory (DRAM) devices, static random access memory (SRAM) devices, flash memory devices, and the like. Summary of the invention

[0003] According to some embodiments of the present disclosure, a non-transitory machine-readable storage medium is provided, comprising instructions that, when executed, cause a system to perform the following operations: dynamically adjust a prefetch load of a prefetch cache based on a measure of past utilization of the prefetch cache and based on a measure of conflicts when accessing prefetched data in the prefetch cache, wherein the prefetch load is used to prefetch data from a storage device into the prefetch cache, and wherein the measure of conflicts when accessing the prefetched data in the prefetch cache is based on a number of events in which one or more entities cannot obtain a lock to access the prefetch cache.

[0004] According to some embodiments of the present disclosure, a system for prefetching data is provided, comprising a cache for storing data prefetched from a storage device; and a prefetch controller for: dynamically adjusting a prefetch load of the cache based on a measure of resource conflicts when accessing the cache, wherein the prefetch load is used to prefetch data from the storage device into the cache, and wherein the measure of resource conflicts when accessing the cache is based on a number of events in which one or more entities cannot obtain a lock to access the cache.

[0005] According to some embodiments of the present disclosure, a method is provided for execution in a system including a hardware processor, comprising: receiving a measure of past utilization of a cache, the cache storing data prefetched by a prefetcher from a storage device; receiving a measure of resource conflicts when accessing the prefetched data in the cache, the measure of resource conflicts being based on the number of events in which one or more entities are unable to access the cache due to the prefetcher accessing the cache; and dynamically adjusting a prefetch load of the cache based on the measure of past utilization and the measure of resource conflicts, wherein the prefetch load is used to prefetch data from the storage device into the cache. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Some embodiments of the present disclosure are described with reference to the following drawings.

[0007] Figure 1 is a block diagram of an arrangement including a storage system with a dynamic prefetch engine, according to some examples.

[0008] Figure 2 is a flow diagram of a process of a dynamic prefetch engine according to some examples.

[0009] Figure 3 is a block diagram of an arrangement in which a dynamic prefetch engine may control the number of prefetch threads according to some examples.

[0010] Figure 4 is a block diagram of a storage medium storing machine-readable instructions according to some examples.

[0011] Figure 5 is a block diagram of a system according to some examples.

[0012] Figure 6 is a flow diagram of a process according to some examples.

[0013] In all drawings, the same reference numerals denote similar but not necessarily identical elements. These figures are not necessarily drawn to scale, and the sizes of some components may be exaggerated to more clearly illustrate the examples shown. In addition, the drawings provide examples and / or embodiments consistent with the description. However, the description is not limited to the examples and / or embodiments provided in the drawings. DETAILED DESCRIPTION

[0014] In the present disclosure, the use of the terms "a", "an" or "the" is also intended to include the plural forms, unless the context clearly indicates otherwise. In addition, when used in the present disclosure, the terms "includes, including", "comprises, comprising", "have, having" specify the presence of stated elements, but do not exclude the presence or addition of other elements.

[0015] Data may be pre-fetched from a storage device (implemented using one or more storage devices that may include a mix of different types of storage devices) into a cache to improve access speed for subsequently received requests that may be satisfied by retrieving data from the cache. In some examples, the storage device may be implemented using one or more slower storage devices (e.g., one or more disk-based storage devices, one or more solid-state drives, etc.), while the cache may be implemented using one or more faster memory devices (e.g., one or more DRAM devices, one or more SRAM devices, one or more flash memory devices, etc.).

[0016] More generally, a "cache" may refer to any type of storage device that can be used to store a copy of data that is present in another storage device. In other examples, a "cache" may store data that is not present in another storage device. A "prefetch cache" may refer to a cache that is used to store prefetched data (e.g., data prefetched from another storage device). It should be noted that a cache can be used for a variety of different purposes, including storing prefetched data as well as storing other forms of cached data.

[0017] Prefetching data from a storage device may refer to retrieving data from a storage device that is not currently the subject of any access request from a requestor. An access request may refer to a read request or a write request. A "requestor" may refer to any entity that is capable of requesting read or write access to data. For example, a requestor may include a program or a machine. As another example, a requestor may be a user.

[0018] Prefetching data is based on a determination that the prefetched data is likely to be the subject of a subsequent request in the relatively near future, given an actual pattern of accessing data from a storage device. Prefetching data from a storage device into a cache allows the prefetched data in the cache to be used to satisfy subsequent access requests received from a requestor. To satisfy the access request, the data is accessed in the cache. If the requested data is not present in the cache when an access request for the data is received, the requested data is retrieved from the storage device into the cache and then accessed in the cache. If the requested data is in the prefetched data already present in the cache when the access request is received, the requested data can be accessed more quickly than if the same data were first retrieved from the storage device and then accessed in the cache in response to the access request. Caches also typically have faster access speeds than storage devices.

[0019] In some examples, access to data may be sequential in nature. For example, a series of access requests from a requester (or from multiple requesters) may be requests for contiguous portions of data in a storage device. Contiguous portions of data in a storage device may refer to portions having consecutive physical or logical addresses, or block numbers, or page numbers, or any other identifier representing the order of portions of data received or stored by the system. In response to a first access request, a prefetch process may prefetch an additional portion of data (which is a portion of the contiguous portion of data) into a cache, with the expectation that subsequently received requests may be for the prefetched data.

[0020] However, prefetching data is associated with the use of resources, including storage resources (for storing the prefetched data), processing resources (for implementing the logic for deciding which data to prefetch), and communication resources (for transferring the prefetched data from the storage device to the cache). If the prefetched data is not used before it is evicted (e.g., to provide storage space for other input / output (I / O) operations), the use of resources associated with prefetching data into the cache will be wasted. If the I / O load of the system is relatively high and the cache is full or almost full, the likelihood of evicting the prefetched data from the cache is higher.

[0021] In addition, resource conflicts may occur between a prefetch process and another process that may share a cache. For example, a prefetch process may prefetch data into a portion of a cache that may also be the subject of access from another process. In some examples, the cache may be arranged as pages of data, where each "page" of data has a specified size (the specified size may be fixed or adjustable).

[0022] Resource conflicts may be in the form of lock conflicts. For example, in order to access a given page of the cache, a requesting entity (e.g., a prefetch process) may have to acquire a lock, which may prevent another entity (e.g., the requester) from accessing the given page because the other entity will not be able to acquire a lock on the given page.

[0023] If resource conflicts associated with cache accesses occur at a high rate, this may cause system performance to degrade because the prefetch process may prevent other requesters from completing their input / output (I / O) operations quickly or the I / O operations of other requesters may delay the completion of the prefetch operation.

[0024] Resource conflicts can reduce the benefits associated with prefetching data into the cache, particularly if the storage is implemented using one or more storage devices with relatively fast access speeds. In such an example, if the I / O load on the system is relatively high and the likelihood of resource conflicts when accessing the cache is relatively high, the overall system performance can be improved by avoiding prefetching of data. If the storage is implemented using one or more faster storage devices, the penalty associated with retrieving data from the storage (rather than the cache) is reduced.

[0025] Because the I / O load on a system can change rapidly over time, it can be difficult to determine when to turn prefetching on or off.

[0026] According to some embodiments of the present disclosure, the prefetch load is dynamically adjusted based on one or more metrics, the one or more metrics including a metric of past utilization of the prefetch cache and / or a metric of access conflicts when accessing the prefetch cache. "Prefetch load" generally refers to the number of prefetch operations occurring or planned in the system.

[0027] Figure 1 1 is a block diagram of an example arrangement of a storage system 102 having a front end 104 and storage devices 106, which may be considered part of the back end of the storage system 102. The “front end” of the storage system 102 refers to the collection of components of the storage system 102 that interact with requesters 108 over a network and perform operations in response to requests from the requesters 108 to manage access to data in the storage devices 106.

[0028] The "back end" of the storage system 102 refers to the storage infrastructure where data is stored. The storage 106 includes a collection 118 of storage devices (one storage device or multiple storage devices).

[0029] In accordance with Figure 1 In the example of FIG. 1 , the front end 104 includes a storage controller 110 that manages access to the storage device 106 in response to requests from the requester. The storage controller 110 may receive a request, such as a write request or a read request, from the requester 108. In response to the request, the storage controller 110 may issue a command to the storage device 106 via a communication link 116 to perform writing or reading of data.

[0030] According to some embodiments of the present disclosure, the front end 104 also includes a dynamic prefetch engine 112. The dynamic prefetch engine 112 is capable of dynamically adjusting the prefetch load of the storage system 102 based on specified criteria (discussed further below).

[0031] As used herein, an "engine" may refer to a hardware processing circuit, which may include any or some combination of a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or other hardware processing circuits. Alternatively, an "engine" may refer to a combination of a hardware processing circuit and machine-readable instructions (software and / or firmware) that may be executed on the hardware processing circuit.

[0032] The front end 104 also includes a cache 114 that can be used to store data (e.g., a copy of the data stored in the storage device 106 or other data). In some examples, the dynamic prefetch engine 112 can prefetch data from the storage device 106 into the cache 114. The cache 114 can thus store the prefetched data as well as other data. The cache 114 can be implemented using a collection of memory devices (one memory device or multiple memory devices).

[0033] In some examples, there may be multiple I / O operations initiated by requestor 108 and / or other entities that may be involved in storing corresponding data in cache 114. The multiple I / O operations may include a sequential stream of reading data from storage device 106, randomly reading data from storage device 106, writing data to storage device 106, etc. A "sequential stream" of data may refer to a series of data portions stored in consecutive physical storage locations in storage device 106. A "random read" of data may refer to a read operation that is able to access data from any given storage location (specified by a storage address) in storage device 106.

[0034] Multiple I / O operations may compete with the dynamic prefetch engine 112 for access to the cache 114 (a shared resource), which may cause resource contention at the cache 114, especially if the I / O load in the storage system 102 is relatively heavy.

[0035] As described above, resource conflicts may occur due to lock conflicts when an entity attempts to acquire a lock to write to a page in cache 114. When one entity (e.g., dynamic prefetch engine 112) holds a lock on a page in cache 114 to perform a prefetch operation, another entity will not be able to access the same page, which may delay the I / O operation of the other entity.

[0036] As another example, after data has been prefetched into cache 114 by dynamic prefetch engine 112, subsequent I / O operations may cause some or all of the prefetched data to be evicted from cache 114, such as when cache 114 is full. As a result, the prefetched data in cache 114 may be evicted before the prefetched data is read, which may result in wasted resource usage associated with prefetching of data.

[0037] To address the aforementioned issues, the dynamic prefetch engine 112 can dynamically adjust the prefetch load based on one or more metrics including a metric 120 of past utilization of the prefetch cache and / or a metric 122 of access conflicts when accessing the prefetch cache 114 .

[0038] Metrics 120 and 122 may be stored in a memory 124 of storage system 102. Memory 124 may be implemented using a collection of memory devices (one memory device or multiple memory devices). In other examples, metrics 120 and 122 may be stored in cache 114 or in another storage location.

[0039] In some examples, storage system 102 includes a monitoring engine 126 that can monitor accesses of cache 114 to obtain metrics 120 and 122 .

[0040] The metric 120 of past utilization of the prefetch cache refers to how efficiently the prefetch cache has been used historically, for example, over a given time interval (e.g., the past hour, the past 24 hours, the past week, etc.). In some examples, the metric 120 of past utilization of the prefetch cache may include prefetch cache utilization (P). Note that "prefetch cache" may refer to any cache or portion of a cache used by the dynamic prefetch engine 112 to store prefetch data. In some examples, P may be expressed as a percentage, such as the percentage of reads of data stored in the prefetch cache that result in a prefetch cache hit. A "prefetch cache hit" occurs when a read from the prefetch cache is satisfied. P may be expressed as the percentage of all accesses to the prefetch cache (over a given time interval) that result in a cache hit. The monitoring engine 126 may obtain the prefetch cache utilization (P) based on monitoring accesses to the prefetch cache over a given time interval and which of those accesses result in a cache hit.

[0041] In other examples, the metric 120 of past utilization of the prefetch cache may be expressed using other parameters, such as a count of cache hits per unit time, or the like.

[0042] A metric 122 of resource conflicts when accessing the prefetch cache 114 provides an indication of the level of conflicts caused by accesses to the cache 114 by different entities. For example, the metric 122 can be based on the number of events in which one or more entities cannot access the cache 114 (e.g., an entity cannot obtain a lock to access a page of the cache 114 because the lock is held by another entity, such as the dynamic prefetch engine 112). The metric 122 is also referred to as a resource conflict metric (C). For example, the metric 122 can be based on the number of events in which read conflicts (e.g., due to an inability to obtain a lock) occur when accessing a page in the cache 114 that contains prefetch data. As another example, the metric 122 can be based on the ratio between the number of accesses to the prefetch data in the cache 114 that caused conflicts and the total number of accesses to the prefetch data in the cache 114.

[0043] The monitoring engine 126 may obtain the metric 122 (or C) based on observations of accesses to prefetched data in the cache 114 that resulted in, for example, lock conflicts.

[0044] Figure 2 is a flow diagram of a process performed by the dynamic prefetch engine 112 according to some examples. Figure 2 The tasks are depicted in the order specified, but note that in other examples, the tasks may be performed in a different order, and some tasks may be omitted and other tasks added.

[0045] The dynamic prefetch engine 112 receives (at 202) a prefetch cache utilization metric (P), and receives (at 204) a resource conflict metric (C), which is a metric of resource conflicts when accessing prefetch data in the cache. For example, the dynamic prefetch engine 112 can receive P and C by retrieving the metrics from the memory 124.

[0046] The dynamic prefetch engine 112 then decides whether to perform an adjustment of the prefetch load based on the prefetch cache utilization metric (P) and the resource conflict metric (C). The adjustment of the prefetch load may include increasing the prefetch load or decreasing the prefetch load.

[0047] To determine whether to increase or decrease the prefetch load, the dynamic prefetch engine 112 compares the values of P and C with the amplification thresholds (TP-up and TC-up) and the reduction thresholds (TP-down and TC-down). The values of P and C are compared with the amplification thresholds (TP-up and TC-up) to determine whether the prefetch load should be increased, and the values of P and C are compared with the reduction thresholds (TP-down and TC-down) to determine whether the prefetch load should be decreased. In some examples, the values of TP-down and TP-up can be different, and the values of TC-down and TC-up can be different. In other examples, the values of TP-down and TP-up can be the same, and / or, the values of TC-down and TC-up can be the same.

[0048] Specifically, the dynamic prefetch engine 112 determines (at 206) whether P < TP-down or C > TC-down. P being less than TP-down indicates that the prefetch cache utilization is low enough, so the prefetch load should be decreased. C being greater than TC-down indicates that the resource conflicts associated with accessing the prefetch data are high enough, so the prefetch load should be decreased.

[0049] In response to determining that P < TP-down or C > TC-down, the dynamic prefetch engine 112 decreases (at 208) the prefetch load. In another example, in response to determining both P < TP-down and C > TC-down, the prefetch load is decreased.

[0050] Assuming that the conditions checked at 206 are not true, the dynamic prefetch engine 112 determines (at 210) whether P > TP-up and C < TC-up. P being greater than TP-up indicates high prefetch cache utilization, and C being less than TC-up indicates low resource conflicts associated with accessing the prefetch data. If both conditions checked at 210 are true, then the dynamic prefetch engine 112 increases (at 212) the prefetch load.

[0051] If the condition P > TP-up and C < TC-up does not hold, then the dynamic prefetch engine 112 does not change the prefetch load and returns to task 202.

[0052] As Figure 3 shown, in some examples, the prefetch load can refer to the number of prefetch threads 304-1, 304-2, ……, 304-N (N≥1) that actively prefetch data from the storage device 106 into the cache 114, which is also referred to as the "prefetch cache" because the cache 114 stores prefetch data (as well as other types of data).

[0053] The dynamic prefetch engine 112 may initiate a prefetch thread for each I / O operation that the dynamic prefetch engine 112 has determined will benefit from the prefetch of data. An example of such an I / O operation is an I / O operation to sequentially retrieve a data portion from the storage device 106. Different I / O operations may be initiated by different requesters 108 or other entities. The I / O operation may cause data to be retrieved from the storage device 106 in the form of an I / O traffic flow.

[0054] A "prefetch thread" may refer to a corresponding prefetch operation initiated by the dynamic prefetch engine 112 for a corresponding I / O operation initiated by an entity such as the requester 108. The dynamic prefetch engine 112 may perform separate prefetch operations (in the form of prefetch threads) in response to different I / O operations.

[0055] Figure 3 Illustrated are N prefetch threads 304-1, 304-2, ……, 304-N that actively prefetch data into the prefetch cache. In some examples, there may be a maximum number of prefetch threads that may be active at any given time; in other words, the dynamic prefetch engine 112 does not allow the initiation of more prefetch threads than the maximum number.

[0056] To dynamically adjust the prefetch load, the dynamic prefetch engine 112 may increase or decrease the number of prefetch threads (N). As described above, the adjustment of the number of prefetch threads (N) may be based on the prefetch cache utilization metric (P) and the resource conflict metric (C).

[0057] The dynamic reduction of the number of prefetch threads (N) may be calculated according to the following equation:

[0058]

[0059] where K is a constant (e.g., 10 or a different constant), and D(Step) represents the number of threads to scale down in each iteration. For example, D(Step) may be 1, 2, 3, etc. If at Figure 2 206 it is determined that P < TP-down or C > TC-down, then Equation 1 is used. Equation 1 decrements the number of prefetch threads incrementally.

[0060] The dynamic increase of the number of prefetch threads (N) may be calculated according to the following equation:

[0061] N = N + I(Srep) (Equation 2)

[0062] where I(Step) represents the number of threads to increase in each iteration. For example, I(Step) may be 1, 2, 3, etc.

[0063] If P > TP-up and C < TC-up, as at Figure 2 As determined at 210 in , Equation 2 is used. Equation 2 incrementally increases the number of prefetch threads.

[0064] Figure 4 is a block diagram of a non-transitory machine-readable or computer-readable storage medium 400 storing machine-readable instructions that, when executed, cause the system to perform various tasks.

[0065] The machine readable instructions include dynamic prefetch load adjustment instructions 402 to dynamically adjust a prefetch load of a prefetch cache based on a measure of past utilization of the prefetch cache (eg, P), wherein the prefetch load is used to prefetch data from a storage device into the prefetch cache.

[0066] In some examples, by dynamically adjusting the prefetch thread (e.g., Figure 3 The prefetch load is dynamically adjusted by the number of prefetch threads (304-1 to 304-N), which are used to prefetch data from the storage device into the prefetch cache.

[0067] In some examples, the machine readable instructions will further dynamically adjust the prefetch load based on a measure of conflict (eg, C) when accessing prefetch data in the prefetch cache.

[0068] In some examples, a measure of conflict in accessing prefetch data in a prefetch cache is based on a number of events in which one or more entities are unable to access the prefetch cache.

[0069] In some examples, the measure of conflict in accessing prefetch data in the prefetch cache is based on a number of read conflict events in accessing the prefetch cache.

[0070] In some examples, a measure of conflicts in accessing prefetch data in a prefetch cache is based on a number of events in which one or more entities cannot obtain a lock to access the prefetch cache.

[0071] In some examples, the measure of past utilization of the prefetch cache is based on a percentage of prefetch data stored in the prefetch cache that has been accessed.

[0072] In some examples, the measure of past utilization of the prefetch cache is based on a percentage of reads of data stored in the prefetch cache that resulted in a cache hit.

[0073] In some examples, the machine-readable instructions dynamically adjust the prefetch load by incrementally decreasing the prefetch load in response to a measure of past utilization of the prefetch cache satisfying a threshold (eg, P < TP-down).

[0074] In some examples, the machine-readable instructions dynamically adjust the prefetch load by incrementally increasing the prefetch load in response to a metric of past utilization of the prefetch cache meeting a threshold (e.g., P > TP-up).

[0075] In some examples, the machine-readable instructions dynamically adjust the prefetch load by incrementally decreasing the prefetch load in response to a metric of past utilization of the prefetch cache meeting a first threshold (e.g., P < TP-down), and incrementally increasing the prefetch load in response to a metric of past utilization of the prefetch cache meeting a second threshold different from the first threshold (e.g., P > TP-up).

[0076] In some examples, the machine-readable instructions further dynamically adjust the prefetch load based on a metric of conflicts when accessing prefetch data in the prefetch cache. The dynamic adjustment of the prefetch load includes incrementally decreasing the prefetch load in response to a metric of past utilization of the prefetch cache meeting a first shrink threshold or a metric of conflicts when accessing prefetch data in the prefetch cache meeting a second shrink threshold (e.g., P < TP-down or C > TC-down), and incrementally increasing the prefetch load in response to a metric of past utilization of the prefetch cache reaching a first magnify threshold and a metric of conflicts when accessing prefetch data in the prefetch cache meeting a second magnify threshold (e.g., P > TP-up and C < TC-up).

[0077] Figure 5 is a block diagram of system 500 (e.g., Figure 1 the storage system 102 of or other computing systems).

[0078] System 500 includes a cache 502 to store prefetch data from a storage device. System 500 includes a prefetch controller 504 (e.g., the dynamic prefetch engine 112) to dynamically adjust the prefetch load of cache 502 based on a metric of resource conflicts (506) when accessing the cache, where the prefetch load is for prefetching data from the storage device into cache 502.

[0079] In some examples, the prefetch controller 504 is used to further dynamically adjust the prefetch load based on a metric of past utilization of the prefetch data in the cache.

[0080] Figure 6 is a flowchart of a process 600 according to some examples. Process 600 can be executed in a system having a hardware processor. The hardware processor can include a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or other hardware processing circuits.

[0081] Process 600 includes receiving (at 602) a measure of past utilization of a cache storing data pre-fetched from a storage device. For example, the measure of past utilization may be retrieved from a memory.

[0082] Process 600 includes receiving (at 604) a measure of resource conflict in accessing prefetched data in a cache. For example, the measure of resource conflict may be retrieved from a memory.

[0083] Process 600 includes dynamically adjusting (at 606) a prefetch load of a prefetch cache based on a measure of past utilization and a measure of resource conflict, wherein the prefetch load is used to prefetch data from a storage device into the cache.

[0084] In the foregoing description, many details are set forth to provide an understanding of the subject matter disclosed herein. However, embodiments may be implemented without some of these details. Other embodiments may include modifications and variations to the above details. The appended claims are intended to cover such modifications and variations.

Claims

1. A non-transitory machine-readable storage medium comprising instructions that, when executed, cause a system to: The prefetch load of the prefetch cache is dynamically adjusted based on a measure of past utilization of the prefetch cache and based on a measure of conflicts when accessing prefetch data in the prefetch cache, wherein: The prefetch load is used to prefetch data from a storage device into the prefetch cache, and wherein the metric of conflicts in accessing the prefetch data in the prefetch cache is based on a number of events in which one or more entities cannot obtain a lock to access the prefetch cache.

2. The non-transitory machine-readable storage medium according to claim 1, wherein: The instructions dynamically adjust the prefetch load by dynamically adjusting the number of prefetch threads that prefetch the data from the storage device into the prefetch cache.

3. The non-transitory machine-readable storage medium of claim 1, wherein: The event that the one or more entities cannot obtain the lock to access the prefetch cache comprises a read conflict event when accessing the prefetch cache.

4. The non-transitory machine-readable storage medium of claim 1, wherein: A lock conflict occurs if a first entity is unable to acquire a lock on a portion of the prefetch cache because a second entity holds a lock on the portion of the prefetch cache.

5. The non-transitory machine-readable storage medium of claim 1, wherein: The measure of past utilization of the prefetch cache is based on a percentage of the prefetch data stored in the prefetch cache that has been accessed.

6. The non-transitory machine-readable storage medium of claim 1, wherein: The measure of past utilization of the prefetch cache is based on a percentage of reads of data stored in the prefetch cache that resulted in a cache hit.

7. The non-transitory machine-readable storage medium of claim 1, wherein: The instructions are for dynamically adjusting the prefetch load in response to comparing the measure of past utilization of the prefetch cache to a threshold.

8. The non-transitory machine-readable storage medium of claim 7, wherein: The instructions dynamically adjust the prefetch load by incrementally decreasing the prefetch load in response to the measure of past utilization of the prefetch cache being less than a threshold.

9. The non-transitory machine-readable storage medium of claim 7, wherein: The instructions dynamically adjust the prefetch load by incrementally increasing the prefetch load in response to the measure of past utilization of the prefetch cache being greater than a threshold.

10. The non-transitory machine-readable storage medium of claim 7, wherein: The threshold is a first threshold, and wherein the instruction dynamically adjusts the prefetch load by: Incrementally reducing the prefetch load in response to the measure of past utilization of the prefetch cache being less than the first threshold; and The prefetch load is incrementally increased in response to the measure of past utilization of the prefetch cache being greater than a second threshold different from the first threshold.

11. The non-transitory machine-readable storage medium of claim 1, wherein: The instruction dynamically adjusts the prefetch load by: incrementally reducing the prefetch load in response to the measure of past utilization of the prefetch cache being less than a first reduction threshold or the measure of conflicts in accessing the prefetch data in the prefetch cache being greater than a second reduction threshold; as well as The prefetch load is incrementally increased in response to the measure of past utilization of the prefetch cache being greater than a first enlargement threshold and the measure of conflicts in accessing the prefetch data in the prefetch cache being less than a second enlargement threshold.

12. A system for pre-fetching data, comprising: a cache for storing data pre-fetched from a storage device; and Prefetch controller for: Dynamically adjust a prefetch load of the cache based on a measure of resource conflicts when accessing the cache, wherein the prefetch load is used to prefetch data from the storage device into the cache, and wherein the measure of resource conflicts when accessing the cache is based on a number of events in which one or more entities cannot obtain a lock to access the cache.

13. The system according to claim 12, wherein: The pre-fetch controller is used for: The prefetch load is further adjusted dynamically based on a measure of past utilization of prefetch data in the cache.

14. The system according to claim 13, wherein: The pre-fetch controller is used for: The prefetch load is dynamically adjusted based on comparing the measure of resource conflict to a first threshold and comparing the measure of past utilization of the prefetch data in the cache to a second threshold.

15. The system of claim 14, wherein: The first threshold is a first reduced threshold and the second threshold is a second reduced threshold, and wherein the prefetch controller is to dynamically adjust the prefetch load by incrementally reducing the prefetch load.

16. The system of claim 14, wherein: The first threshold is a first enlarged threshold and the second threshold is a second enlarged threshold, and wherein the prefetch controller is configured to dynamically adjust the prefetch load by incrementally increasing the prefetch load.

17. A method performed in a system including a hardware processor, comprising: receiving a measure of past utilization of a cache that stores data prefetched from a storage device by a prefetcher; receiving a measure of resource conflict in accessing the prefetched data in the cache, the measure of resource conflict being based on a number of events in which one or more entities were unable to access the cache due to the prefetcher accessing the cache; as well as A prefetch load of the cache is dynamically adjusted based on the measure of past utilization and the measure of resource conflict, wherein the prefetch load is used to prefetch data from the storage device into the cache.

18. The method according to claim 17, wherein: Dynamically adjusting the prefetch load includes adjusting the number of prefetch threads used to prefetch data from the storage device into the cache.

19. The method according to claim 17, wherein: The number of events in which the one or more entities were unable to access the cache includes a number of events in which the one or more entities were unable to obtain a lock to access the cache.

20. The method according to claim 19, wherein: The one or more entities are unable to obtain a lock to access the cache because the prefetcher holds a lock on the cache.