US 12,292,812 B2
Telemetry for query processing memory usage
Till Merker, Sandhausen (DE)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Mar. 4, 2022, as Appl. No. 17/687,262.
Prior Publication US 2023/0281195 A1, Sep. 7, 2023
Int. Cl. G06F 11/34 (2006.01); G06F 9/50 (2006.01)
CPC G06F 11/3442 (2013.01) [G06F 9/5016 (2013.01); G06F 2209/508 (2013.01)] 16 Claims
OG exemplary drawing
 
1. A system, comprising:
at least one processor; and
at least one memory storing instructions which, when executed by the at least one processor, cause operations comprising:
receiving, from a first thread of a first operator performing a first operation associated with a query, a first request for memory allocation or memory deallocation;
responding to the first request by at least accessing a first local data structure of the first thread to identify the first operator associated with the first request;
updating, based at least on the first request, a first memory usage metric for the first thread of the first operator, wherein the updating of the first memory usage metric includes adding, to a running aggregate of a memory integral, a result of multiplying a size of a current memory allocation by a difference between a current timestamp and a timestamp of a last update;
determining, based at least on the first memory usage metric for the first thread of the first operator and a second memory usage metric for a second thread of the first operator, a third memory usage metric for the first operator; and
responding to the first request by allocating or deallocating at least a portion of a memory allocated to the query.