# US 2016/0239432 A1 · Application-layer managed memory cache

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2016/0239432 A1
- Document ID: US20160239432A1
- Status: Published application
- Kind: A1
- Application number: 14/624,188
- Filed: 2015-02-17
- Published: 2016-08-18
- Earliest claimed: 2015-02-17
- Assignees: LinkedIn Corporation
- Applicants: LinkedIn Corporation
- Inventors: Zhenyun Zhuang; Haricharan K. Ramachandra; Badrinath K. Sridharan; Cuong H. Tran
- Web page: https://patentgrep.com/patent/US20160239432A1

## CPC

- G06F 12/12: Replacement control
- G06F 12/023: {Free address space management}
- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 12/1018: involving hashing techniques, e.g. inverted page tables
- G06F 12/0862: with prefetch
- G06F 2212/502: using adaptive policy
- G06F 2212/652: Page size control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In order to prevent data thrashing and the resulting performance degradation, a computer system may maintain an application-layer cache space to more effectively use physical memory and, thus, significantly improve an application-memory hit ratio and reduce disk input-output operations. In particular, the computer system may maintain a managed memory cache that is separate from an operating systems' default page cache. The managed memory cache may be managed according to predefined caching rules that are separate from rules used to manage the page cache. Moreover, at least one of the data entries in the managed memory cache may have a page size that is smaller than a minimum page size of the page cache. Furthermore, at least some of the data entries in the managed memory cache may have different page sizes and, more generally, different associated predefined caching rules.

## Claims

### Claim 1

A computer-implemented method for caching information, the method comprising:
creating a managed memory cache that is separate from a page cache, wherein the managed memory cache is managed according to predefined caching rules that are separate from the caching rules in the operating system that are used to manage the page cache,
wherein at least one data entry in the managed memory cache has a page size that is smaller than a minimum page size of the page cache, and
wherein multiple data entries in the managed memory cache have different page sizes, wherein the page sizes of the data entries are dynamically determined based on data-access patterns of the data entries associated with an application executed on the computer in an environment of the operating system, and wherein the data-access patterns comprise a metric that measures cache-hits for previously cached data that are subsequently removed from the managed memory cache; and
using the computer, storing the information in the managed memory cache based on the predefined rules.

### Claim 2

(canceled)

### Claim 3 (depends on 1)

The method of claim 1, wherein storing the information involves replacing additional information stored in the managed memory cache; and
wherein the additional information is replaced based on data-access patterns associated with an application executed on the computer in an environment of the operating system.

### Claim 4 (depends on 1)

The method of claim 1, wherein the method further comprises maintaining additional information in the managed memory cache when storing the information; and
wherein the additional information is maintained based on data-access patterns associated with an application executed on the computer in an environment of the operating system.

### Claim 5 (depends on 1)

The method of claim 1, wherein the method further comprises merging adjacent data entries in the managed memory cache into a single data entry based on data-access patterns associated with an application executed in an environment of the operating system on the computer.

### Claim 6 (depends on 1)

The method of claim 1, wherein the method further comprises separating a data entry into two or more data entries in the managed memory cache based on data-access patterns associated with an application executed in an environment of the operating system on the computer.

### Claim 7 (depends on 1)

The method of claim 1, wherein the data entries in the managed memory cache are organized based on a hash table.

### Claim 8 (depends on 1)

The method of claim 1, wherein the managed memory cache is implemented in virtual memory.

### Claim 9 (depends on 1)

The method of claim 1, wherein the managed memory cache is implemented in physical memory.

### Claim 10 (depends on 1)

The method of claim 1, wherein the page size of the at least one data entry in the managed memory cache is 1 byte.

### Claim 11 (depends on 10)

The method of claim 10, wherein at least some of the data entries have different associated predefined caching rules.

### Claim 12 (depends on 1)

The method of claim 1, wherein the predefined caching rules include application-layer caching rules.

### Claim 13 (depends on 1)

The method of claim 1, wherein the predefined caching rules are associated with a library that is called by an application executed in an environment of the operating system on the computer.

### Claim 14 (depends on 1)

The method of claim 1, wherein the information is stored in the managed memory cache when a cache-miss occurs.

### Claim 15

An apparatus, comprising:
one or more processors;
memory; and
a program module, wherein the program module is stored in the memory and, during operation of the apparatus, is executed by the one or more processors to cache information, the program module including:
instructions for creating a managed memory cache that is separate from a page cache, wherein the managed memory cache is managed according to predefined caching rules that are separate from the caching rules in the operating system that are used to manage the page cache,
wherein at least one data entry in the managed memory cache has a page size that is smaller than a minimum page size of the page cache, and
wherein multiple data entries in the managed memory cache have different page sizes, wherein the page sizes of the data entries are dynamically determined based on data-access patterns of the data entries associated with an application executed on the computer in an environment of the operating system, and wherein the data-access patterns comprise a metric that measures cache-hits for previously cached data that are subsequently removed from the managed memory cache; and
instructions for storing the information in the managed memory cache based on the predefined rules.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the managed memory cache is implemented in one of: virtual memory; and physical memory.

### Claim 17 (depends on 15)

The apparatus of claim 15, wherein the predefined caching rules include application-layer caching rules.

### Claim 18

(canceled)

### Claim 19 (depends on 15)

The apparatus of claim 15, wherein the data entries in the managed memory cache are organized based on a hash table.

### Claim 20

A system, comprising:
a processing module comprising a non-transitory computer-readable medium storing instructions that, when executed, cause the system to:
create a managed memory cache that is separate from a page cache, wherein the managed memory cache is managed according to predefined caching rules that are separate from the caching rules in the operating system that are used to manage the page cache,
wherein at least one data entry in the managed memory cache has a page size that is smaller than a minimum page size of the page cache, and
wherein multiple data entries in the managed memory cache have different page sizes, wherein the page sizes of the data entries are dynamically determined based on data-access patterns of the data entries associated with an application executed on the computer in an environment of the operating system, and wherein the data-access patterns comprise a metric that measures cache-hits for previously cached data that are subsequently removed from the managed memory cache; and
store the information in the managed memory cache based on the predefined rules.
