IP Library Granted Patent US 12,197,328
Granted Patent B2
US 12,197,328 · App. 18/220,765 · Granted Jan 14, 2025

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

Inventor: Anton Klarén (Malmö, SE)
Assignee: Neo4j Sweden AB
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 12,197,328
App. No.
18/220,765
Granted
Jan 14, 2025
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 (32)

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 local pool of memory available to be used by the transaction to process the transaction;

wherein memory is allocated from the global pool in allocation units of a same size and each local pool of memory comprises a number of units of the same size; and

wherein each transaction is configured to request an additional same size unit of memory upon determining that insufficient memory remained in its local pool to continue processing the transaction.

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 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.

6. The system of claim 5 , 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.

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

8. The system of claim 7 , 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.

9. The system of claim 8 , 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.

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

11. 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.

12. 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.

13. 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 memory is allocated from the global pool in allocation units of a same size and each local pool of memory comprises a number of units of the same size; and

wherein each transaction is configured to request an additional same size unit of memory upon determining that insufficient memory remained in its local pool to continue processing the transaction.

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

15. The method of claim 13 , 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.

16. The method of claim 13 , 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.

17. The method of claim 16 , 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.

18. 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 memory is allocated from the global pool in allocation units of a same size and each local pool of memory comprises a number of units of the same size; and

wherein each transaction is configured to request an additional same size unit of memory upon determining that insufficient memory remained in its local pool to continue processing the transaction.

Assignments (1)
SECURITY INTEREST Recorded Mar 31, 2026
From: NEO4J, INC.; NEO4J SWEDEN AB
To: HERCULES CAPITAL, INC., AS AGENT
Reel/Frame 074237/0314 →
Continuity (2)
Continuation 17150994 · Jan 15, 2021
Related Publication 20240061775A1 · Feb 22, 2024
References Cited (25)
US 7197549B1 · Salama · 2007 [cited by examiner]
US 8661206B2 · Kumar · 2014 [cited by applicant]
US 9069656B2 · McLachlan · 2015 [cited by examiner]
US 10216821B2 · Cheenath · 2019 [cited by applicant]
US 10284637B2 · Chin · 2019 [cited by applicant]
US 10860381B1 · Cruanes · 2020 [cited by examiner]
US 11740823B2 · Deguchi · 2023 [cited by examiner]
US 20090138886A1 · Anand · 2009 [cited by applicant]
US 20110082996A1 · Wester · 2011 [cited by applicant]
US 20110161615A1 · Odaira · 2011 [cited by applicant]
US 20120221765A1 · Yoo · 2012 [cited by applicant]
US 20140068201A1 · Fromm · 2014 [cited by applicant]
US 20140095812A1 · McLachan · 2014 [cited by examiner]
US 20140282454A1 · Bai · 2014 [cited by examiner]
US 20140372725A1 · Almasi · 2014 [cited by applicant]
US 20150363133A1 · Bobroff · 2015 [cited by applicant]
US 20170075806A1 · Li · 2017 [cited by applicant]
US 20170199694A1 · Khemani · 2017 [cited by examiner]
US 20170220621A1 · Colrain · 2017 [cited by applicant]
US 20200026444A1 · Dai · 2020 [cited by examiner]
US 20200034236A1 · Williams · 2020 [cited by applicant]
US 20200257676A1 · Zhang · 2020 [cited by applicant]
US 20200319928A1 · Schreter · 2020 [cited by examiner]
US 20210064403A1 · Pirotte · 2021 [cited by examiner]
US 20220027264A1 · Jain · 2022 [cited by examiner]