IP Library Granted Patent US 10,891,234
Granted Patent B2
US 10,891,234 · App. 15/945,244 · Granted Jan 12, 2021

Cache partitioning to accelerate concurrent workloads

Inventors: Stefan Noll (Sandhausen, DE); Norman May (Karlsruhe, DE); Alexander Martin Böhm (Schwetzingen, DE); Jens Thilo Teubner (Dortmund, DE)
Assignee: SAP SE
G06F12/0891G06F12/084G06F12/0864G06F12/0897G06F12/126G06F16/2282G06F16/2456G06F16/24552G06F2212/1021G06F2212/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,891,234
App. No.
15/945,244
Granted
Jan 12, 2021
Kind
B2
Abstract

Disclosed herein are system, method, and computer program product embodiments for cache partitioning to accelerate concurrent workload performance of in-memory databases. An embodiment operates by storing a first bitmask, associating the first bitmask with a first processor core, setting a subset of the bits of the first bitmask, wherein the subset of the bits of the first bitmask represents a first portion of shared last-level cache, and wherein any part of the first bitmask excluding the subset of the bits of the first bitmask represents a second portion of the lowest-level cache, and disallowing eviction of any cache line in the second portion of the lowest-level cache by the first processor core.

Claims (65)

1. A computer-implemented method for partitioning a hierarchical cache having a shared n-way associative last-level cache (LLC), comprising:

receiving, by at least one processor, a first bitmask from a database management system (DBMS) via an operating-system kernel interface, wherein the first bitmask comprises n bits, wherein n is a predetermined number equal to the number of ways in the LLC;

storing, by the at least one processor, the first bitmask;

associating, by the at least one processor, the first bitmask with a first core of the at least one processor, wherein the at least one processor comprises at least one multi-core processor;

setting, by the at least one processor, a subset of the bits of the first bitmask, wherein the subset of the bits of the first bitmask represents at least one first portion of the LLC, and wherein any part of the first bitmask excluding the subset of the bits of the first bitmask represents at least one second portion of the LLC;

disallowing, by the at least one processor, eviction of any cache line in the at least one second portion of the LLC by the first core of the at least one processor;

receiving, by the at least one processor, a plurality of queries via the DBMS, wherein the plurality of queries comprises at least one online analytical processing (OLAP) query and at least one online transactional processing (OLTP) query;

executing the at least one OLAP query using the first core of the at least one processor and only the first portion of the LLC represented by the first subset of bits of the first bitmask; and

executing the at least one OLTP query using any core of the at least one processor and any portion of the LLC.

2. The computer-implemented method of claim 1 , wherein the at least one OLAP query comprises at least one cache-insensitive foreign key join, and wherein the at least one OLTP operation comprises at least one cache-sensitive foreign key join.

3. The computer-implemented method of claim 1 , the storing the first bitmask further comprising:

updating, by the at least one processor, the setting of the subset of bits of the first bitmask, based on whether the at least one OLAP query comprises at least one operator, of a first set of predetermined operators, corresponding to at least one of a process running on the first core of the at least one processor or a thread running on the first core of the at least one processor.

4. The computer-implemented method of claim 3 , the updating further comprising:

updating, by the at least one processor, the setting of the subset of bits of the first bitmask, only in response to determining, by the at least one processor, that a predicted benefit value of the updating outweighs a predicted overhead value of the updating.

5. The computer-implemented method of claim 3 , wherein the updating is responsive to at least one of a context switch or a thread migration.

6. The computer-implemented method of claim 3 , further comprising:

storing, by the at least one processor, a second bitmask, wherein the second bitmask comprises n bits;

associating, by the at least one processor, the second bitmask with at least one second core of the at least one processor;

setting, by the at least one processor, a subset of the bits of the second bitmask, wherein the subset of the bits of the second bitmask represents at least one third portion of the LLC, and wherein any part of the second bitmask excluding the subset of the bits of the second bitmask represents at least one fourth portion of the LLC; and

disallowing, by the at least one processor, eviction of any cache line in the at least one fourth portion of the LLC by at least one second core of the at least one processor.

7. The computer-implemented method of claim 6 , the storing the second bitmask further comprising:

updating, by the at least one processor, the setting of the subset of bits of the second bitmask, based on whether the at least one OLTP query comprises at least one operator, of a second set of predetermined operators, corresponding to at least one of a process running on the second core of the at least one processor or a thread running on at least one second core of the at least one processor.

8. The computer-implemented method of claim 1 , wherein the at least one OLAP query and the at least one OLTP query are performed concurrently in hybrid transactional/analytical processing (HTAP).

9. The computer-implemented method of claim 1 , wherein the at least one second portion of the LLC contains data comprising at least one dictionary referenced by the executing the at least one OLTP query.

10. The computer-implemented method of claim 9 , wherein the at least one dictionary referenced by the executing the at least one OLTP query remains in the at least one second portion of the LLC after the executing a first OLAP query of the at least one OLAP query.

11. The computer-implemented method of claim 9 , wherein the at least one dictionary is referenced for compression or decompression of columnar data stored in a memory via the DBMS.

12. An in-memory database management system (DBMS), comprising:

a memory comprising a hierarchical cache having a shared n-way associative last-level cache (LLC); and

at least one processor, communicatively coupled to the memory, and configured to perform operations comprising:

store a first bitmask, via an operating-system kernel interface, wherein the first bitmask comprises n bits, wherein n is a predetermined number equal to the number of ways in the LLC;

associate the first bitmask with a first core of the at least one processor, wherein the at least one processor comprises at least one multi-core processor;

set a value of a subset of the bits of the first bitmask, wherein the subset of the bits of the first bitmask represents at least one first portion of the LLC, and wherein any part of the first bitmask excluding the subset of the bits of the first bitmask represents at least one second portion of the LLC;

disallow eviction of any cache line in the at least one second portion of the LLC by the first core of the at least one processor;

execute at least one online transactional processing (OLAP) query using the first core of the at least one processor and only the first portion of the LLC represented by the first subset of bits of the first bitmask; and

execute at least one online transactional processing (OLTP) query using any core of the at least one processor and any portion of the LLC.

13. The DBMS of claim 12 , wherein the at least one OLAP query comprises at least one cache-insensitive foreign key join, and wherein the at least one OLTP operation comprises at least one cache-sensitive foreign key join.

14. The DBMS of claim 12 , wherein, to store the first bitmask, the at least one processor is further configured to:

update the value of the subset of bits of the first bitmask, based on whether the at least one OLAP query comprises at least one operator, of a first set of predetermined operators, corresponding to at least one of a process running on the first core of the at least one processor or a thread running on the first core of the at least one processor.

15. The DBMS of claim 14 , wherein, to update the value of the subset of bits of the first bitmask, the at least one processor is further configured to:

update the value of the subset of bits of the first bitmask, only in response to a determination that a predicted benefit value of the updating outweighs a predicted overhead value of the updating.

16. The DBMS of claim 14 , wherein, to update the value of the subset of bits of the first bitmask, the at least one processor is further configured to:

update the value of the subset of bits of the first bitmask in response to at least one of a context switch or a thread migration.

17. The DBMS of claim 14 , the at least one processor further configured to:

store a second bitmask, wherein the second bitmask comprises n bits;

associate the second bitmask with a second core of the at least one processor;

set a subset of the bits of the second bitmask, wherein the subset of the bits of the second bitmask represents at least one third portion of the LLC, and wherein any part of the second bitmask excluding the subset of the bits of the second bitmask represents at least one fourth portion of the LLC; and

disallow eviction of any cache line in the at least one fourth portion of the LLC by the second core of the at least one processor.

18. The DBMS of claim 17 , wherein, to store the second bitmask, the at least one processor is further configured to:

update the setting of the subset of bits of the second bitmask, based on whether the at least one OLTP query comprises at least one operator, of a second set of predetermined operators, corresponding to at least one of a process running on the second core of the at least one processor or a thread running on the second core of at least one at least one processor.

19. A non-transitory computer-readable device having instructions stored thereon that, when executed by at least one computing device comprising at least one processor coupled to a hierarchical cache having a shared n-way associative last-level cache (LLC), cause the at least one computing device to perform operations comprising:

receiving a first bitmask from a database management system (DBMS) via an operating-system kernel interface, wherein the first bitmask comprises n bits, wherein n is a predetermined number equal to the number of ways in the LLC;

storing, the first bitmask;

associating the first bitmask with a first core of the at least one processor, wherein the at least one processor comprises at least one multi-core processor;

setting a subset of the bits of the first bitmask, wherein the subset of the bits of the first bitmask represents at least one first portion of the LLC, and wherein any part of the first bitmask excluding the subset of the bits of the first bitmask represents at least one second portion of the LLC;

disallowing eviction of any cache line in the at least one second portion of the LLC by the first core of the at least one processor;

receiving, by the at least one processor, a plurality of queries via the DBMS, wherein the plurality of queries comprises at least one online analytical processing (OLAP) query and at least one online transactional processing (OLTP) query;

executing the at least one OLAP query using the first core of the at least one processor and only the first portion of the LLC represented by the first subset of bits of the first bitmask; and

executing the at least one OLTP query using any core of the at least one processor and any portion of the LLC.

20. The non-transitory computer-readable device of claim 19 , the operations further comprising:

updating the setting of the subset of bits of the first bitmask, based on whether the at least one OLAP query comprises at least one operator, of a first set of predetermined operators, corresponding to at least one of a process running on the first core of the at least one processor or a thread running on the first core of the at least one processor;

storing a second bitmask, wherein the second bitmask comprises n bits;

associating the second bitmask with at least one second core of the at least one processor;

setting a subset of the bits of the second bitmask, wherein the subset of the bits of the second bitmask represents at least one third portion of the LLC, and wherein any part of the second bitmask excluding the subset of the bits of the second bitmask represents at least one fourth portion of the LLC;

disallowing eviction of any cache line in the at least one fourth portion of the LLC by the second core of the at least one processor; and

updating the setting of the subset of bits of the second bitmask, based on whether the at least one OLTP query comprises at least one operator, of a second set of predetermined operators, corresponding to at least one of a process running on the second core of the at least one processor or a thread running on at least one second core of the at least one processor.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 25, 2018
From: NOLL, STEFAN; MAY, NORMAN; BÖHM, ALEXANDER MARTIN; TEUBNER, JENS THILO
To: SAP SE
Reel/Frame 045628/0758 →
Continuity (1)
Related Publication 20190310943A1 · Oct 10, 2019
Cited By (3)
US 12,282,796 US 12,579,110 US 12,632,422