SYSTEM, METHOD, AND APPARATUS FOR ELIMINATING DUPLICATIONS AND VALUE REDUNDANCY IN COMPUTER MEMORY - Patent application

The method and apparatus in computer memory combine deduplication and value redundancy removal to minimize metadata and latency, ensuring high compressibility despite dynamic data changes.

JP7571026B2Active Publication Date: 2024-10-22ZEROPOINT TECH AB
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2021538111
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-01-11
Filing Date
2020-01-09
Publication Date
2024-10-22
Estimated Expiration
2040-01-09

AI Technical Summary

Technical Problem

Existing data compression methods in computer memory fail to effectively combine deduplication and value redundancy removal, leading to high metadata overhead and increased memory latency, while dynamic changes in data objects complicate maintaining high compressibility.

Method used

A method and apparatus that analyze computer memory for duplicate objects and value redundancy, encode unique objects using data value locality, provide metadata for location, and utilize a combined compression approach to minimize metadata and latency.

Benefits of technology

The solution reduces metadata overhead and memory latency by efficiently eliminating duplicates and value redundancy, maintaining high compressibility even with dynamic data changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007571026000001
    Figure 0007571026000001
  • Figure 0007571026000002
    Figure 0007571026000002
  • Figure 0007571026000003
    Figure 0007571026000003
Patent Text Reader

Abstract

The computer memory compression method includes analyzing (1210) computer memory content for occurrences of duplicate memory objects and value redundancy of data values ​​in unique memory objects. The computer memory content is encoded (1220) by eliminating duplicate memory objects and compressing each remaining unique memory object by exploiting data value locality of its data values. Metadata (500) is provided (1230) to represent the memory objects in the encoded computer memory content. The metadata reflects the eliminated duplicate memory objects, the remaining unique memory objects, and the type of compression used to compress each remaining unique memory object. Memory objects in the encoded computer memory content are located (1240) using the metadata (500).
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The subject matter relates generally to the field of data compression in memories within electronic computers. [Background technology]

[0002] Data compression is a common technique for storing and transferring data more efficiently by encoding frequent collections of data more efficiently than infrequent collections of data. In general, it is interesting to store and transfer data more efficiently for many reasons. It is interesting to store said data more efficiently, e.g., K times more efficiently, in computer memory, e.g., memory that holds data and computer instructions on which a processing device operates, e.g., main memory or cache memory. This is because it can reduce the communication capacity potentially used to transfer data between one memory and another by a factor of K, reduce the energy consumption potentially to store and transfer said data within or between computer systems and / or between memories by a factor of K, and reduce the size of said memory potentially by a factor of K. Alternatively, it can store K times more data in the available computer memory than would be possible without data compression. This can be interesting to achieve potentially K times higher performance of the computer without the need to add more memory. This can be costly or simply undesirable due to resource constraints. As another example, the size and weight of a smartphone, tablet, lap / desktop, or set-top box may be limited because a larger or heavier smartphone, tablet, lap / desktop, or set-top box is less valuable to an end user, thus potentially reducing the market value of such a product. However, a larger memory capacity or memory communication bandwidth can potentially increase the market value of the product because the larger memory capacity or memory communication bandwidth increases the product's performance and therefore its usefulness.

[0003] In summary, in the general context of computerized products that include separated or interconnected devices, data compression can potentially improve performance, lower energy consumption, increase memory communication bandwidth, or reduce the cost and area consumed by memory. Data compression thus has broad utility in a wide range of computerized products other than those mentioned herein.

[0004] Prior art compressed memory systems typically compress memory pages as they are created, either by reading them from disk or through memory allocation. Compression can be accomplished using a variety of well-known methods, either by software routines or hardware accelerators. When a processor requests data from memory, the data must typically first be decompressed before the processor can perform the requested operation. Because such requests may result in a critical memory access path, decompression is typically accelerated in hardware so that it has little impact on memory access times.

[0005] In one compression approach, called deduplication, the idea is to identify identical memory objects. For example, assume that the memory contains five identical instances of the same page. Then only one of them needs to be stored, and the remaining four can only refer to that instance, thus providing a 5x compression ratio. Deduplication known in the prior art has been applied to fixed-size objects ranging in granularity, such as memory pages, whose sizes are typically on the order of a few kilobytes (KB) to tens of kilobytes or more, and memory blocks, whose sizes are typically tens of bytes, e.g., 64 bytes (64B). Other prior art techniques consider variable granularity, such as variable-sized storage files. In any case, the limitation of deduplication is that it is based only on removing duplicate occurrences of identical memory objects.

[0006] When removing an identical object, the removed object needs to establish a reference to the only object that is identical to it. A reference is like a pointer, pointing to a unique copy of a memory object, which consumes memory space. Therefore, deduplication can lead to significant compression metadata overhead. For example, 1 terabyte = 2 40 64B (=2 bytes) in memory 6 Suppose deduplication is applied to a memory block of size 40 - 6 = 34 bytes. Then we need a (40 - 6 = 34) bit reference pointer to point to a unique copy of the deduplicated memory block.

[0007] Alternative compression approaches known from the prior art exploit value redundancy (e.g., for a single word of 32 or 64 bits). For example, memory objects that are more common than others are encoded with fewer bits than less common memory objects. As an example, entropy-based compression techniques are abundant in the prior art, including, for example, Huffman coding and arithmetic coding. Other compression techniques include Base-Delta-Immediate compression, which exploits that numerical values ​​stored in data objects, e.g., memory pages and blocks, are numerically close to each other and tightly encode the differences between them.

[0008] Importantly, deduplication, which removes duplicates, and compression techniques that exploit value locality, such as entropy-based compression and base delta immediate compression, which remove value redundancy, are complementary in many ways. For example, in page-based deduplication, a single copy of the same page is stored, while a reference pointer is provided from the copy to reference the unique copy. However, such deduplication schemes do not exploit value redundancy that exists at a finer granularity, for example at the word level (e.g., 32-bit or 64-bit entities) within a page. By combining deduplication with a compression scheme that reduces value redundancy, it is possible to eliminate duplicates and store the remaining unique copies much more densely by encoding each data value in the unique copy based on statistical properties. The purpose of this document is to disclose the present invention to provide an apparatus, system, and method for a family of compression techniques applied to computer memory that eliminates duplicates and value redundancy. Summary of the Invention [Problem to be solved by the invention]

[0009] Combining deduplication with value locality based compression opens up a number of technical challenges. The first challenge is how to find an encoding that combines and improves compressibility by removing duplicates and by compressing items in the remaining unique copies using a value locality based approach. Using a combined approach of deduplication and value locality based compression opens up the challenge of keeping the amount of metadata low and allowing the compression and decompression device to have low memory latency overhead in order to efficiently locate memory blocks in the compressed memory. Therefore, the second challenge is to come up with a compression and decompression method, device and system that can keep the amount of metadata low as well as the memory latency overhead low. In operation, the data object changes in response to processor writes. This has the effect that the nature of the duplicated unique blocks changes, both in terms of the number of duplicates and in terms of the statistical nature of the value locality of the remaining unique copies. The third challenge is to provide a method, device and system that can keep the compressibility high in light of such dynamic effects. The disclosed invention is intended to address all of these challenges and others. [Means for solving the problem]

[0010] A first aspect of the present invention is a method of computer memory compression. The method includes analyzing computer memory content for occurrences of duplicate memory objects and value redundancy of data values ​​in unique memory objects. The method also includes encoding the computer memory content by removing the duplicate memory objects and compressing each remaining unique memory object by exploiting data value locality of its data values. The method further includes providing metadata representing the memory objects of the encoded computer memory content. The metadata reflects the type of compression used to compress the removed duplicate memory objects, the remaining unique memory objects, and each remaining unique memory object. The method also includes locating memory objects within the encoded computer memory content using the metadata.

[0011] A second aspect of the present invention is a computer memory compression apparatus. The apparatus comprises an analyzer unit configured to analyze computer memory content for occurrences of duplicate memory objects and value redundancy of data values ​​in unique memory objects. The apparatus also comprises an encoding unit configured to encode the computer memory content by removing the duplicate memory objects and compressing each remaining unique memory object by exploiting data value locality of its data values. The encoding unit is further configured to provide metadata representative of the memory objects of the encoded computer memory content. The metadata reflects a type of compression used to compress the removed duplicate memory objects, the remaining unique memory objects, and each remaining unique memory object. The apparatus also comprises a locator unit configured to locate memory objects within the encoded computer memory content using the metadata.

[0012] Other aspects, objects, features, and advantages of the disclosed embodiments will become apparent from the following detailed disclosure, the appended dependent claims, and the drawings.

[0013] In general, compression by exploiting data value locality as described in this document may include, but is not limited to, entropy-based encoding, delta encoding, dictionary-based encoding, or pattern-based encoding.

[0014] In general, all terms used in the claims should be interpreted according to their ordinary meaning in the art, unless expressly defined otherwise herein. Any reference to "a / the [element, apparatus, component, means, step, etc.]" should be openly interpreted as referring to at least one instance of the element, apparatus, component, means, step, etc., unless otherwise stated. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated. [Brief description of the drawings]

[0015] [Figure 1] 1 illustrates a computer system including a microprocessor chip having one or more processing units, an exemplary cache hierarchy consisting of three levels, and one or more memory controllers connected to one or more off-chip memories. [Diagram 2] 2 illustrates a computer system, such as that of FIG. 1, configured to compress data and instructions in memory. [Diagram 3] 1 illustrates an exemplary memory page layout before and after applying deduplication and value redundancy removal compression methods. [Figure 4] 1 illustrates an exemplary layout of a tree-based data structure for tracking unique blocks within a page. [Diagram 5] A metadata structure and example usage for compressing memory pages using a combination of deduplication and other compression methods is presented. [Figure 6]1 shows a flow graph of the deduplication process. [Figure 7] 1 shows a flow graph of a value redundancy elimination compression method. [Figure 8] 1 illustrates an exemplary memory change in response to a modification of a native memory block. [Figure 9] 1 illustrates exemplary memory changes in response to modifying a deduplicated memory block. [Figure 10] 1 illustrates an address translation unit for establishing memory block locations using deduplication and value redundancy removal compression methods. [Figure 11] 1 illustrates a decompressor unit for decompressing memory blocks using deduplication and value redundancy removal compression. [Figure 12] 1 shows a general flow chart of a computer memory compression method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] This document discloses a system, method, and apparatus for compressing data in a computer memory using a family of compression approaches that eliminate duplication and value redundancy in the computer memory.

[0017] An exemplary embodiment of a computer system 100 is shown in FIG. 1. The system includes a microprocessor 110 and M1151, M2152 through M K 153. The microprocessor chip may be a discrete system or may be integrated on a system-on-chip (SoC) in any available technology. The microprocessor 110 includes P1131, P2132 to P N133, which may be referred to as CPUs or cores, is a memory hierarchy. The memory hierarchy, in turn, includes multiple cache levels, e.g., three levels exemplarily shown in FIG. 1 and labeled C1, C2, and C3. These levels may be implemented with the same or different memory technologies, e.g., SRAM, DRAM, or any type of non-volatile technology, including, e.g., phase change memory (PCM). The number of cache levels may vary in different embodiments, and the exemplary embodiment 100 shows three levels, with the last cache level being C3 120. These levels are connected using some kind of interconnection means (e.g., a bus or any other interconnection network). In the exemplary embodiment, levels C1 and C2 are connected to the respective processing units P i (e.g., P1 in FIG. 1) and accessible only by it. Alternative embodiments can have any number of private cache levels, or alternatively, all cache levels are shared as shown by the third level C3 120 in FIG. 1, as will be appreciated by those of skill in the art. Any embodiment is possible and would be understood by one of skill in the art regarding the inclusion of data in the cache hierarchy. For example, C1 can be included in C2, but C2 can be non-inclusive with respect to level C3. Alternative embodiments can be appreciated by one of skill in the art. The computer system 100 of FIG. 1 includes MCTRL1 141, MCTRL2 142 through MCTRL L The microprocessor system includes one or more memory controllers labeled 143. The final cache level (C3 in FIG. 1) is connected to the memory controller, which in turn is connected to one or more memory modules. The memory controller may be integrated on the microprocessor chip 110 or implemented off the microprocessor chip. Finally, the computer system executes one or more tasks. A task may be any software application, or part thereof, that can be executed on a particular system.

[0018] As illustrated by the embodiment of FIG. 1, the computer system includes M1151 to M1152 regardless of the level (e.g., C1, C2, and C3 in FIG. 1). K A limited capacity of memory and cache memories, such as that labeled 153, may cause a higher percentage of memory requests to be serviced at the next level in the memory hierarchy, leading to reduced performance or increased energy consumption. To alleviate this problem, one may consider increasing the cache capacity. This may reduce the number of requests that need to be serviced at the next level in the memory hierarchy. Increasing the capacity of cache levels on a microprocessor chip may result in a number of problems. First, cache access request times may increase, leading to reduced performance. Second, the energy consumed for access requests to a larger cache may potentially be higher. Third, the use of more silicon or equivalent material on a microprocessor chip to realize a larger cache level may come at the expense of less processing power. It is therefore desirable to have a larger cache capacity without the above problems. A limited memory capacity may cause a similar problem, with an increased number of memory requests that need to be serviced at the next level in the memory hierarchy, which is usually realized as a storage level in the memory hierarchy. Accesses to such a storage level may be slower, resulting in a significant loss in performance and energy consumption. Increasing memory capacity can alleviate these drawbacks. However, increasing memory capacity can make computer systems more costly, both at the component level and in terms of energy consumption. Furthermore, more memory consumes more space, which can limit the usefulness of computer systems, especially in form-factor constrained products, including, for example, mobile computers (e.g., tablets, smartphones, wearables, and small computerized devices connected to the Internet).

[0019] The present disclosure contemplates several embodiments that differ in which level of the exemplary memory hierarchical compression described above is applied. A first embodiment contemplates that the compression method of the present invention is applied to main memory. However, one of ordinary skill in the art will appreciate other embodiments. Such embodiments are intended to be contemplated, although not expressly included in this patent disclosure.

[0020] With respect to a first disclosed embodiment that takes into account the challenge of limited main memory capacity, the exemplary system of FIG. 1 can be configured to allow data and instructions to be compressed in main memory. FIG. 2 shows an example of such a computer system 200. Added is a computer memory compression device 205 on a microprocessor chip 210. The computer memory compression device 205 comprises four functional blocks. These blocks include a locator (address translation) unit 211, an encoding (compressor) unit 212, a decompressor unit 213, and an analyzer unit 214.

[0021] As described in more detail below, the analyzer unit 214 is configured to analyze the computer memory content for occurrences of duplicate memory objects and value redundancy of data values ​​in unique memory objects. In this regard, data values ​​are typically at a finer granularity than memory objects, which are typically at a finer granularity than computer memory content. The computer memory content may typically be pages of computer memory, and the memory objects may typically be memory blocks, each of which may typically include multiple data values, such as memory words.

[0022] The encoding unit 212 is configured to encode the computer memory content by eliminating duplicate memory objects and compressing each remaining unique memory object by exploiting data value locality of its data values. The encoding unit 212 is further configured to provide metadata 500 that represents the memory objects of the encoded computer memory content. The metadata reflects the eliminated duplicate memory objects, the remaining unique memory objects, and the type of compression used to compress each remaining unique memory object. An example of such metadata can be seen, for example, at 500 in FIG. 5. The locator unit 211 is configured to use the metadata to locate the memory objects in the encoded computer memory content.

[0023] A corresponding general computer memory compression method 1200 is shown in Figure 12. The method includes analyzing 1210 the computer memory content for occurrences of duplicate memory objects and value redundancy of data values ​​in unique memory objects. The method further includes encoding 1220 the computer memory content by eliminating duplicate memory objects and compressing each remaining unique memory object by exploiting data value locality of its data values. The method also includes providing 1230 metadata 500 representing the memory objects of the encoded computer memory content. The method further includes 1240 locating memory objects within said encoded computer memory content using the metadata 500. The computer memory compression method 1200 may generally include functional steps corresponding to functions performed by any or all of the structural features and embodiments of computer memory compression device 205 as described throughout this specification.

[0024] The computer memory compression device 205 is connected to the memory controller on one side and to the last level cache C3 on the other side. The purpose of the address translation unit 211 is to translate a conventional physical address PA to a compressed address CA to locate the memory block in the compressed memory. Those skilled in the art will appreciate that such address translation is necessary because a conventional memory page (e.g., 4KB) can be compressed to any size in the compressed memory. The purpose of the encoding (compressor) unit 212 is to compress memory blocks that have been modified and evicted from the last level cache. To have a negligible impact on the performance of the memory system, the compression needs to be fast and is usually accelerated by a dedicated compressor unit. Similarly, if a memory block is required by the processor and none of the cache levels, e.g., C1, C2 and C3 in the exemplary embodiment, is available, the memory block must be requested from memory. The address translation unit 211 locates the block, but it must be decompressed before it is installed in the cache hierarchy, e.g., C1. The purpose of the decompressor unit 213 is to accelerate this process to have a negligible impact on the performance of the memory system.

[0025] Those skilled in the art can understand that the functionality of the compressor and decompressor units depends on the type of compression algorithm being used. In one embodiment, delta coding (such as base delta immediate coding) can be used, where the difference between a value and a base value is stored, rather than the value itself. In another embodiment, entropy-based coding (such as Huffman coding) can be used, where values ​​that are more frequent than other values ​​use denser codes. In a third embodiment, deduplication can be used, where only unique blocks are stored in memory. The objective of this disclosure is to cover all compression algorithms to remove value redundancy.

[0026] In accordance with an embodiment consistent with FIG. 2, the remainder of the document describes below structures that provide apparatus, methods and systems using a combined compression approach based on deduplication and value redundancy removal compression with respect to how to encode computer memory content (e.g., memory pages), how to locate memory objects (e.g., memory blocks) within the compressed memory, how to compress and decompress individual memory objects (e.g., memory blocks), and finally, how to recompress the computer memory content (e.g., memory pages) to remove additional duplication and value redundancy.

[0027] (Memory page data analysis and encoding) An exemplary overview of how a memory page is compressed using deduplication in combination with entropy-based compression in FIG. 3 is provided. However, it should be noted that other value redundancy removal compression methods such as delta encoding (e.g., base delta immediate encoding) are also possible. An exemplary layout 300 of a page is shown at (A) on the left side of FIG. 3 and includes N blocks numbered 1, 2, ..., N that appear at consecutive memory block addresses in a conventional uncompressed computer memory, with 310 representing the first memory block and 320 representing the last memory block. The aim of deduplication is to remove duplicate blocks so that only unique blocks belong to a memory page. In the exemplary layout 300 of memory blocks in a page shown at (B) in the center of FIG. 3, the memory blocks represented by 340 and 350 are duplicates. Instead of storing duplicate data in memory, only references (e.g., pointers) to unique blocks are stored, as will be described in more detail below. Memory block 350 references memory block 2 (330) using a pointer labeled 370. Similarly, memory block 340 references memory block 1 using a pointer labeled 360. Thus, after the deduplication process, the memory page contains only memory blocks that have distinct contents and are referred to as unique memory blocks.

[0028] The prior art also includes compression methods that encode frequently used data more densely than infrequently used data, such as Huffman coding, or compression methods that exploit numerical similarity, such as delta coding (e.g., base delta immediate coding). These compression methods are called value redundancy elimination compression methods. To compress a page using a value redundancy elimination compression method, one typically analyzes all individual data items at some granularity, for example, at the word level (e.g., 64 bits). Value frequency distribution captures the relative occurrence of different values ​​within a page. However, when applied simply to the original contents of a memory page, before deduplication, the value distribution may change dramatically if duplicates are present. For this reason, the proposed embodiment applies deduplication first to remove duplicates and then establishes the value distribution of the remaining unique memory blocks. The right-most exemplary layout seen in (C) of FIG. 3 shows the result after applying value redundancy elimination compression. The size of the unique memory blocks, indicated by 1 (380) and 2 (390), may now be smaller. This is because value redundancy elimination compression allows frequent data items to be coded more densely than less frequent data items.

[0029] We now turn our attention to how the combined approach is realized, as illustrated in FIG. 3. This will be explained in relation to FIGS. 4-7. As explained in the previous paragraph, in order to realize the full potential of value redundancy elimination compression in combination with deduplication, it is important to perform deduplication first. In one embodiment, deduplication can be realized by sequentially analyzing all memory blocks in a single page, without excluding the possibility of considering all memory blocks in multiple pages, with the aim of establishing whether it is unique or not. For this purpose, the first memory block analyzed is always classified as unique. Turning our attention to FIG. 4, the exemplary tree data structure 400 records all unique blocks. Before a block is inserted, we create a signature of the block, as known from the prior art. The signature is a dense representation of the value of the block, with the property that if the signatures of two memory blocks are different, they are not identical. However, the reverse may not be true.

[0030] To establish whether a memory block is unique and must be inserted into the tree-based data structure, its signature is first compared to the signature of the top node 410 in the tree data structure 400. If they are the same, a second test is performed to compare the contents of the two memory blocks. If the memory blocks are identical, a duplicate block has been detected. This same operation is performed for each node in the tree-based data structure. However, if the signatures are the same but the two blocks are not identical, a new block must be inserted with the same signature. This may include the following additional tests to handle false positives: If the created signature S matches 650 the signature represented in the tree data structure 400, determining whether the distinct memory object is identical to the unique memory block represented by the matching signature; If the distinct memory object and the unique memory block represented by the matching signature are not identical, Inserting a node into the tree data structure 400; Enter the created signature S into the inserted node; generating metadata 500 for the individual memory object using information indicating that it is a unique memory object 510 and a unique memory object reference (530, U_PTR) for the individual memory object; Includes.

[0031] On the other hand, if the signatures do not match, the search proceeds to the left branch of the tree according to the test at 460 if the signature is less than that of the top node 410. If the signature is greater than that of the top node, the search proceeds to the right branch of the tree according to the test (box 470). Thus, all nodes 410, 420, 430, 440 and 450 are organized in descending (left branch) and ascending (right branch) order, making the search time logarithmic rather than linear. The memory blocks are not at the same address as the conventional uncompressed pages, since duplicates are eliminated in the process. For this reason, the new location of the block is recorded in the tree-based data structure, as indicated in each node by "Block Location_BL".

[0032] The end result of the deduplication process is that all duplicate memory blocks have been eliminated. Therefore, as explained in relation to Figure 3, memory blocks may not be in the same location in the same deduplicated page as in the original non-deduplicated page. For this reason, the deduplication process needs to generate metadata to aid in how memory blocks are located in compressed memory and to further refine it later.

[0033] FIG. 5 shows, on the left (A), exemplary metadata 500 generated in the process for each memory block. The metadata 500 consists of four components: Type (510), Block Encoding ENC (520), U_PTR (530), and D_PTR (540). Type indicates whether the block is unique or duplicated. Block encoding, indicated by ENC, indicates the type of compression algorithm applied to the memory block contents, e.g., Huffman or Arithmetic Encoding. If the memory block is unique, a pointer is needed to locate it. This is represented by U_PTR (530). On the other hand, if the block is duplicated, a pointer to a unique copy is needed. Similar to the unique copy, U_PTR (530) points to the unique copy in compressed memory.

[0034] The right side of FIG. 5 shows, at (B), an exemplary layout of three selected memory blocks in a page, where memory block 570 is unique and memory blocks 580 and 590 are duplicates of memory block 570. Here, the U_PTR of the duplicate points to unique memory block 570. However, during operation, it may happen that the unique block is modified. In that case, according to boxes 580 and 590, it may not contain the same content as the duplicate block. For this reason, it is necessary to track the duplicates from the perspective of the unique memory block. For this purpose, pointers are provided, denoted D_PTR. These pointers establish a link data structure that links all duplicate memory blocks together with their corresponding unique memory blocks. In this example, the D_PTR (550) of unique memory block 570 points to duplicate memory block 580. The D_PTR of duplicate memory block box 580 points to another duplicate memory block 590.

[0035] Thus, in summary, the metadata 500 advantageously provides, for each memory object in the encoded computer memory content: Information 510 indicating that the memory object is an eliminated duplicate memory object or a remaining unique memory object; If the memory object is a native memory object, information 520 indicating the type of compression used, and a native memory object reference (530, U_PTR) to the native memory object; If the memory object is a duplicate memory object, a unique memory object reference (530, U_PTR) to the unique memory object, whose uncompressed content is identical to the duplicate memory object; and Includes.

[0036] Advantageously, the metadata 500 further includes a duplicate memory object reference 540, D_PTR, to the eliminated duplicate memory object, since each memory object is a unique memory object, the uncompressed content of which is identical to the unique memory object.

[0037] Here we establish the whole process by which memory blocks are deduplicated by analyzing all memory blocks in one page (other granularities such as multiple pages are also applicable). This process is illustrated in the flow graph of FIG. 6. As already mentioned in relation to FIG. 4, the process 600 of deduplicating memory blocks uses a tree-based data structure 400 that finally contains all unique memory blocks. The process 600 sequentially analyzes all memory blocks of a page. A first decision step 620 checks whether all memory blocks of a page have been visited. If not, the next memory block is considered. As explained in relation to FIG. 4, a signature of the block is created according to any method known in the prior art and the signature is compared with all nodes in the tree as long as no match is found. In the end, there are two outcomes. If the block is unique, the block is inserted in 660 as tested in the determining step 640. The memory block position is then recorded together with the number of memory blocks in the page. If the block is not unique, it is deduplicated at 650 and a pointer to the block location of the unique block already recorded in the tree-based data structure is assigned to the U_PTR pointer in the metadata (see 530) according to Figure 5. Regardless of the outcome, the next action is to return to decision step 620 and analyze the next memory block of the page.

[0038] As can be seen from the description of Figures 4-6, the analyzer unit 214 and the encoding unit 212 of the computer memory compression device 205 therefore parse each individual memory object in the computer memory content as follows: creating a signature S, the signature being a dense representation of the data values ​​of the memory object; traversing the tree data structure 400 and comparing said created signature S with signatures already represented in the tree data structure 400; if the created signature S does not match any of the signatures represented in the tree data structure 400 660 , Inserting a node into the tree data structure 400; Enter the created signature S into the inserted node; generating metadata 500 for the individual memory object using information indicating that it is a unique memory object 510 and a unique memory object reference (530, U_PTR) for the individual memory object; If the created signature S matches 650 a signature represented in the tree data structure 400, generating metadata 500 for the individual memory object using information indicating that it is a duplicate memory object 510 and a unique memory object reference (530, U_PTR) to the unique memory block represented by the matching signature in the tree data structure 400; updating the metadata 500 of the unique memory blocks represented by the matching signatures in the tree data structure 400 to introduce duplicate memory object references (540, D_PTR) to the distinct memory objects; The processing unit 600 is configured to perform the process by performing the process.

[0039] As pointed out, applying deduplication before any compression method that aims to exploit the value locality of individual data items, for example at the word level, is important since duplicates do not properly represent the value frequency distribution. For this purpose, a process is needed that establishes the value frequency distribution of unique blocks. Such a process 700 is shown in FIG. 7. The aim of the overall process 700 is to analyze all unique memory blocks recorded in the tree-based data structure 400 of FIG. 4. The process 700 starts at step 710. As long as all unique memory blocks have not been visited (step 720), the process 700 records the value frequency of each visited unique block. This can be done by recording the frequency of each individual value in a hash table at step 730. Finally, the value frequencies of all unique memory blocks can be established and an encoding based on any value locality-based compression method, such as Huffman encoding or arithmetic encoding, can be established at step 740.

[0040] Therefore, the analyzer unit 214 and the encoding unit 212 of the computer memory compression device 205 determine if all memory objects in the computer memory content have been processed 600. traversing the tree data structure 400 to generate a value frequency table for the data values ​​of the unique memory objects represented by the nodes of the tree data structure 400; compressing each unique memory object by an entropy-based compression scheme using the generated value frequency table; The method may be configured to:

[0041] In one such embodiment, the analyzer unit may implement a hash table that records the frequency of each value to be used for later analysis, perhaps using software routines to establish the encoding, e.g., using Huffman encoding or other entropy-based encoding techniques.

[0042] In an alternative embodiment, delta encoding (e.g., base delta immediate encoding) can be used to select one or more base values ​​using the values ​​remaining after duplicates are removed. In one approach, clustering techniques can be used to analyze which base value is closest to all values ​​in the unique copies in the page after duplicates are removed.

[0043] Therefore, alternatively, the analyzer unit 214 and the encoding unit 212 of the computer memory compression device 205 may determine if all memory objects in the computer memory content have been processed 600: traversing the tree data structure 400 to generate a value frequency table for the data values ​​of the unique memory objects represented by the nodes of the tree data structure 400; compressing each unique memory object by an entropy-based compression scheme using the generated value frequency table; The method may be configured to:

[0044] (locating memory blocks in compressed memory) We now turn our attention to how memory blocks are located and decompressed in compressed memory using a combined deduplication and value redundancy removal compression technique. Returning to FIG. 2, recall that the task of the Locator (Address Translation) Unit 211 is to translate conventional physical addresses into addresses in the compressed address space. FIG. 10 shows a detailed layout 1000 of the Locator (Address Translation) Unit 211 of FIG. 2. It contains several page entries, each of which 1010 contains several fields, namely a physical address 1011 and a compressed address 1012. These correspond to the physical address and compressed address of the page, respectively. As seen in 1021-1023 of FIG. 5, each page entry is associated with metadata MD 1, ..., MD N of each block. For details of the metadata, as mentioned above, see the leftmost part (A) of FIG. 5. As shown in FIG. 5, whether the memory block is unique or deduplicated, the U_PTR serves as an offset to the location of the block relative to the compressed address CA. An adder 1030 forms a block address 1040 by establishing the sum of U_PTR and the compressed address CA 1012 .

[0045] One of the processors in Figure 2 (P1 to P NWhen a read request from a cache level (denoted as C1, C2 or C3) that cannot be satisfied by any of the cache levels (C1, C2 or C3) is processed by the locator (address translation) unit 211 / 1000 in FIG. 2 / FIG. 10, the physical address PA is translated according to the process described above using the compressed address CA associated with PA along with the metadata of the requested block. However, if a write request cannot be satisfied by any level of cache, the write may affect which blocks are unique and which blocks are deduplicated. Consider the leftmost scenario (A) in FIG. 8, where a unique block is represented by 830. Two deduplicated blocks, represented by 810 and 820, have the same content and their U_PTRs point to unique block 830. The deduplicated memory blocks 810, 820 are linked to unique block 830 by having the unique block's D_PTR point in memory block 820 and the same block's D_PTR point in memory block 810.

[0046] Now assume that a write request is addressed to unique memory block 830 and look at the right-most scenario (B) in FIG. 8. Since a duplicate of unique memory block 830 exists, it may be desirable to preserve that memory block. This is done using a dedicated free memory area represented by 840 in FIG. 8. This is to copy the old contents of unique memory block 830, possibly in pages, but not necessarily. The current starting address 805 of that free memory area is pointed to by reference, for example by a dedicated pointer denoted F_PTR. The old contents of unique memory block 830 are copied to the free area 840 as seen at 870, and the U_PTRs of the deduplicated memory blocks 810, 820 now point to the old unique memory blocks present in 870. Additionally, the D_PTRs are modified to link the deduplicated memory blocks 810, 820 to the old unique memory blocks present in 870. Alternatively, only the D_PTR of block 870 is updated to point to block 820, while the remainder of the D_PTR remains as seen in the leftmost portion (A) of Figure 8, i.e., only the head of the linked list is updated. The unique memory block residing in the original location, i.e., at 830, can now be updated with the new contents in accordance with the write request. The F_PTR is also updated to reflect the changed starting address of the free memory region, as shown at 880.

[0047] Another way to process a write request addressed to the unique memory block 830 of FIG. 8 is as follows. However, please note that the details of FIG. 8 do not reflect the following description. The deduplicated memory block 820 is promoted as unique in the tree data structure 400 (see FIG. 4) by using the signature S of the unique memory block 830. The updated content of the unique memory block 830 according to the write request is written to the dedicated free memory area 840. The U_PTR of 830 is updated to indicate where the new block is located in the free memory area, and the D_PTR of 830 is removed or at least updated to point nowhere, since block 830 is a unique block with no duplicates detected. The F_PTR is updated to reflect the new starting address after the write.

[0048] Now consider a scenario where a write request is addressed to a deduplicated block, focusing on the left-most scenario in FIG. 9. Now, there are two deduplicated memory blocks 920 and 930 that have the same contents as unique memory block 910, and the U_PTR and D_PTR are set up to reflect this case, as described in the previous paragraph. Now, assume that a write request is addressed to deduplicated block 920 in the left-most scenario. The contents of the deduplicated block are changed so that its contents are not identical to unique memory block 910. Instead, an updated deduplicated block is placed in the free space at 980, denoted D_U. Now, the U_PTR of block 920 is changed to point to the new unique block 980, and the D_PTR of that block now points to deduplicated block 920. Additionally, the D_PTR that previously linked the deduplicated block to the unique block 910 is changed to point to the other deduplicated block 930 , and that block's 930 U_PTR now points back to the unique block 910 .

[0049] Note that in both scenarios of Figures 8 and 9, the write operation generates new block contents that may or may not already exist. In the described process, there is no attempt to analyze whether the new blocks are identical to other existing blocks. As a result, they do not need to be inserted into the tree structure that tracks unique blocks. However, in a later analysis phase, the contents of all blocks, including the newly created blocks, may be revisited to find more opportunities for deduplication.

[0050] (Compress, decompress and recompress memory blocks) Part of the metadata in Figure 5 includes the compression algorithm used for encoding (ENC at 520). Once a block is retrieved from memory, it is decompressed. This is illustrated in Figure 11 by a decompressor unit 1110 that takes as input the type of compression algorithm (ENC) and the decompressed block from memory. The type of compression algorithm can be deduplication, entropy-based compression, delta encoding (e.g., base delta immediate encoding), or any other compression method that aims to remove value redundancy.

[0051] When a block is swapped out of the last level cache C3 of the exemplary embodiment of FIG. 2, it may have been modified and may then generate a writeback request. It then needs to be compressed before being written back to memory. The locator (address translation) unit 211 of FIG. 2 is queried. If there is an entry in the metadata of the page to which the block belongs, that metadata encodes the compression algorithm used to compress the block. Referring back to the scenarios of FIGS. 8 and 9, it may happen that the writeback request is for a unique block (FIG. 8) or a deduplicated block (FIG. 9). In such a case, the address translation unit and its associated logic assist in modifying the metadata and helps to reduce the number of duplicates generated in this process.

[0052] The description of Figures 8-11 can be summarized and generalized as follows: The computer memory compression device 205 advantageously comprises: receiving a request to read a memory block in a memory page having a physical memory page address PA; determining a compressed memory page address CA from a lookup table 1010; Retrieving metadata 1020 for the memory block; Calculating a compressed memory block address 1040 from the compressed memory page address CA and the unique memory object reference 530, U_PTR of the retrieved metadata; retrieving the compressed memory block 1105 at the calculated compressed memory block address 1040; a step 1110 of decompressing the retrieved compressed memory block 1105 by a decompressor unit 213 using information 520; 1120 available in the metadata retrieved for the memory block, indicating the type of compression, ENC; The method may be configured to perform the following steps.

[0053] As described with reference to FIG. 8, the computer memory compression device 205 advantageously comprises: receiving a writeback request including an update of a unique memory block 830 at an original memory location; Copying the unique memory block 830 before updating it to a new memory location 870 in the dedicated free memory area 840 of the computer memory contents; Updating the metadata of the duplicated memory blocks 810, 820 linked to the unique memory block 830 so that said duplicated memory object references 540, D_PTRs thereof are redirected to said new memory location 870 in the dedicated free memory area 840; updating the native memory block at its original memory location 830 according to the writeback request; The method is further configured to:

[0054] The computer memory compression device 205 also advantageously comprises: providing metadata including a reference F_PTR to a start address 805 of a dedicated free memory area 840; updating said reference F_PTR to reflect a new starting address 880 after copying the unique memory block 830 to a new memory location 870 in the dedicated free memory area 840; The device may be further configured to:

[0055] As alternatively illustrated in FIG. 8, the computer memory compression device 205 advantageously includes: receiving a writeback request including an update of a unique memory block 830 at an original memory location; Finding that a de-duplicated memory block 820 is a duplicate of a unique memory block 830; promoting the found deduplication memory block 820 as unique within the tree data structure 400 by using the signature S of the unique memory block 830; writing the updated contents of the unique memory block 830 according to the writeback request to a new memory location 870 in the dedicated free memory area 840; updating the metadata of the unique memory block 830 such that its unique memory object reference 530, U_PTR, is redirected to a new memory location 870 in the dedicated free memory region 840, while its duplicate memory object reference 540, D_PTR, is removed; The device may be further configured to:

[0056] The computer memory compression device 205 also advantageously comprises: providing metadata including a reference F_PTR to a start address 805 of a dedicated free memory area 840; updating said reference F_PTR to reflect a new starting address 880 after writing the updated contents of the specific memory block 830 according to a writeback request to a new memory location 870 of the dedicated free memory area 840; The device may be further configured to:

[0057] As described with reference to FIG. 9, the computer memory compression device 205 advantageously comprises: receiving a writeback request including an update to a duplicate memory block 920; storing the updated content of the duplicate memory block as a new unique memory block 980 in a dedicated free memory area 940; updating metadata of the unique memory block 910 that was previously linked to the duplicate memory block 920 to reflect that the unique memory block 910 is no longer linked to the duplicate memory block 920 while maintaining the links between the unique memory block 910 and the other duplicate memory block 930; The device may be further configured to:

[0058] As a result of the writeback request, the unique and deduplication copies are updated as described in connection with Figures 8 and 9, and eventually go into free space, which is used to prevent unnecessary duplication. However, over time, this may have the effect that the compression ratio deteriorates. In one embodiment, the compression ratio is constantly monitored. If it exceeds a pre-set threshold, a process is initiated aimed at analyzing the memory page with respect to duplication occurrences and value redundancy in order to perform a recompression of the page. These processes may be the same as those shown in Figures 6 and 7. In another embodiment, the page is periodically visited to evaluate whether a recompression is necessary. If so, the process shown in Figures 6 and 7 and described in the previous paragraph is initiated.

[0059] Thus, the computer memory compression device 205 advantageously comprises: monitoring the compression ratio of memory pages over time; If the compression ratio does not meet a given criterion, performing a recompression of the memory page by executing the functions of the computer memory compression method 1200 described herein; The device may be further configured to:

[0060] Alternatively or additionally, the computer memory compression device 205 may be further configured to improve compression ratios by periodically performing recompression of memory pages to perform the functions of the computer memory compression method 1200 described herein.

[0061] Although aspects of the invention have been described herein with reference to exemplary embodiments, the invention is not limited to the disclosed embodiments but encompasses alternative embodiments that may be realized by one of ordinary skill in the art.

[0062] One alternative aspect of the present invention may be viewed as a system for analyzing computer memory data for the purpose of compressing the computer memory data by eliminating duplications and value redundancy of data items, the system comprising means for eliminating the duplications and value redundancy, means for locating data items after eliminating the duplications and value redundancy, means for compressing and decompressing the data items using said compression method, and means for re-compressing the data items.

[0063] Another alternative aspect of the present invention may be viewed as a method for analysing computer memory data for the purpose of compressing the computer memory data by eliminating duplications and value redundancies of data items, the method comprising the steps of eliminating the duplications and value redundancies, locating the data items after eliminating the duplications and value redundancies, compressing and decompressing the data items using said compression method, and re-compressing the data items.

[0064] Yet another alternative aspect of the present invention may be viewed as an apparatus for analysing computer memory data for the purpose of compressing the computer memory data by eliminating duplications and value redundancy of data items, the apparatus being configured to perform the steps of eliminating duplications and value redundancy, locating the data items after eliminating the duplications and value redundancy, compressing and decompressing the data items using said compression method, and re-compressing the data items.

[0065] Yet another alternative aspect of the disclosed invention can be viewed as including a system for data analysis having means for analyzing the contents of pages in a main memory for occurrences of duplication of memory blocks and for occurrences of value redundancy of remaining unique memory blocks. The disclosed invention also includes a system having means for removing memory duplication and value redundancy. Additionally, the disclosed invention includes a system having means for locating individual memory blocks after duplication and value redundancy have been removed and means for using same to compress and decompress memory blocks. Finally, the disclosed invention includes a system having means for recompressing memory pages.

[0066] Further alternative aspects of the invention can be seen as a method for analysing the contents of pages in main memory with respect to occurrences of memory block duplication and with respect to the relative frequency of values ​​within remaining unique memory blocks, a method for encoding memory blocks taking into account both deduplication and value locality based encoding methods, and a method for locating individual memory blocks within a compressed memory for a family of combinations of deduplication and value locality based compression techniques and using the same to compress and decompress memory blocks.Finally, the disclosed invention includes a method for recompressing memory pages.

[0067] Other alternative aspects of the present invention can be viewed as an analyzer apparatus configured to analyze the contents of pages in a main memory with respect to occurrences of memory block duplication and with respect to the relative frequency of values ​​within the remaining unique memory blocks; a data encoding apparatus configured to encode memory blocks taking into account deduplication and value redundancy within the remaining unique blocks; a memory block locator apparatus configured to locate individual memory blocks within a compressed memory for a family of combinations of deduplication and value locality based compression techniques and an apparatus configured to use the same to compress and decompress memory blocks; and an apparatus configured to recompress memory pages.

Claims

1. A computer memory compression method (1200) executed by a computer memory compression device (205) in a computer system (200) having a microprocessor (210) and one or more memory modules (151-153), comprising: an analyzer unit (214) analyzing (1210) the computer memory content for occurrences of duplicate memory objects and value redundancy of data values ​​in unique memory objects; an encoding unit (212) encoding (1220) the computer memory content by eliminating the duplicate memory objects and compressing each remaining unique memory object by exploiting data value locality of data values ​​of each remaining unique memory object; the encoding unit (212) providing (1230) metadata (500) representing the duplicate or unique memory objects of the encoded computer memory content, the metadata (500) reflecting the eliminated duplicate memory objects, the remaining unique memory objects, and a type of compression used to compress each remaining unique memory object; a locator unit (211) using said metadata (500) to locate (1240) memory objects within said encoded computer memory content; Including, The metadata (500) includes, for each memory object of the encoded computer memory content: information indicating whether the memory object is a eliminated duplicate memory object or a remaining unique memory object (510); If the memory object is a remaining native memory object, information indicating the type of compression used (520), and a native memory object reference (530, U_PTR) to the remaining native memory object; If the memory object is an evicted duplicate memory object, a unique memory object reference (530, U_PTR) to a unique memory object having the same uncompressed content as the evicted duplicate memory object; Including, 13. The method of claim 12, wherein the metadata further includes, for each memory object of the encoded computer memory content that is a unique memory object, a duplicate memory object reference to a eliminated duplicate memory object, the uncompressed content of which is identical to the unique memory object.

2. Processing (600) each distinct memory object in the computer memory contents, comprising: creating a signature (S), said signature being a dense representation of data values ​​of said memory object; - traversing a tree data structure (400) and comparing said created signature (S) with signatures already represented in said tree data structure (400); If the created signature (S) does not match (660) any of the signatures represented in the tree data structure (400), Inserting a node into the tree data structure (400); inputting the created signature (S) into the inserted node; generating said metadata (500) for said individual memory object using information indicating that it is a unique memory object (510) and a unique memory object reference (530, U_PTR) for said individual memory object; If the created signature (S) matches (650) a signature represented in the tree data structure (400), generating said metadata (500) for said individual memory object using information indicating that it is a duplicate memory object (510) and said unique memory object reference (530, U_PTR) to the unique memory block represented by the matching signature in said tree data structure (400); updating the metadata (500) of the unique memory blocks represented by the matching signatures in the tree data structure (400) to introduce duplicate memory object references (540, D_PTR) to the distinct memory objects; 2. The computer memory compression method of claim 1, further comprising the step of processing (600) by performing:

3. If the created signature (S) matches (650) a signature represented in the tree data structure (400), determining whether the distinct memory object is identical to the unique memory block represented by the matching signature; If the distinct memory object and the unique memory block represented by the matching signature are not identical: Inserting a node into the tree data structure (400); inputting the created signature (S) into the inserted node; generating metadata (500) for said individual memory object using information indicating that it is a unique memory object (510) and a unique memory object reference (530, U_PTR) for said individual memory object; 3. The computer memory compression method of claim 2, further comprising:

4. If all memory objects in the computer memory contents have been processed (600), traversing the tree data structure (400) to generate a value frequency table for the data values ​​of the unique memory objects represented by the nodes of the tree data structure (400); compressing each unique memory object using an entropy-based compression scheme using the generated value frequency table; 4. The computer memory compression method of claim 2 or 3, further comprising:

5. A method according to any preceding claim, wherein the size of the data values ​​is smaller than the size of the memory objects, the memory objects being at a finer granularity than the computer memory contents.

6. 6. The method of claim 5, wherein said computer memory contents are pages of computer memory and said memory objects are blocks of memory, each memory block containing a plurality of data values.

7. receiving a read request for a memory block in a memory page having a physical memory page address (PA); determining a compressed memory page address (CA) from a lookup table (1010); retrieving (1020) metadata for the memory block; Calculating a compressed memory block address (1040) from the compressed memory page address (CA) and the unique memory object reference (530, U_PTR) of the retrieved metadata; retrieving a compressed memory block (1105) at the calculated compressed memory block address (1040); decompressing (1110) the retrieved compressed memory block (1105) using information indicating the type of compression (520; 1120, ENC) from the metadata retrieved for the memory block; 7. The computer memory compression method of claim 6, further comprising:

8. receiving a writeback request including an update of a unique memory block (830) at an original memory location; copying said unique memory block (830) before updating it to a new memory location (870) within a dedicated free memory area (840) of said computer memory contents; updating the metadata of the duplicated memory blocks (810, 820) linked to the unique memory block (830) such that the duplicated memory object references (540, D_PTR) thereof are redirected to the new memory location (870) within the dedicated free memory region (840); updating said native memory block at its original memory location (830) in accordance with said writeback request; 8. The computer memory compression method of claim 6 or 7, further comprising:

9. providing metadata including a reference (F_PTR) to a starting address (805) of said dedicated free memory area (840); updating said reference (F_PTR) to reflect a new starting address (880) after copying said unique memory block (830) to said new memory location (870) in said dedicated free memory area (840); 9. The computer memory compression method of claim 8, further comprising:

10. receiving a writeback request including an update of a unique memory block (830) at an original memory location; finding that a de-duplicated memory block (820) is a duplicate of a unique memory block (830); promoting the found deduplication memory block (820) as unique within the tree data structure (400) by using the signature (S) of the unique memory block (830); writing the updated contents of said unique memory block (830) according to said writeback request to a new memory location (870) in a dedicated free memory area (840); updating the metadata of the unique memory block (830) such that the unique memory object reference (530, U_PTR) of the unique memory block (830) is redirected to the new memory location (870) within the dedicated free memory area (840) while removing duplicate memory object references (540, D_PTR) of the unique memory block (830); A computer memory compression method according to claim 6 or 7 when dependent on claim 2, further comprising:

11. providing metadata including a reference (F_PTR) to a starting address (805) of said dedicated free memory area (840); updating said reference (F_PTR) to reflect a new starting address (880) after writing the updated contents of said unique memory block (830) according to said writeback request to said new memory location (870) of said dedicated free memory area (840); 11. The computer memory compression method of claim 10, further comprising:

12. receiving a writeback request including an update to a duplicate memory block (920); storing the updated contents of said duplicate memory block as a new unique memory block (980) in a dedicated free memory area (940); updating the metadata of a unique memory block (910) that was previously linked to the duplicated memory block (920) to reflect that the unique memory block (910) is no longer linked to the duplicated memory block (920) while maintaining links between the unique memory block (910) and other duplicated memory blocks (930); The computer memory compression method according to any one of claims 6 to 11, further comprising:

13. monitoring the compression ratio of the memory pages over time; - if said compression ratio does not meet a given criterion, performing a recompression of said memory pages by implementing the functions of the computer memory compression method according to any one of claims 1 to 7; The computer memory compression method according to any one of claims 8 to 12, further comprising:

14. Periodically performing a recompression of memory pages to improve the compression ratio by implementing the functions of the computer memory compression method according to any one of claims 1 to 7.

14. The computer memory compression method of claim 12 or 13, further comprising:

15. The compression by exploiting data value locality comprises: Entropy-based coding; Delta coding; Dictionary-based coding; Pattern-based coding and The computer memory compression method according to any one of claims 1 to 14, comprising one of:

16. A computer memory compression device (205), comprising: an analyzer unit (214) configured to analyze the computer memory content for occurrences of duplicate memory objects and value redundancy of data values ​​in unique memory objects; an encoding unit (212) configured to encode the computer memory content by eliminating the duplicate memory objects and compressing each remaining unique memory object by exploiting data value locality of data values ​​of each remaining unique memory object, the encoding unit (212) being further configured to provide metadata (500) representing the duplicate memory objects or the unique memory objects of the encoded computer memory content, the metadata (500) reflecting a type of compression used to compress the removed duplicate memory objects, the remaining unique memory objects, and each remaining unique memory object; a locator unit (211) configured to locate memory objects within the encoded computer memory content using said metadata (500); Equipped with The metadata (500) includes, for each memory object of the encoded computer memory content: information indicating whether the memory object is a eliminated duplicate memory object or a remaining unique memory object (510); If the memory object is a remaining native memory object, information indicating the type of compression used (520), and a native memory object reference (530, U_PTR) to the remaining native memory object; If the memory object is an evicted duplicate memory object, a unique memory object reference (530, U_PTR) to a unique memory object having the same uncompressed content as the evicted duplicate memory object; Including, The metadata (500) further includes, for each memory object of the encoded computer memory content that is a unique memory object, a duplicate memory object reference (540, D_PTR) to a eliminated duplicate memory object, the uncompressed content of which is identical to the unique memory object.

17. The analyzer unit (214) and the encoding unit (212) encode each individual memory object in the computer memory content by: creating a signature (S), said signature being a dense representation of data values ​​of said memory object; - traversing a tree data structure (400) and comparing said created signature (S) with signatures already represented in said tree data structure (400); If the created signature (S) does not match (660) any of the signatures represented in the tree data structure (400), Inserting a node into the tree data structure (400); inputting the created signature (S) into the inserted node; generating said metadata (500) for said individual memory object using information indicating that it is a unique memory object (510) and said unique memory object reference (530, U_PTR) for said individual memory object; If the created signature (S) matches (650) a signature represented in the tree data structure (400), generating said metadata (500) for said individual memory object using information indicating that it is a duplicate memory object (510) and said unique memory object reference (530, U_PTR) to the unique memory block represented by the matching signature in said tree data structure (400); updating the metadata (500) of the unique memory blocks represented by the matching signatures in the tree data structure (400) to introduce duplicate memory object references (540, D_PTR) to the distinct memory objects; 17. The computer memory compression apparatus of claim 16, configured to process (600) by performing:

18. The analyzer unit (214) and the encoding unit (212) If the created signature (S) matches (650) a signature represented in the tree data structure (400), determining whether the distinct memory object is identical to the unique memory block represented by the matching signature; If the distinct memory object and the unique memory block represented by the matching signature are not identical: Inserting a node into the tree data structure (400); inputting the created signature (S) into the inserted node; generating metadata (500) for said individual memory object using information indicating that it is a unique memory object (510) and a unique memory object reference (530, U_PTR) for said individual memory object; 20. The computer memory compression apparatus of claim 17, further configured to:

19. The analyzer unit (214) and the encoding unit (212) determine if all memory objects in the computer memory content have been processed (600). traversing the tree data structure (400) to generate a value frequency table for the data values ​​of the unique memory objects represented by the nodes of the tree data structure (400); compressing each unique memory object using an entropy-based compression scheme using the generated value frequency table; 20. The computer memory compression apparatus of claim 18, further configured to:

20. 20. The computer memory compression apparatus of claim 16, wherein the size of the data values ​​is smaller than the size of the memory objects, the memory objects being at a finer granularity than the computer memory contents.

21. 21. The computer memory compression apparatus of claim 20, wherein said computer memory contents are pages of computer memory and said memory objects are memory blocks, each memory block containing a plurality of data values.

22. Further comprising a decompressor unit (213; 1110), receiving a read request for a memory block in a memory page having a physical memory page address (PA); determining a compressed memory page address (CA) from a lookup table (1010); retrieving (1020) metadata for the memory block; Calculating a compressed memory block address (1040) from the compressed memory page address (CA) and the unique memory object reference (530, U_PTR) of the retrieved metadata; retrieving a compressed memory block (1105) at the calculated compressed memory block address (1040); decompressing the retrieved compressed memory block (1105) using information indicating the type of compression (520; 1120, ENC) from the metadata retrieved for the memory block; 22. The computer memory compression apparatus of claim 21 configured to:

23. receiving a writeback request including an update of a unique memory block (830) at an original memory location; copying said unique memory block (830) before updating it to a new memory location (870) within a dedicated free memory area (840) of said computer memory contents; updating the metadata of the duplicated memory block (810, 820) linked to the unique memory block (830) such that the duplicated memory object reference (540, D_PTR) of the unique memory block (830) is redirected to the new memory location (870) within the dedicated free memory region (840); updating said native memory block at its original memory location (830) in accordance with said writeback request; 23. A computer memory compression apparatus according to claim 21 or 22, further configured to:

24. providing metadata including a reference (F_PTR) to a starting address (805) of said dedicated free memory area (840); updating said reference (F_PTR) to reflect a new starting address (880) after copying said unique memory block (830) to said new memory location (870) in said dedicated free memory area (840); 24. The computer memory compression apparatus of claim 23 further configured to:

25. receiving a writeback request including an update of a unique memory block (830) at an original memory location; finding that a de-duplicated memory block (820) is a duplicate of a unique memory block (830); promoting the found deduplication memory block (820) as unique within the tree data structure (400) by using the signature (S) of the unique memory block (830); writing the updated contents of said unique memory block (830) according to said writeback request to a new memory location (870) in a dedicated free memory area (840); updating the metadata of the unique memory block (830) such that the unique memory object reference (530, U_PTR) of the unique memory block (830) is redirected to the new memory location (870) within the dedicated free memory area (840) while removing duplicate memory object references (540, D_PTR) of the unique memory block (830); 23. A computer memory compression apparatus according to claim 21 or 22 when dependent on claim 17, further configured to:

26. providing metadata including a reference (F_PTR) to a starting address (805) of said dedicated free memory area (840); updating said reference (F_PTR) to reflect a new starting address (880) after writing the updated contents of said unique memory block (830) according to said writeback request to said new memory location (870) of said dedicated free memory area (840); 26. The computer memory compression apparatus of claim 25, further configured to:

27. receiving a writeback request including an update to a duplicate memory block (920); storing the updated contents of said duplicate memory block as a new unique memory block (980) in a dedicated free memory area (940); updating the metadata of the unique memory block (910) that was previously linked to the duplicated memory block (920) to reflect that the unique memory block (910) is no longer linked to the duplicated memory block (920) while maintaining links between the unique memory block (910) and other duplicated memory blocks (930); 27. The computer memory compression apparatus of any one of claims 21 to 26, further configured to:

28. monitoring the compression ratio of the memory pages over time; - if said compression ratio does not meet a given criterion, performing a recompression of said memory pages by implementing the functions of the computer memory compression method according to any one of claims 1 to 7; 28. A computer memory compression apparatus according to claim 26 or 27, further configured to:

29. 7. The method of claim 1, further comprising: periodically recompressing memory pages to improve the compression ratio by implementing the functions of the computer memory compression method according to claim 1. The computer memory compression apparatus of any one of claims 26 to 28 further comprising:

30. The encoding unit (212) Entropy-based compression; Base delta immediate compression and 30. A computer memory compression apparatus as claimed in any one of claims 16 to 29, configured to compress by exploiting data value locality by applying one of:

31. one or more processors (P1, ..., PN); one or more computer memories (M1-MK, C1-C3); A computer memory compression device (205) according to any one of claims 16 to 30, A computer system (200) comprising:

Citation Information

Patent Citations

  • Program information provision system, program information provision device, and recording and reproduction controller

    JP2000217063A

  • Storage device, image forming device and program

    JP2005128875A

  • Storage device, data processing method in storage device

    JP2012505440A

  • Encoding program, encoding method, encoder, decoding program, decoding method and decoder

    JP2017073615A

  • Methods, devices and systems for hybrid data compression and decompression

    JP2018522457A