IP Library Granted Patent US 11,741,007
Granted Patent B2
US 11,741,007 · App. 17/150,994 · Granted Aug 29, 2023

Memory guards for continuous load-adaptive processing of transactions in databases

Inventor: Anton Klarén (Malmö, SE)
G06F12/0646G06F16/21G06F16/2379G06F2212/1044
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,741,007
App. No.
17/150,994
Granted
Aug 29, 2023
Kind
B2
Abstract

Techniques are disclosed to manage use of a global pool of memory comprising at least a portion of the runtime-managed heap. A request to reserve use of a portion of the global pool of memory is received from each of a plurality of transactions comprising a transactional workload of a database management system. A corresponding portion of the global pool of memory is allocated to each of at least a subset of the requesting transactions, to be used as a local pool of memory available to be used by the transaction to process the transaction.

Claims (31)

1. A database management system, comprising:

a memory configured to store a runtime-managed heap; and

a processor coupled to the memory and configured to manage use of a global pool of memory allocated to a database memory manager, the global pool comprising a subset of the runtime-managed heap, including by:

receiving at the database memory manager, from each of a plurality of transactions comprising a transactional workload directed at the database management system, a request to reserve use of a portion of the global pool of memory for use in processing that transaction; and

allocating by the database memory manager, to each of at least a subset of the requesting transactions, a corresponding portion of the global pool of memory, to be used as a temporary local pool of memory available to be used by the transaction to process the transaction;

wherein a given transaction is aborted based at least in part on a determination that a memory requirement associated with a next operation associated with the given transaction exceeds an amount of memory that remains available in the temporary local pool of memory that has been allocated to the given transaction and a request to allocate additional memory to the temporary local pool is denied by the database memory manager.

2. The system of claim 1 , wherein the processor is further configured to request allocation of the global pool from a runtime that manages the heap.

3. The system of claim 2 , wherein the size of the global pool is set by a configuration data.

4. The system of claim 1 , wherein the processor is configured to allocate a portion of the global pool of memory to a requesting transaction based at least in part on a determination that sufficient memory remains available in the global pool to accommodate the request.

5. The system of claim 1 , wherein memory is allocated from the global pool in allocation units of a prescribed size.

6. The system of claim 5 , wherein each transaction is configured to determine a memory requirement associated with a set of one or more operations to be performed next in connection with the transaction and proceed with performing the set of one or more operations based at least in part on a determination that sufficient memory remains available in a local pool of the transaction to satisfy the determined memory requirement.

7. The system of claim 6 , wherein each transaction is further configured to request allocation of an additional allocation unit of memory from the global pool based at least in part on a determination that the local pool does not have sufficient memory available to satisfy the determined memory requirement.

8. The system of claim 7 , wherein to processor is further configured to allocate an additional allocation unit of memory from the global pool to the requesting transaction.

9. The system of claim 8 , wherein the processor is configured to allocate the additional allocation unit of memory based at least in part on a determination that sufficient memory is available in the global pool to allocate the additional allocation unit.

10. The system of claim 9 , wherein the processor is configured to make the determination that sufficient memory is available in the global pool to allocate the additional allocation unit at least in part by applying a biasing function with respect to one or more attributes of the transaction.

11. The system of claim 10 , wherein one or more elements of the biasing function are configurable by an administrative user of the database management system.

12. The system of claim 1 , wherein a transaction is configured to abort the transaction with which it is associated based at least in part on a determination that insufficient memory exists in its local pool to process the transaction.

13. The system of claim 1 , wherein a transaction is configured to release memory in its local pool back to the global pool upon committing or aborting the transaction.

14. A method to manage use of a global pool of memory allocated to a database memory manager, the global pool comprising a subset of the runtime-managed heap, comprising:

receiving at the database memory manager, from each of a plurality of transactions comprising a transactional workload of a database management system, a request to reserve use of a portion of the global pool of memory for use in processing that transaction; and

allocating by the database memory manager, to each of at least a subset of the requesting transactions, a corresponding portion of the global pool of memory, to be used as a temporary local pool of memory available to be used by the transaction to process the transaction;

wherein a given transaction is aborted based at least in part on a determination that a memory requirement associated with a next operation associated with the given transaction exceeds an amount of memory that remains available in the temporary local pool of memory that has been allocated to the given transaction and a request to allocate additional memory to the temporary local pool is denied by the database memory manager.

15. The method of claim 14 , further comprising requesting allocation of the global pool from a runtime that manages the heap.

16. The method of claim 14 , wherein a portion of the global pool of memory to is allocated to a requesting transaction based at least in part on a determination that sufficient memory remains available in the global pool to accommodate the request.

17. The method of claim 14 , wherein memory is allocated from the global pool in allocation units of a prescribed size.

18. The method of claim 17 , wherein each transaction is configured to determine a memory requirement associated with a set of one or more operations to be performed next in connection with the transaction and proceed with performing the set of one or more operations based at least in part on a determination that sufficient memory remains available in a local pool of the transaction to satisfy the determined memory requirement.

19. The method of claim 18 , wherein each transaction is further configured to request allocation of an additional allocation unit of memory from the global pool based at least in part on a determination that the local pool does not have sufficient memory available to satisfy the determined memory requirement.

20. A computer program product to manage use of a global pool of memory allocated to a database memory manager, the global pool comprising a subset of the runtime-managed heap, the comprising computer program product being embodied in a non-transitory computer readable medium and comprising computer instructions for:

receiving at the database memory manager, from each of a plurality of transactions comprising a transactional workload of a database management system, a request to reserve use of a portion of the global pool of memory for use in processing that transaction; and

allocating by the database memory manager, to each of at least a subset of the requesting transactions, a corresponding portion of the global pool of memory, to be used as a temporary local pool of memory available to be used by the transaction to process the transaction;

wherein a given transaction is aborted based at least in part on a determination that a memory requirement associated with a next operation associated with the given transaction exceeds an amount of memory that remains available in the temporary local pool of memory that has been allocated to the given transaction and a request to allocate additional memory to the temporary local pool is denied by the database memory manager.

Assignments (2)
SECURITY INTEREST Recorded Mar 31, 2026
From: NEO4J, INC.; NEO4J SWEDEN AB
To: HERCULES CAPITAL, INC., AS AGENT
Reel/Frame 074237/0314 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 24, 2021
From: KLARÉN, ANTON
To: NEO4J SWEDEN AB
Reel/Frame 055394/0580 →
Continuity (1)
Related Publication 20220229776A1 · Jul 21, 2022