IP Library Granted Patent US 10,613,762
Granted Patent B2
US 10,613,762 · App. 15/411,634 · Granted Apr 7, 2020

Memory allocation buffer for reduction of heap fragmentation

Inventor: Todd Lipcon (San Francisco, CA)
Assignee: Cloudera, Inc.
G06F3/0611G06F3/067G06F3/0631G06F3/0644G06F3/0652G06F3/0683G06F12/0808G06F12/128G06F16/1727H04L67/1097G06F12/12G06F2212/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 10,613,762
App. No.
15/411,634
Granted
Apr 7, 2020
Kind
B2
Abstract

Systems and methods of a memory allocation buffer to reduce heap fragmentation. In one embodiment, the memory allocation buffer structures a memory arena dedicated to a target region that is one of a plurality of regions in a server in a database cluster such as an HBase cluster. The memory area has a chunk size (e.g., 2 MB) and an offset pointer. Data objects in write requests targeted to the region are received and inserted to the memory arena at a location specified by the offset pointer. When the memory arena is filled, a new one is allocated. When a MemStore of the target region is flushed, the entire memory arenas for the target region are freed up. This reduces heap fragmentation that is responsible for long and/or frequent garbage collection pauses.

Claims (57)

1. A method for operating a region server of a distributed computing system, the method comprising:

for each region, holding, in a memory on the region server, data to be written to a storage until flushing the data to the storage, depending on whether the data reaches a predetermined size;

receiving a write request from a client, wherein the write request includes a target region and a data object; and

storing the data object in a memory arena dedicated to the target region at a location that is continued from a previous location such that, when said flushing occurs for the target region, space freed from the memory arena dedicated to the target region is contiguous.

2. The method of claim 1 , wherein the memory arena dedicated to the target region is a space dedicated to the target region in a heap in the region server.

3. The method of claim 1 , wherein said storing the data object step is performed based on an availability of the memory arena dedicated to the target region.

4. The method of claim 1 , further comprising:

determining that the memory arena dedicated to the target region is unavailable; and

creating the memory arena dedicated to the target region by allocating one space of a select size in a heap in the region server.

5. The method of claim 4 , wherein the memory arena dedicated to the target region is determined unavailable when the memory arena dedicated to the target region does not exist in the heap.

6. The method of claim 4 , wherein the memory arena dedicated to the target region is determined unavailable when the memory arena dedicated to the target region does not have enough space for the data object.

7. The method of claim 1 , further comprising:

locating, in a heap in the region server, the memory arena dedicated to the target region; and

determining that the memory arena has enough space for the data object.

8. The method of claim 1 , further comprising:

locating, in a heap in the region server, the memory arena dedicated to the target region;

determining that the memory arena has not enough space for the data object; and

creating, in the heap, a new memory arena in the heap as the memory arena dedicated to the target region.

9. The method of claim 1 , wherein the distributed computing system is implemented as a non-relational, distributed database.

10. A server hosting a plurality of regions for a distributed computing system, the server's memory including instructions which, upon executed by one or more processors of the server, cause the server to perform operations comprising:

for each region, holding, in a memory on the server, data to be written to a storage until flushing the data to the storage, depending on whether the data reaches a predetermined size;

receiving a write request from a client, wherein the write request includes a target region and a data object; and

storing the data object in a memory arena dedicated to the target region at a location that is continued from a previous location such that, when said flushing occurs for the target region, space freed from the memory arena dedicated to the target region is contiguous.

11. The server of claim 10 , wherein the memory arena dedicated to the target region is a space dedicated to the target region in a heap in the region server.

12. The server of claim 10 , wherein said storing the data object step is performed based on an availability of the memory arena dedicated to the target region.

13. The server of claim 10 , the method the server caused to perform further comprising:

determining that the memory arena dedicated to the target region is unavailable; and

creating the memory arena dedicated to the target region by allocating one space of a select size in a heap in the region server.

14. The server of claim 13 , wherein the memory arena dedicated to the target region is determined unavailable when the memory arena dedicated to the target region does not exist in the heap.

15. The server of claim 13 , wherein the memory arena dedicated to the target region is determined unavailable when the memory arena dedicated to the target region does not have enough space for the data object.

16. The server of claim 10 , the method the server caused to perform further comprising:

locating, in a heap in the region server, the memory arena dedicated to the target region; and

determining that the memory arena has enough space for the data object.

17. The server of claim 10 , the method the server caused to perform further comprising:

locating, in a heap in the region server, the memory arena dedicated to the target region;

determining that the memory arena has not enough space for the data object; and

creating, in the heap, a new memory arena in the heap as the memory arena dedicated to the target region.

18. The server of claim 1 , wherein the distributed computing system is implemented as a non-relational, distributed database.

19. A non-transitory machine-readable storage medium including executable instructions, which when executed by one or more processors of a server hosting a plurality of regions for a distributed computing system, cause the processors to perform:

for each region, holding, in a memory on the server, data to be written to a storage until flushing the data to the storage, depending on whether the data reaches a predetermined size;

receiving a write request from a client, wherein the write request includes a target region and a data object; and

storing the data object in a memory arena dedicated to the target region at a location that is continued from a previous location such that, when said flushing occurs for the target region, space freed from the memory arena dedicated to the target region is contiguous.

20. The medium of claim 19 , wherein the memory arena dedicated to the target region is a space dedicated to the target region in a heap in the region server.

21. The medium of claim 19 , wherein said storing the data object step is performed based on an availability of the memory arena dedicated to the target region.

22. The medium of claim 19 , the processors further caused to perform:

determining that the memory arena dedicated to the target region is unavailable; and

creating the memory arena dedicated to the target region by allocating one space of a select size in a heap in the region server.

23. The medium of claim 22 , wherein the memory arena dedicated to the target region is determined unavailable when the memory arena dedicated to the target region does not exist in the heap.

24. The medium of claim 22 , wherein the memory arena dedicated to the target region is determined unavailable when the memory arena dedicated to the target region does not have enough space for the data object.

25. The medium of claim 19 , the processors further caused to perform:

locating, in a heap in the region server, the memory arena dedicated to the target region; and

determining that the memory arena has enough space for the data object.

26. The medium of claim 19 , the processors further caused to perform

locating, in a heap in the region server, the memory arena dedicated to the target region;

determining that the memory arena has not enough space for the data object; and

creating, in the heap, a new memory arena in the heap as the memory arena dedicated to the target region.

27. The medium of claim 19 , wherein the distributed computing system is implemented as a non-relational, distributed database.

Assignments (5)
RELEASE OF SECURITY INTERESTS IN PATENTS Recorded Oct 14, 2021
From: CITIBANK, N.A.
To: CLOUDERA, INC.; HORTONWORKS, INC.
Reel/Frame 057804/0355 →
FIRST LIEN NOTICE AND CONFIRMATION OF GRANT OF SECURITY INTEREST IN PATENTS Recorded Oct 12, 2021
From: CLOUDERA, INC.; HORTONWORKS, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 057776/0185 →
SECOND LIEN NOTICE AND CONFIRMATION OF GRANT OF SECURITY INTEREST IN PATENTS Recorded Oct 12, 2021
From: CLOUDERA, INC.; HORTONWORKS, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 057776/0284 →
SECURITY INTEREST Recorded Dec 22, 2020
From: CLOUDERA, INC.; HORTONWORKS, INC.
To: CITIBANK, N.A., AS COLLATERAL AGENT
Reel/Frame 054832/0559 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 31, 2017
From: LIPCON, TODD
To: CLOUDERA, INC.
Reel/Frame 041131/0252 →