IMPROVEMENT OF BUFFER POOL MANAGEMENT
By dividing the buffer pool into LRU and hot block areas, the system addresses inefficiencies in managing buffer pools, reducing resource consumption and improving performance in systems with repetitive queries by minimizing LRU list reordering.
Patent Information
- Application Number
- DE102021128927
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-12-08
- Filing Date
- 2021-11-08
- Publication Date
- 2025-01-30
- Estimated Expiration
- 2041-11-08
AI Technical Summary
Existing storage systems face inefficiencies in managing buffer pools due to high resource usage for buffer pool management locks, particularly in systems with repetitive queries, where the Least Recently Used (LRU) list is frequently reordered despite infrequent data relocation, leading to unnecessary resource consumption.
The system divides the buffer pool into two sections: an LRU area for individual pages and a hot block area for groups of continuously used pages, where pages are classified as 'hot' based on predefined criteria, allowing them to be managed without reordering the LRU list, thus reducing the need for buffer pool management locks.
This approach significantly reduces the number of buffer pool management locks, enhancing system performance by minimizing unnecessary resource usage and optimizing data relocation in systems with repetitive queries.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
BACKGROUND
[0001] The present disclosure relates to memory management and, more particularly, to identifying data to be transferred between memory tiers.
[0002] Some storage systems, such as storage systems that support database work, include one or more buffer pools. A buffer pool is an area of a relatively fast storage tier that stores recently used data. Storage systems sometimes move data from the buffer pool to a relatively slower storage tier if the data has not been used recently. Some storage systems employ a "least recently used" data block list, which organizes a list of the data blocks in the buffer pool based on when they were last used. Such storage systems typically maintain the least recently used data block list during system operation and, based on this list, transfer data blocks from the buffer pool to slower tiers as needed. SUMMARY
[0003] Some embodiments of the present disclosure may be illustrated as a method for managing a storage system. The method includes detecting a reference to a first page in the storage system. The method also includes creating a first candidate block for the first page based on the detection. The first candidate block may have a contiguous series of pages beginning with the first page. The method also includes monitoring subsequent references to pages within the first candidate block. The method also includes determining that the first candidate block meets a first set of hot block requirements. The method also includes relocating the first candidate block to a hot block area in a buffer pool based on the detection, resulting in a first hot block.
[0004] Some embodiments of the present disclosure may also be illustrated as a processor and a main memory communicating with that processor. The main memory contains program instructions that, when executed by the processor, are configured to cause the processor to perform the method described above.
[0005] Some embodiments of the present disclosure may also be illustrated as a computer program product. The computer program product comprises a computer-readable storage medium containing program instructions. If the program instructions are executable by the computer, they cause the computer to perform the method described above.
[0006] The foregoing summary is not intended to describe every illustrated embodiment or every implementation of the present disclosure.
[0007] US 2020 0 218 668 A1 describes a main storage device with heterogeneous memories, a computer system with this device and a data management method therefor. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The drawings included in this application are incorporated in and constitute a part of the specification. They illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the disclosure. The drawings merely illustrate certain embodiments and do not limit the disclosure. Fig. 1 illustrates a method for moving a block of pages to a hot block area in a buffer pool according to embodiments of the present disclosure. Fig. 2 illustrates a method for implementing standard and relaxed sets of hot block requirements according to embodiments of the present disclosure. Fig. 3A shows a first view of a memory system having a hot block region after creating a candidate block according to embodiments of the present disclosure. Fig. 3B shows a second view of a memory system having a hot block region when the hot block requirements for the candidate block are met, according to embodiments of the present disclosure. Fig. 3C shows a third view of a memory system in which the block in question is relocated to the hot block area, according to embodiments of the present disclosure. Fig. 4 illustrates a method for removing pages from a hot block region in accordance with embodiments of the present disclosure. Fig. 5 shows the relevant main components of a computer system that can be used according to embodiments.
[0009] While the invention is susceptible to various modifications and alternative forms, the details thereof are shown by way of example and will be described in detail in the drawings. It should be understood, however, that the intention is not to limit the invention to the particular embodiments described. On the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. DETAILED DESCRIPTION
[0010] Aspects of the present disclosure relate to memory management, and more particularly, to identifying data to be transferred between memory tiers. While the present disclosure is not necessarily limited to such applications, various aspects of the disclosure may be understood by discussing various examples using this context.
[0011] Many types of computer systems, such as database systems, employ multiple storage tiers. In these computer systems, larger, slower storage tiers (e.g., tape drives, rotating hard disks) often store large amounts of data that the computer system does not frequently use. Smaller, faster storage tiers (e.g., random-access memory; hereinafter "RAM") often store smaller amounts of data that the computer either frequently or currently needs.
[0012] Many of these computer systems also employ techniques to enable records to be maintained of the data located in the relatively slow storage tiers and data located in the relatively fast storage tiers. For example, some such computer systems employ "paging," in which data is organized into blocks of equal size (e.g., a specific number of kilobytes). A memory controller may maintain a record of the specific pages that have been migrated from the slower storage tier (e.g., a hard disk drive) to the faster storage tier (e.g., RAM, cache), rather than maintaining a record of the start and stop addresses of all data in the faster tier.
[0013] Computer systems that use paging often maintain a section of a fast memory tier reserved for pages migrated to that fast memory tier. This section is often referred to as a buffer pool. For example, a system's RAM may contain a section that can only be occupied by pages migrated from the system's solid-state drive. When a page is migrated to RAM, it may be placed in the buffer pool.
[0014] Computer systems that manage paging and a buffer pool often also employ techniques to determine which pages in the buffer pool are likely to be needed in the near future, and conversely, which pages in the buffer pool can be relocated back to a slower memory tier. One common technique is called a least recently used page list (also referred to herein as the "LRU"). This LRU list of pages may also be referred to herein as an "LRU list" or "LRU chain." In computer systems that employ an LRU list, a memory controller typically maintains a record of the last timestamp (e.g., date and time) at which each page in the buffer pool was referenced (e.g., by a "page fetch" step of a query).The memory controller typically orders pages such that the most recently referenced pages are placed at one end of the LRU list, and the least recently referenced pages are placed at the opposite end. When a page is referenced (i.e., fetched into the buffer pool), it is moved to the "most recently" end of the LRU list, and each subsequent page is moved to the least recently referenced end of the LRU list.
[0015] If the referenced page was not previously in the LRU list, all pages in the LRU list are moved, typically resulting in the least recently used page being moved back to a slower memory tier. However, if the referenced page was already in the LRU list, the pages in the LRU list are reorganized (e.g., pages that were previously referenced more recently than the referenced page are moved, but pages that were previously referenced earlier than the referenced page remain in the same position).
[0016] Although a referenced page already in the LRU list typically does not result in any moves to or from the LRU list (i.e., the buffer pool), moving pages in the LRU list still requires system resources. For example, reordering the pages in the list and recording the new page order requires updating a buffer pool directory. This update is sometimes referred to as a buffer pool maintenance latch. On some systems, the buffer pool maintenance latch may prevent data from being moved into main memory at all. In other words, the pages themselves in the buffer pool are not moved; instead, they are simply assigned to different positions in the LRU list.Thus, the resources required to perform this buffer pool management do not provide any real change to the storage system.
[0017] Unfortunately, in some computer systems (e.g., databases with repetitive, periodic queries), the buffer pool management lock can represent a very large portion of the activities of a memory controller managing the buffer pool. In these computer systems, the list of pages in the buffer pool may remain relatively similar over time, but the order of those pages in the LRU list may change frequently as different pages in the list are referenced. In these computer systems, the high percentage of resources devoted to the buffer pool management lock results in resources being consumed that do not contribute to the purpose of the LRU list or improve the performance of the buffer pool. The reason for this is that the LRU list is intended to help determine which page(s) from the buffer pool should be moved to a slower memory tier when needed.However, in these computer systems, shifts to slower memory tiers are relatively rare compared to other computer systems. However, the buffer pool management lock is still used very frequently. This allows the same or greater amount of resources to be dedicated to managing the LRU list, even though the LRU list may be used less frequently than other computer systems.
[0018] For these reasons, computer systems in which a large number of page references are to pages already in the buffer pool would benefit from a new method for organizing the buffer pool. Such a method would preferably reduce the number of buffer pool management locks for this large number of page references.
[0019] Some embodiments of the present disclosure address these problems by dividing the buffer pool into two sections (sometimes referred to herein as "panes"). The first pane of the buffer pool is a least recently used pane (sometimes referred to herein as the "LRU pane"), which contains pages tracked in an LRU list. The movement of these pages to and from disk can be accomplished without any interaction with the second buffer pool pane, using means similar to those discussed above. For example, in a system with a 1,000-page LRU list, if a page is referenced, it can be moved to the LRU pane of the buffer pool. At that time, it would be the page first in the LRU list (e.g., page number 1 in the LRU list). However, if that page is no longer referenced after 999 more unique pages have been referenced, the page would become the 1st000th page in the LRU list (e.g., page number 1000 in the LRU list). This would then make the page the next page to be moved from the buffer pool to disk when the LRU area needs more space.
[0020] The second area of the buffer pool is referred to herein as the hot block area. Unlike the LRU area, the hot block area stores "blocks" of pages rather than individual pages. The term "blocks of pages" used herein refers to a series of contiguous pages of a fixed size. For example, if a particular block is 5 pages long, all five pages in the block will have adjacent memory addresses (e.g., addresses on a hard disk).
[0021] The hot block section stores blocks that have been classified as "hot." Whether a block is "hot" or not "hot" is intended to represent how actively the computer system uses those pages. For a block to be considered hot, a certain set of hot block requirements must be met, which are related to the system's page reference pattern. For example, a typical set of hot block requirements might be a threshold number of page references in that block. In other words, a threshold number of pages in a block must be referenced within a certain period of time. For example, a set of hot block requirements might be that 70% of the block's pages are referenced. So, if 6 pages were referenced in a 10-page block, it would not be considered hot.However, once the seventh page in that block is referenced, the requirements would be met, and the block would be considered hot. All pages in the block could then be moved to the hot block area of the buffer pool. All pages in the block that were previously in the LRU area up to that point could also be moved there.
[0022] The pages in a hot block can then remain in the hot block area of the buffer pool until the block is no longer considered sufficiently hot. For example, if the average reference time of the pages in a "hot" block falls below a threshold (e.g., 2 references in 10 seconds), the block can be removed from the hot block area. The pages in the block can then be segregated based on when they were last referenced. For example, if a 32-page block is evicted from the hot block, 5 recently referenced pages can be evicted to the LRU area, while the remaining 27 non-recently referenced pages can be evicted back to a slower storage tier.
[0023] Although the pages in a hot block are stored in a hot block queue, they are not in the LRU range, so they don't need to be referenced in the LRU list. Therefore, the LRU list doesn't need to be reorganized when the pages in the hot block range are referenced, and consequently, no buffer pool management lock is incurred. On systems with some blocks of adjacent pages that are referenced fairly regularly, this can result in a significant performance gain.
[0024] However, different systems with different activity patterns (e.g., common queries), database sizes, and user preferences may benefit from the hot block area to varying degrees. For this reason, some embodiments of the present disclosure allow multiple aspects of the hot block area to be configurable. For example, the size of the hot block area and the LRU area may be configurable. For example, users of systems that reference the same pages very frequently, rather than referencing all pages in the system equally frequently, may benefit from increasing the hot block area and decreasing the LRU area. The size of blocks may also be configurable. For example, blocks for very large databases with a large number of subsequent pages may be set larger than those for small databases.The sets of requirements for hot blocks can also be customizable. For example, users particularly concerned about wasting space in the buffer pool by inserting unreferenced pages into a block can specify restrictive sets of requirements, while users particularly concerned about avoiding unnecessary LRU management can specify more relaxed sets of requirements. Requirements can also take different forms. For example, a system may require that a certain percentage of pages in a block must be referenced multiple times, or that a certain percentage of pages in a section of a block (e.g., the first half of a block) must be referenced. Some sets of requirements can even be satisfied based on reference patterns of other blocks.For example, a hot block requirement may dictate that a certain percentage of pages must be referenced in a previous adjacent block.
[0025] Fig. 1 shows a method 100 for relocating a block of pages to a hot block area in a buffer pool, according to embodiments of the present disclosure. The method 100 may be performed, for example, by a memory controller of a computer system, a central processing unit within the computer system, a host of the computer system, or a hypervisor of a system. For the purposes of this discussion, the actions of the method 100 will be referred to as being performed "by the system." The method 100 begins with operation 102, in which the system identifies a referenced page. As discussed previously, this may often be done through a "get page" operation of a query, but other page reference operations are also possible.
[0026] Once the page address is found, operation 104 creates a candidate block for the page. A candidate block, as used here, is a hypothetical block that contains the referenced page as the first page. The size of the candidate block may correspond to the size configured for hot blocks in that part of the system (e.g., for the database where the referenced page's data is located). Thus, if a hot block is configured to consist of 16 pages, operation 104 may involve creating a candidate block that includes the referenced page and the subsequent 15 pages at that page's location (e.g., the referenced page's location on disk).
[0027] The system may then monitor the patterns by which pages in the candidate block are configured to determine whether any hot block requests are satisfied as the method 100 continues. While the referenced page and all subsequent referenced pages in the candidate block may be temporarily moved to the LRU region once referenced, the system may continue to monitor the block's references as if the pages were still adjacent.
[0028] Thus, the system may monitor the page references for the candidate block in operation 106 and detect a subsequent page reference in the candidate block in operation 108. For example, the system may detect a reference to the second page in the candidate block (i.e., the page immediately following the page referenced in operation 102) or a reference to several pages thereafter in operation 108.
[0029] After detecting a subsequent page reference in step 108, the system determines in step 110 whether the hot block requirements for the candidate block are met. In some embodiments, this may involve comparing the system's page reference patterns with the required reference patterns for the candidate block. These hot block requirements may vary due to implementation and system administrator preferences.
[0030] For example, when smaller blocks are deployed (i.e., when the candidate block created in operation 104 is small), a relaxed set of requirements may be more desirable (e.g., a set of requirements that are easy to satisfy), since moving the small block to the hot block area would consume a large amount of space in the buffer pool. Conversely, when larger blocks are deployed, a strict set of requirements (e.g., a set of requirements that are difficult to satisfy) may be more desirable to avoid the risk of a block whose pages are not actually used frequently consuming a large amount of space in the buffer pool.
[0031] Likewise, some users (e.g., database owners, database operators, system administrators) may be particularly focused on avoiding completely depleting space in the buffer pool and therefore prefer to move an entire block to the hot block area only when the requirements of a strict set of requirements are met. On the other hand, some users may be particularly focused on avoiding unnecessary management of the LRU space and therefore prefer to move a block to the hot block area once the requirements of a relaxed set of requirements are met.
[0032] In some embodiments, a rather simple set of requirements may be employed in operation 110. For example, the hot block requirements may dictate that 50% of the pages in the candidate block be referenced in a certain amount of time (e.g., one minute). In some embodiments, the set of requirements could also take more complicated forms. For example, the hot block requirements may dictate that at least 30% of the pages in the candidate block be referenced once, at least 10% be referenced a second time, and at least 2 adjacent pages in the candidate block be referenced in order.
[0033] If the system determines in step 110 that the hot block requirements are not met, the system may return to step 106 to continue monitoring page references for the eligible block. However, if the system determines that the hot block requirements are met, the system proceeds in step 112 to move the pages in the eligible block into the hot block area. At this point, the eligible block may be referred to as a "hot block."
[0034] In some cases, operation 112 may include moving some pages that were previously moved to the LRU region into the hot block region. In some embodiments, this relocation may be a logical relocation and may not involve actually moving the pages in the block to another physical location in main memory. Rather, the pages in the hot block that are "moved" from the LRU region to the hot block region may simply be considered by the system to be in the hot block region, and the system may remove them from the LRU list. Note that any pages in the hot block that were previously on disk (e.g., unreferenced pages) in typical storage systems are moved from a slower storage tier (e.g.,a hard disk drive) into the main memory where the hot block is located.
[0035] Once the hot block has been moved into the hot block area at operation 112, the system updates the buffer pool directory at operation 114. This is done so that the system can keep track of the pages in the hot block. The exact information required may vary depending on the embodiment, but in typical embodiments, the information should provide the system with a way to calculate the size of the hot block and the memory address of the hot block. For example, the buffer pool directory could identify the memory address of the first page in the hot block and the number of pages in the hot block. Using this information, the system could locate the hot block in main memory and would be able to calculate the memory location of each subsequent page in the hot block based on the system's page size.In addition, the system would also be able to calculate the end of the hot block based on the number of pages in the hot block. Other information that could be included in the directory is the block endpoint, the size of the block in main memory (e.g., in megabytes), the first page identifier, and the last page identifier, etc.
[0036] After moving the hot block to the hot block area in the buffer pool, the system could then monitor the page reference patterns for the hot block and keep the hot block in the hot block area until it is no longer considered "hot." The requirements to remain "hot" may vary depending on the embodiment and implementation and will be discussed in the context of Fig. 4 discussed.
[0037] The method 100 discloses relocating a single candidate block using a single set of hot block requests. However, in some embodiments, it may be advantageous to employ multiple sets of hot block requests to enable multiple candidate blocks to be relocated into the hot block area in a short period of time. This may be advantageous, for example, when a request references 100 pages, but the block size for the system is 25 pages. In this example, the system may end up relocating four (or more) hot blocks associated with the request in a short period of time. For example, a candidate block of 25 pages may be created if the first page of the 100 pages is referenced.The query may reference twenty of these twenty-five pages in the eligible block, which may be sufficient to satisfy the hot block requirement. The same may then apply to the next eligible block, so that five eligible blocks are moved into the hot block space. In some implementations, it may be quite common for the queries performed by the system to reference more pages than can fit in a single eligible block, leading to many situations where multiple adjacent eligible blocks are moved into the hot block space.
[0038] In these situations, it may be advantageous to relax the hot block requirements of a candidate block if that candidate block immediately follows a block that has been moved into memory. Therefore, in the previous example, it may be advantageous to use a less stringent set of hot block requirements for the second candidate block (e.g., the block corresponding to pages 20 to 40 of the query) if the previous candidate block (i.e., the first candidate block) to become a hot block is expected to increase the probability that the second candidate block will become a hot block. This may allow the system to move subsequent candidate blocks (e.g., blocks 2 to 5) into the hot block space after fewer page references, thereby reducing the number of steps required to manage the LRU space (e.g.,Buffer pool management locks) is reduced before the block in question is relocated.
[0039] The extent to which the set of requirements should be relaxed may depend on the design and implementation. For example, imposing a very relaxed set of requirements on subsequent candidate blocks may avoid administrative locks, but it may also increase the probability that a candidate block that does not actually become "hot" will be moved into the hot block area. For example, if a first candidate block consists of 16 pages and all 16 are referenced in sequence by a query, this may increase the probability that the query will also reference a significant number of the pages in the second candidate block (e.g., the block starting with the 17th page, which is adjacent to the 16th page), causing that block to also become "hot."However, setting the hot block requirements for the second candidate block very loosely (e.g., requiring that the first two pages be referenced) may result in the second candidate block being moved into the hot block area even if the query only references the first three pages of the second candidate block. In this situation, the benefits of moving the second candidate block (e.g., avoiding potential administrative locks due to storing the first three pages of the second candidate block in the LRU area) may be outweighed by the disadvantages of storing the entire 16-page block in the hot block area.For this reason, hot block requirements for subsequent blocks may need to be adjusted for each system and situation to maximize the benefit achieved by avoiding administrative locks while minimizing the risk of unnecessarily occupying space in the buffer pool with a "hot block" that contains only a very small percentage of hot pages.
[0040] Fig. 2 illustrates a method 200 for implementing standard and relaxed sets of hot block requirements according to embodiments of the present disclosure. Like method 100, method 200 may be performed by, for example, a memory controller of a computer system, a central processing unit within the computer system, a host of the computer system, or a hypervisor of a system. For the purposes of this discussion, the actions of method 200 will be referred to as being performed "by the system."
[0041] The method 200 begins with operation 202, in which page references are monitored for the system. Based on the page references monitored in operation 202, the system detects in operation 204 that a first candidate block meets a standard set of requirements for a hot block. For example, the standard set of requirements may state that a candidate block becomes hot when 50% of its pages are referenced. In this example, the system would detect in operation 204 that 50% of the pages in a first candidate block have been referenced.
[0042] As a result of detecting a first hot block in operation 204, the system moves the first hot block into the hot block area of the buffer pool in operation 206. As previously discussed, this may involve moving some pages of the first hot block from another memory tier and some pages of the first hot block from the LRU area.
[0043] After detecting the first hot block in operation 204, the system would also continue to monitor page references in operation 208, which may be similar to the actions of operation 202. In some embodiments, operation 208 may be a continuation of operation 202. For example, the system may monitor page references throughout the process of method 200. Based on the page references monitored in operation 208, the system detects a second hot block in operation 210 using a first relaxed set of hot block requirements. In some embodiments, the first relaxed hot block requirements may be similar to the standard hot block requirements employed in operation 204, but may be less stringent.For example, the standard hot block requirements may dictate that 50% of the pages of the first eligible block be referenced, while the first relaxed hot block requirements may dictate that 40% of the pages of the second eligible block be referenced. Similarly, the first set of relaxed hot block requirements may dictate that 50% of the first half of the pages in the second eligible block be referenced (i.e., the requirements may dictate that 25% of the pages in the second eligible block be referenced if those 25% are in the first half of the second eligible block). In other embodiments, the form of the first set of relaxed hot block requirements may differ from the standard requirements.For example, the first set of relaxed requirements may require that 10% of the pages in the second eligible hot block be referenced twice.
[0044] After detecting the second hot block in operation 210, the system moves the second hot block to the hot block area in operation 212 and continues monitoring page references in operation 214. Based on the page references monitored in operation 216, the system detects a third hot block in operation 216 using a second relaxed set of hot block requirements. In some embodiments, the second set of relaxed hot block requirements may have a similar form to the standard requirements and the first relaxed requirements.For example, if the standard requirements require that 50% of the pages in the first eligible block be referenced, and the first set of relaxed requirements require that 25% of the pages in the second eligible block be referenced, the second set of relaxed requirements may require that 15% of the pages in the third eligible block be referenced.
[0045] In some embodiments, the second set of relaxed hot block requirements may take a different form than the standard hot block requirements and the first set of relaxed hot block requirements. For example, the standard hot block requirement may dictate that 50% of the pages in the first eligible block be referenced, and the first set of relaxed hot block requirements may dictate that 50% of the pages in the first 50% of the second eligible block be referenced. However, the second group of relaxed requirements may not affect the pages in the third eligible block. Rather, the second set of relaxed requirements may dictate that 50% of the pages in the second 50% of the second eligible block be referenced.This can be advantageous, for example, to exploit trends where a very large fraction of pages are referenced in both the first and second candidate blocks. Given these trends, it may be very likely that the third candidate block will also become a candidate block, and therefore it may be beneficial to move the third candidate block to the hot block area before any page of the third candidate block is referenced.
[0046] Regardless of the form the second set of relaxed hot block requirements takes, as a result of detecting the third hot block at operation 216, the system may move the third hot block into the hot block area at 218. In some embodiments of method 200, this may result in the first, second, and third hot blocks occupying adjacent positions in the buffer pool, effectively creating a long string of related pages that can be accessed frequently without maintaining the LRU list.
[0047] For a better understanding, the Fig. 3A to 3C illustrate an abstracted representation of a memory system 300 employing some embodiments of the present disclosure. It is important to note that the Fig. 3A through 3C are shown for convenience of understanding only and not for precision. Thus, the elements are illustrated as basic representations of memory system components. However, the number and size of the elements are not necessarily representative of an accurate reduction for practicing the embodiments of this disclosure.
[0048] Fig. 3A shows a first view of storage system 300 with a hot block region after creating a candidate block according to embodiments of the present disclosure. Storage system 300 shows lower-level storage 302, such as a hard disk drive, a tape drive, or a solid-state drive. Storage system 300 also shows LRU region 304 and hot block region 306, both of which are located within a buffer pool of higher-level storage, such as random access memory or cache. The lower level memory 302 contains a large number of pages, such as pages 308, 310, and 312. The LRU area 304 contains eight pages, such as pages 314, 316, 318, and 320, as illustrated. The hot block area 306 contains a single hot block 322, represented by six pages enclosed by a dashed line 324, as illustrated.Therefore, the hot block 322 may originate from a section of the memory system 300 where the standard block size is 6 pages.
[0049] In some embodiments, the size of the hot block area 306 and the size of the LRU area 304 may be configurable based on system characteristics and user preferences. Databases that tend to perform queries where many pages are accessed sequentially would likely benefit from a larger hot block area. Databases that tend to perform queries where most queries refer to only a few pages, or refer to pages that are not close to each other, or refer to pages without a particular pattern, may benefit from a larger LRU area and a smaller hot block area.
[0050] For a better understanding, the time span since the reference to a page is shown in the Fig. 3A to 3C by the intensity with which these pages are shaded. For example, page 314 in LRU area 304 is darkly shaded, indicating that it was referenced very recently. However, page 316 and the pages within hot block 322 are slightly less darkly shaded, indicating that they were referenced somewhat longer ago than page 314. Furthermore, pages 318 and 320 are lightly shaded, indicating that they were referenced longer ago than pages 314 and 316. Pages 308 and 312, however, are not shaded, indicating that they have not been referenced.
[0051] However, page 310 in the lower-level memory 310 was referenced a short time earlier. Consequently, page 310 is illustrated in dark hatching. Furthermore, the candidate block 326 may have been created for block 310, illustrated by the dashed line 324. As illustrated, the candidate block 326 comprises 4 pages, beginning with page 310. Thus, unlike the hot block 322, it may originate from a section of the memory system 300 where the block size is 4 pages.
[0052] Fig. 3B shows a second view of a memory system having a hot block region when the hot block requirements for the candidate block are met, according to embodiments of the present disclosure. In Fig. 3B, page 310 has been moved to LRU range 304, and thus the pages in the LRU range have been moved down, requiring a buffer pool management lock. Thus, page 314 is no longer the most recently referenced page in LRU range 304, page 318 is now the most recently referenced page in LRU range 403, and page 320 has been removed from LRU range 304.
[0053] As in Fig. 3B, page 330, the second page within eligible block 326, has been referenced. If the hot block requirement for eligible block 326 requires that 50% of the pages within eligible block 326 be referenced, the hot block requirement would be met. Consequently, the storage system may relocate eligible blocks 326 to hot block area 306.
[0054] This shift is in Fig. 3C. In Fig. 3C, the memory system has moved the pages corresponding to the block in question 326 into the hot block area 306, resulting in the hot block 332. This included, for example, moving page 310 from the LRU area 310 and pages 330 and 334 from the low-level memory 302. Furthermore, page 334 has been moved into the hot block area 306 as part of the hot block, even though it has not yet been referenced. As previously mentioned, moving page 310 from the LRU area 304 to the hot block area 306 may involve moving page 310 to a different physical location within main memory. However, this relocation could alternatively simply be a logical relocation, where page 310 remains in the same physical location in main memory but is recorded as being in the hot block area 306.In some embodiments, this may only be possible if there is sufficient space in main memory for the remaining pages in hot block 332 in addition to page 310.
[0055] Furthermore, this relocation has resulted in a free space being created in the LRU area 304. In some embodiments, the storage system could consequently relocate the page 320 back to the LRU area 304. The storage system could also allow the empty space to remain in the LRU area 304, waiting to be filled when another page is referenced.
[0056] Because candidate block 326 was moved into hot block space 306, the system ultimately created a second candidate block, candidate block 336. The system may then monitor the system's page references and determine whether to move candidate block 336 into hot block space 306 based on the same hot block requirements that were applied to candidate block 326 (i.e., hot block 332). On the other hand, the system may apply a relaxed set of hot block requirements to candidate block 336, assuming that candidate block 336 is more likely to become a hot block because the immediately preceding pages (i.e., the pages of hot block 332) are moved as a hot block.
[0057] The Fig. 1 through 3C illustrate methods and a system for adding a series of pages as a hot block to a hot block area in a buffer pool. After being added to a hot block area, in some embodiments, a hot block would remain in the hot block area until the pages it contains are no longer referenced frequently enough to remain in the hot block queue. This may be referred to herein as the hot block becoming insufficiently active. There are several methods for determining that a hot block is insufficiently active, based on the circumstances of the computer system and the preferences of the system's users.Most embodiments involve determining whether the benefit of avoiding LRU management locks by storing the hot block in the hot block space is likely to be outweighed by the space in the hot block space dedicated to the hot block.
[0058] Fig. 4 illustrates a method 400 for removing pages from a hot block region, according to embodiments of the present disclosure. Like methods 100 and 200, method 400 may be performed, for example, by a memory controller of a computer system, a central processing unit within the computer system, a host of the computer system, or a hypervisor of a system. For the purposes of this discussion, the actions of method 400 will be referred to as being performed "by the system."
[0059] The method 400 begins with operation 402, in which references to the pages in a hot block are monitored. This may be done, for example, by comparing a list of pages in the hot block in a buffer pool directory with the page references performed by the system. Based on these monitored references, the system may determine, in operation 404, whether a portion of the hot block is below a hot block threshold. This hot block threshold may, for example, be in the form of a threshold number of references in a certain period of time (e.g., 1 reference every 5 seconds). The hot block threshold may be adjustable based on system configurations and user preferences. For example, users who are particularly concerned about using more space in the buffer pool than necessary may set the hot block threshold relatively high (e.g., 2 references every 4 seconds).This makes it less likely that a page in a hot block will stay above the hot block threshold. However, users who are particularly concerned about system efficiency may want to avoid LRU management locks while still maintaining fast access to the hot block, and can set the hot block threshold relatively low (e.g., 1 reference every 15 seconds). This makes it more likely that a page in a hot block will stay above the hot block threshold.
[0060] In some embodiments, the "portion of the block" mentioned in operation 404 may refer to the entire hot block. In other words, when making a determination in operation 404, in some embodiments the system may average the page references of each page in the hot block. For example, a hot block may contain 4 pages, of which the first three have been referenced 2 times in the last 20 seconds. However, the 4th page may have been referenced 14 times in the last 20 seconds. In this example, the system may calculate an average of the number of references for each page, resulting in an average of 4 references every 20 seconds for the entire hot block.
[0061] However, in some embodiments, the "portion of the block" mentioned in operation 404 may refer to an incomplete part of the hot block. For example, the first 50% of the pages in a hot block may still be referenced very regularly, but the second 50% of the pages in the hot block may be referenced very rarely. In this example, operation 404 may involve calculating whether the second 50% of the pages in the hot block are below the hot block threshold. In some embodiments, operation 404 may analyze the pages of the hot block to attempt to identify a series of contiguous pages for which the average number of references is below a hot block threshold.In some embodiments, operation 404 may also include determining whether a portion of the hot block containing infrequently referenced pages is large enough to have a significantly negative impact on the space available in the buffer pool. For example, in a system with a hot block threshold of 3 references every 10 seconds, if a portion of 2 contiguous pages in a 100-page hot block has not been referenced for over a minute, the system may ignore that portion because it is not sufficiently large to be relevant. However, in the same system, if a portion of 20 contiguous pages in a 500-page hot block has been referenced an average of three times every 12 seconds, the system may determine that the portion is below the hot block threshold.
[0062] If the system determines in step 404 that no section of the hot block is below the hot block threshold, the system continues monitoring the references to the pages in the hot block in step 402. However, if the system determines that at least one section of the hot block is below the hot block threshold, the system may create relocation groups in the hot block in step 406. These relocation groups may take the form of series of contiguous pages from the hot block that have similar reference patterns.
[0063] For example, a hot block may contain 10 pages. If the first four pages were referenced twice every five seconds on average, the fifth and sixth pages were referenced twice every 16 seconds on average, and the seventh through tenth pages were referenced once every 50 seconds on average, the system may form three relocation groups. The first relocation group may include the first four pages, the second relocation group may include the fifth and sixth pages, and the third relocation group may include the seventh through tenth pages. Forming relocation groups based on reference patterns of adjacent pages can be useful because it may be advantageous to relocate different rows of pages to different locations (e.g., to the LRU area or to disk).
[0064] However, as previously discussed, in some embodiments of method 400, the system may consider the page references of all pages of the hot block together (e.g., in a hot block average) when determining whether a portion of the hot block is below the hot block threshold at operation 404. In some of these embodiments, the system may further create relocation groups at operation 406. For example, at operation 202, the system may determine that a 10-page hot block in which the first 7 pages are above the hot block threshold but the last 3 pages are significantly below the hot block threshold is, on average, below the hot block threshold.The system can then create two relocation groups in step 406: The first relocation group can contain the first 7 pages, and the second relocation group can contain the last three pages.
[0065] However, in other such embodiments, the system may not create relocation groups in operation 406. Rather, if it is determined that the average reference time of all pages of a hot block is below the hot block threshold, the system may treat the entire block as being below the hot block threshold.
[0066] Forming relocation groups from different combinations of hot block pages can provide different benefits depending on system characteristics and user preferences. For example, a relocation group formed from the entire hot block may allow for faster relocation of pages within the hot block, since only one target location may be affected. However, if the hot block contains a number of contiguous non-hot pages, particularly near the end of the hot block (e.g., a number of the last 10 pages of a 30-page hot block), creating a relocation group with only these non-hot pages may allow the system to relocate the non-hot pages to a different location than the other pages.
[0067] In contrast, a relocation group can also be formed with individual pages. For example, a 10-page hot block can result in 10 relocation groups. This can be advantageous, for example, in hot blocks where there is no long series of consecutive pages that are above or below the hot block threshold. If the reference patterns of the pages in a hot block appear to be evenly and randomly distributed across the pages, it can be advantageous to treat each individual page as a relocation group.
[0068] Therefore, the granularity of the relocation groups can be fine-tuned to the specific situation. In some embodiments, non-hot single pages may be advantageous if the multiple pages below the hot block threshold are randomly distributed within the hot block. However, non-hot single pages require little storage space, and relocating them individually to disk or to the LRU region can lead to complications in managing records in the LRU region or records in the hot block region. For example, in a 40-page block, if 5 pages are moved to disk, six hot blocks may remain, each approximately 6 pages long.
[0069] Once the relocation groups have been created in step 406, the target positions of the relocation groups are calculated in step 408. These target positions can represent the locations to which each relocation group should be relocated. The target position of the relocation could be determined, for example, by comparing the average reference times of a relocation group with reference times in the LRU list. However, these target positions can also be based on individual reference times by comparing the reference time of each page with the reference times of each page in the LRU. While this can be beneficial to increase the probability that a page (or series of pages) will reach its correct target position, it can also consume a lot of system resources and lead to slowdowns. For example, in an LRU range of 10000 pages, comparing each relocation group with the reference times of 10,000 pages each would take a very long time.
[0070] Thus, in some embodiments of operation 408, the system could determine average positions in the LRU (or outside the LRU) to which relocation groups should be relocated. The granularity of these average positions can vary depending on how much a user values system efficiency (e.g., reducing administrative locks) and how much the user values confirming that each page in the hot block is moved to exactly the right position. For example, an average base position can be determined by comparing the average reference time of the relocation group to the highest and lowest reference times of the pages in the LRU list. If the average reference time of the relocation group is between these two times, the target position can be based on the relative proximity of the average reference time to these two times in the LRU list.For example, if the highest referral time in the LRU list is 110 seconds ago and the lowest referral time in the LRU list is 10 seconds ago, and the average referral time of the relocation group is 60 seconds ago (that is, halfway between the two times in the LRU list), the target for the relocation group can be the middle part of the LRU list.
[0071] On the other hand, a more complex average position can be determined by dividing the LRU into smaller chunks. For example, the LRU can be divided into quartiles (e.g., four equal rows of pages). Determining the average position of a relocation group, in this example, may first require determining the quartile in which the relocation group should be located. This can be done, for example, by comparing the relocation group reference times of each start and end page of each LRU quartile. Operation 408 can then also determine the approximate difference between the reference time of the relocation group and each start and end page and, based on this difference, approximate the correct position within the quartile.
[0072] In some embodiments, operation 408 may involve a very simple determination. For example, in some embodiments, operation 408 may involve identifying the most recently referenced page of the LRU and preparing to move the relocation groups to the page immediately before that most recently referenced page.
[0073] Once the target positions of the relocation groups have been determined in operation 408, the relocation groups are relocated to their respective target positions in operation 410. For example, a 20-page hot block may have been divided into five relocation groups in operation 406. The first and fifth relocation groups may have very recent average reference times, the second relocation group may have a reasonably recent average reference time, the third relocation group may have a slightly more recent average reference time, and the fourth relocation group may have a much more recent average reference time. In this example, operation 410 may involve relocating the second relocation group near the "beginning" of the LRU range (i.e.by moving the relocation group into the LRU region and adding the relocation group near the beginning of the LRU list, i.e., the section with the most recent references). In addition, operation 410 may also include moving the third relocation group near the "end" of the LRU region (i.e., the section of the LRU list opposite the "beginning" of the LRU list) and moving the fourth relocation group to a slower memory tier. In this example, operation 410 may also involve keeping the first and fifth relocation groups in the hot block region, resulting in two hot subblocks.
[0074] Once the relocation groups have been updated in operation 410, the buffer pool directory is updated in operation 412. The nature of the buffer pool directory updates may depend on the relocations that occurred in operation 410. For example, if a hot subblock remains in the hot block area (for example, the first and fifth relocation groups discussed above), the system may update the hot block entry to reflect, for example, the reduced number of pages in the hot block. In some cases, this may also include creating a second hot block entry (for example, for the fifth relocation group discussed above).
[0075] In some embodiments, updating the buffer pool directory may take into account which pages have been moved to the LRU and to which positions within the LRU. Furthermore, updating the buffer pool directory may take into account the pages in the relocation groups that have been moved to a slower storage tier. In other words, operation 412 may determine which pages have been removed from the buffer pool and update the buffer pool directory so that it no longer contains entries for those pages.
[0076] Fig.5 illustrates the primary components of an exemplary computer system 501 that may be used in accordance with some embodiments of the present disclosure. The particular components are illustrated merely as examples and do not necessarily represent the only such variations. The computer system 501 may include a processor 510, a main memory 520, an input / output interface (also referred to herein as I / O or I / O interface) 530, and a main bus 540. The main bus 540 may provide data transmission paths for the other components of the computer system 501. In some embodiments, the main bus 540 may be connected to other components, such as a specialized digital signal processor (not shown).
[0077] The processor 510 of the computer system 501 may include one or more CPUs 512. The processor 510 may additionally include one or more memory buffers or caches (not shown) that provide temporary storage of instructions and data for the CPU 512. The CPU 512 may execute instructions based on input provided from the caches or from main memory 520 and output the result to caches or to main memory 520. The CPU 512 may include one or more circuits configured to perform a method consistent with embodiments of the present disclosure. In some embodiments, the computer system 501 may include multiple processors 510, which is typical for a relatively large system. However, in other embodiments, the computer system 501 may consist of a single processor with a single CPU 512.
[0078] The main memory 520 of the computer system 501 may include a memory controller 522 and one or more memory modules for temporarily or permanently storing data (not shown). In some embodiments, the main memory 520 may include a semiconductor random access memory, a storage device, or a storage medium (either volatile or non-volatile) for storing data and programs. The memory controller 522 may communicate with the processor 510, enabling storage and retrieval of data to and from the memory modules. The memory controller 522 may communicate with the I / O interface 530, enabling storage and retrieval of inputs and outputs to the memory modules. In some embodiments, the memory modules may be dual in-line memory modules (DIMMs).
[0079] The I / O interface 530 may include an I / O bus 550, a terminal interface 552, a memory interface 554, an I / O device interface 556, and a network interface 558. The I / O interface 530 may connect the main bus 540 to the I / O bus 550. The I / O interface 530 may route instructions and data from the processor 510 and main memory 520 to the various interfaces of the I / O bus 550. The I / O interface 530 may also route instructions and data from the various interfaces of the I / O bus 550 to the processor 510 and main memory 520. The various interfaces may include the terminal interface 552, the memory interface 554, the I / O device interface 556, and the network interface 558. In some embodiments, the various interfaces may comprise a subset of the aforementioned interfaces (e.g.an embedded computer system in an industrial application may not include the terminal interface 552 and the memory interface 554).
[0080] Logic modules throughout computer system 501—including, but not limited to, main memory 520, processor 510, and I / O interface 530—may report failures and changes in one or more components to a hypervisor or operating system (not shown). The hypervisor or operating system, respectively, may allocate the various resources available in computer system 501 and track the location of data in main memory 520 and processes assigned to the various CPUs 512. In embodiments that combine or rearrange elements, aspects of the functions of the logic modules may be combined or distributed differently. These variations will be apparent to one of ordinary skill in the art.
[0081] The present invention may be a system, a method, and / or a computer program product at any possible level of technical detail of integration. The computer program product may comprise a computer-readable storage medium (or media) having computer-readable program instructions embodied thereon for causing a processor to perform aspects of the present invention.
[0082] The computer-readable storage medium may be any physical device that can retain and store instructions for use by an instruction-executing system. The computer-readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of the computer-readable storage medium includes the following: a removable computer diskette, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM).Flash memory), static random access memory (SRAM), removable compact disk read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device such as punched cards or raised structures in a groove on which instructions are stored, and any suitable combination thereof. A computer-readable storage medium, as used herein, shall not be construed as carrying transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., pulses of light traveling through an optical fiber cable), or electrical signals carried through a wire.
[0083] Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to respective computing / processing units or to an external computer or storage unit via a network such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, fiber optic transmission lines, wireless transmission, routers, firewalls, switching units, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing unit receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the respective computing / processing unit.
[0084] Computer-readable program instructions for performing operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, integrated circuit configuration data, or either source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, or the like, and procedural programming languages such as the "C" programming language or similar programming languages.The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the latter case, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, over the Internet using an Internet service provider).In some embodiments, electronic circuits, including, for example, programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute the computer-readable program instructions by utilizing state information of the computer-readable program instructions to personalize the electronic circuits to perform aspects of the present invention.
[0085] Aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowcharts and / or block diagrams, as well as combinations of blocks in the flowcharts and / or block diagrams, may be implemented by computer-readable program instructions.
[0086] These computer-readable program instructions may be provided to a processor of a computer or other programmable data processing device to produce a machine such that the instructions executing via the processor of the computer or other programmable data processing device produce a means for implementing the functions / steps defined in the block(s) of flowchart and / or block diagrams.These computer-readable program instructions may also be stored on a computer-readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable storage medium having instructions stored thereon comprises an article of manufacture, including instructions that implement aspects of the function / step specified in the flowchart block(s) and / or block diagrams.
[0087] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of process steps to be performed on the computer, other programmable apparatus, or other device to produce a computer-executable process such that the instructions executing on the computer, other programmable apparatus, or other device implement the functions / steps defined in the block(s) of flowcharts and / or block diagrams.
[0088] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this context, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions that include one or more executable instructions for performing the particular logical function(s). In some alternative implementations, the functions specified in the block may occur in a different order than shown in the figures.For example, two blocks shown in sequence may actually be executed in one step, concurrently, substantially concurrently, partially or completely overlapping in time, or the blocks may sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, as well as combinations of blocks in the block diagrams and / or flowcharts, may be implemented by special-purpose hardware-based systems that perform the specified functions or steps, or by combinations of special-purpose hardware and computer instructions.
Claims
[1] Method (100) comprising: detecting (102) a reference to a first page in a storage system; creating (104) a first candidate block for the first page based on the detection, the first candidate block comprising a continuous series of pages beginning with the first page; monitoring (106) subsequent references to pages within the first block in question; determining (110), based on the monitoring, that the first candidate block meets a first set of hot block requirements; moving (112) the first eligible block to a hot block area in a buffer pool based on the determination, resulting in a first hot block; and Moving the first page to an LRU area in the buffer pool based on the detection, wherein the moving comprises moving the first page from the LRU area to the hot block area. [2] The method of claim 1, wherein the first set of hot block requirements includes a requirement that 50% of the pages within the first eligible block be referenced. [3] The method of claim 1, further comprising: Creating, based on the determination, a second candidate block for a set of pages adjacent to the position of the first candidate block before relocation; and Determining that the second candidate block satisfies a second set of hot block requirements, wherein the second set of hot block requirements is relaxed compared to the first set of hot block requirements. [4] The method of claim 3, wherein the second set of hot block requirements includes a requirement that 50% of the first 50% of the pages within the second eligible block be referenced. [5] The method of claim 1, further comprising: after relocating, determining that a first portion of the first hot block is below a hot block threshold; based on determining that the first section of the first hot block is below the hot block threshold, moving the first section to an LRU area in the buffer pool. [6] The method of claim 5, wherein the first portion of the hot block comprises the entire first hot block. [7] The method of claim 5, wherein the first portion of the hot block comprises an incomplete part of the first hot block, and wherein the method further comprises: moving a second portion of the first hot block to a lower memory level; Maintaining a third portion of the first hot block in the hot block area. [8] The method of claim 5, wherein the first portion of the hot block comprises an incomplete part of the first hot block, and wherein the method further comprises relocating a second portion of the first hot block to a lower memory level. [9] The method of claim 5, further comprising determining a target position for the first section, wherein determining the target position for the first section comprises: Calculate an average page reference time for the first section; Calculating a first relative proximity between the average page referral time and a highest referral time in an LRU list for the LRU range; Calculating a second relative proximity between the average page referral time and a lowest referral time in an LRU list for the LRU range; and Comparing the first relative proximity and the second relative proximity. [10] System comprising: A processor (510); and A main memory (520) communicating with the processor, the main memory containing program instructions that, when executed by the processor, are configured to cause the processor to perform a method, the method comprising: detecting (102) a reference to a first page in a storage system; creating (104) a first candidate block for the first page based on the detection, the first candidate block comprising a continuous series of pages beginning with the first page; monitoring (106) subsequent references to pages within the first block in question; determining (110), based on the monitoring, that the first candidate block meets a first set of hot block requirements; moving (112) the first eligible block to a hot block area in a buffer pool based on the determination, resulting in a first hot block; and Moving the first page to an LRU area in the buffer pool based on the detection, wherein the moving comprises moving the first page from the LRU area to the hot block area. [11] The system of claim 10, wherein the method further comprises: Creating, based on the determination, a second candidate block for a set of pages adjacent to the position of the first candidate block before relocation; and Determining that the second candidate block satisfies a second set of hot block requirements, wherein the second set of hot block requirements is relaxed compared to the first set of hot block requirements. [12] The system of claim 10, wherein the method further comprises: after relocating, determining that a first portion of the first hot block is below a hot block threshold; based on determining that the first section of the first hot block is below the hot block threshold, moving the first section to an LRU area in the buffer pool. [13] The system of claim 12, wherein the first portion of the hot block comprises the entire first hot block. [14] The system of claim 12, wherein the first portion of the hot block comprises an incomplete part of the first hot block, and wherein the method further comprises: moving a second portion of the first hot block to a lower memory level; Maintaining a third portion of the first hot block in the hot block area. [15] The system of claim 12, wherein the first portion of the hot block comprises an incomplete part of the first hot block, and wherein the method further comprises relocating a second portion of the first hot block to a lower memory level. [16] The system of claim 12, wherein the method further comprises determining a target position for the first section, wherein determining the target position for the first section comprises: Calculate an average page reference time for the first section; Calculating a first relative proximity between the average page referral time and a highest referral time in an LRU list for the LRU range; Calculating a second relative proximity between the average page referral time and a lowest referral time in an LRU list for the LRU range; and Comparing the first relative proximity and the second relative proximity. [17] A computer program product, the computer program product comprising a computer-readable storage medium having program instructions embodied therein, the program instructions being executable by a computer to cause the computer to: detecting (112) a reference to a first page in a storage system; creating (104) a first candidate block for the first page based on the detection, the first candidate block comprising a continuous series of pages beginning with the first page; monitoring (106) subsequent references to pages within the first block in question; determining (110), based on the monitoring, that the first candidate block meets a first set of hot block requirements; moving (112) the first eligible block to a hot block area in a buffer pool based on the determination, resulting in a first hot block; and Moving the first page to an LRU area in the buffer pool based on the detection, wherein the moving comprises moving the first page from the LRU area to the hot block area. [18] The computer program product of claim 17, wherein the program instructions further cause the computer to do the following: Creating, based on the determination, a second candidate block for a set of pages adjacent to the position of the first candidate block before relocation; and Determining that the second candidate block satisfies a second set of hot block requirements, wherein the second set of hot block requirements is relaxed compared to the first set of hot block requirements. [19] The computer program product of claim 17, wherein the program instructions further cause the computer to do the following: after relocating, determining that a first portion of the first hot block is below a hot block threshold; based on determining that the first section of the first hot block is below the hot block threshold, moving the first section to an LRU area in the buffer pool. [20] The computer program product of claim 19, wherein the first portion of the hot block comprises the entire first hot block. [21] The computer program product of claim 19, wherein the first portion of the hot block comprises an incomplete part of the first hot block, and wherein the method further comprises: moving a second portion of the first hot block to a lower memory level; Maintaining a third portion of the first hot block in the hot block area. [22] The computer program product of claim 19, wherein the program instructions further cause the computer to perform determining a target position for the first section, wherein determining the target position for the first section comprises: Calculate an average page reference time for the first section; Calculating a first relative proximity between the average page referral time and a highest referral time in an LRU list for the LRU range; Calculating a second relative proximity between the average page referral time and a lowest referral time in an LRU list for the LRU range; and Comparing the first relative proximity and the second relative proximity.
Citation Information
Patent Citations
Main memory device having heterogeneous memories, computer system including the same, and data management method thereof
US20200218668A1