# US 2018/0024821 A1 · Detecting sequential access data and random access data for placement on hybrid main memory for in-memory databases

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

- Number: US 2018/0024821 A1
- Document ID: US20180024821A1
- Status: Published application
- Kind: A1
- Application number: 15/213,960
- Filed: 2016-07-19
- Published: 2018-01-25
- Earliest claimed: 2016-07-19
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Ahmad Hassan
- Web page: https://patentgrep.com/patent/US20180024821A1

## CPC

- G06F 8/441: {Register allocation; Assignment of physical memory space to logical memory space}
- G06F 8/443: {Optimisation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Implementations of the present disclosure include methods, systems, and computer-readable storage mediums for providing intermediate code based on source code, the intermediate code including at least one instruction for profiling at least one object of the application, providing a statistics file by processing the intermediate code, the statistics file including data indicating, for each object of a plurality of objects, a SAC and a RAC, the SAC indicating a number of times a respective object was sequentially accessed and the RAC indicating a number of times a respective object was sequentially accessed during execution of the workload, providing a list of objects, the list of objects identifying, for each object, a memory type for placement of the object in a hybrid memory system based on the RAC of the respective object, and placing objects in a hybrid memory system during execution of the application based on the list of objects.

## Claims

### Claim 1

A computer-implemented method executed by one or more processors, the method comprising:
receiving, by one or more processors, source code of an application;
providing, by the one or more processors, intermediate code based on the source code, the intermediate code comprising at least one instruction for profiling at least one object of the application;
providing, by the one or more processors, a statistics file by processing the intermediate code, the statistics file comprising data indicating, for each object of a plurality of objects, a sequential access count (SAC) and a random access count (RAC), the SAC indicating a number of times a respective object was sequentially accessed during execution of a workload, and the RAC indicating a number of times a respective object was sequentially accessed during execution of the workload;
providing, by the one or more processors, a list of objects, the list of objects identifying, for each object, a memory type for placement of the object in a hybrid memory system based on the RAC of the respective object; and
placing, by the one or more processors, objects in a hybrid memory system during execution of the application based on the list of objects.

### Claim 2 (depends on 1)

The method of claim 1, wherein, during processing of the intermediate code, the SAC is incremented for a respective object, if memory locations of consecutive accesses are identical.

### Claim 3 (depends on 1)

The method of claim 1, wherein, during processing of the intermediate code, the SAC is incremented for a respective object, if memory locations of consecutive accesses are within a threshold distance of one another.

### Claim 4 (depends on 1)

The method of claim 1, wherein, during processing of the intermediate code, the RAC is incremented for a respective object, if memory locations of consecutive accesses are not identical, and if memory locations of consecutive accesses are not within a threshold distance of one another.

### Claim 5 (depends on 1)

The method of claim 1, wherein the list of objects comprises the plurality of objects, and, for each object, indicates whether the respective object is to be placed on one of a first memory type and a second memory type.

### Claim 6 (depends on 1)

The method of claim 1, wherein the respective object is associated with a first memory type, if the RAC exceeds a threshold, and is associated with a second memory type if the RAC does not exceed the threshold.

### Claim 7 (depends on 1)

The method of claim 1, wherein the hybrid main memory system comprises at least dynamic random access memory (DRAM) and non-volatile memory (NVM).

### Claim 8

A non-transitory computer-readable storage medium coupled to one or more processors and having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
receiving source code of an application;
providing intermediate code based on the source code, the intermediate code comprising at least one instruction for profiling at least one object of the application;
providing a statistics file by processing the intermediate code, the statistics file comprising data indicating, for each object of a plurality of objects, a sequential access count (SAC) and a random access count (RAC), the SAC indicating a number of times a respective object was sequentially accessed during execution of a workload, and the RAC indicating a number of times a respective object was sequentially accessed during execution of the workload;
providing a list of objects, the list of objects identifying, for each object, a memory type for placement of the object in a hybrid memory system based on the RAC of the respective object; and
placing objects in a hybrid memory system during execution of the application based on the list of objects.

### Claim 9 (depends on 8)

The computer-readable storage medium of claim 8, wherein, during processing of the intermediate code, the SAC is incremented for a respective object, if memory locations of consecutive accesses are identical.

### Claim 10 (depends on 8)

The computer-readable storage medium of claim 8, wherein, during processing of the intermediate code, the SAC is incremented for a respective object, if memory locations of consecutive accesses are within a threshold distance of one another.

### Claim 11 (depends on 8)

The computer-readable storage medium of claim 8, wherein, during processing of the intermediate code, the RAC is incremented for a respective object, if memory locations of consecutive accesses are not identical, and if memory locations of consecutive accesses are not within a threshold distance of one another.

### Claim 12 (depends on 8)

The computer-readable storage medium of claim 8, wherein the list of objects comprises the plurality of objects, and, for each object, indicates whether the respective object is to be placed on one of a first memory type and a second memory type.

### Claim 13 (depends on 8)

The computer-readable storage medium of claim 8, wherein the respective object is associated with a first memory type, if the RAC exceeds a threshold, and is associated with a second memory type if the RAC does not exceed the threshold.

### Claim 14 (depends on 8)

The computer-readable storage medium of claim 8, wherein the hybrid main memory system comprises at least dynamic random access memory (DRAM) and non-volatile memory (NVM).

### Claim 15

A system, comprising:
a computing device; and
a computer-readable storage device coupled to the computing device and having instructions stored thereon which, when executed by the computing device, cause the computing device to perform operations comprising:
receiving source code of an application;
providing intermediate code based on the source code, the intermediate code comprising at least one instruction for profiling at least one object of the application;
providing a statistics file by processing the intermediate code, the statistics file comprising data indicating, for each object of a plurality of objects, a sequential access count (SAC) and a random access count (RAC), the SAC indicating a number of times a respective object was sequentially accessed during execution of a workload, and the RAC indicating a number of times a respective object was sequentially accessed during execution of the workload;
providing a list of objects, the list of objects identifying, for each object, a memory type for placement of the object in a hybrid memory system based on the RAC of the respective object; and
placing objects in a hybrid memory system during execution of the application based on the list of objects.

### Claim 16 (depends on 15)

The system of claim 15, wherein, during processing of the intermediate code, the SAC is incremented for a respective object, if memory locations of consecutive accesses are identical.

### Claim 17 (depends on 15)

The system of claim 15, wherein, during processing of the intermediate code, the SAC is incremented for a respective object, if memory locations of consecutive accesses are within a threshold distance of one another.

### Claim 18 (depends on 15)

The system of claim 15, wherein, during processing of the intermediate code, the RAC is incremented for a respective object, if memory locations of consecutive accesses are not identical, and if memory locations of consecutive accesses are not within a threshold distance of one another.

### Claim 19 (depends on 15)

The system of claim 15, wherein the list of objects comprises the plurality of objects, and, for each object, indicates whether the respective object is to be placed on one of a first memory type and a second memory type.

### Claim 20 (depends on 15)

The system of claim 15, wherein the respective object is associated with a first memory type, if the RAC exceeds a threshold, and is associated with a second memory type if the RAC does not exceed the threshold.
