System and method for performance tuning of garbage collection algorithms
First Claim
1. A garbage collection simulation model executed on a computer system having heap memory and a central processing unit (CPU), wherein the garbage collection simulation module performs an automated process comprising:
- generating a plurality of transaction requests by the garbage collection simulation model, each of the plurality of transaction requests including randomly generated parameters representing a randomly generated transaction request inter-arrival time, a randomly generated transaction request execution time, and a randomly generated transaction request memory allocation amount;
allocating portions of the heap memory for use in an active request queue of the garbage collection simulation model to maintain one or more active transaction requests while the active transaction requests are awaiting processing by the CPU module,wherein, for each of the plurality of transaction requests, the garbage collection simulation model applies the transaction request to the active request queue if an amount of available heap memory is greater than the transaction request memory allocation amount;
in response to the garbage collection simulation model determining that the amount of available heap memory is less than the transaction request memory allocation amount, the garbage collection simulation model initiating a garbage collection routine that interrupts processing of the active transaction requests for a duration of the garbage collection routine, records a time to complete the garbage collection routine, and adds the time to complete the garbage collection routine to the randomly generated transaction request execution times for each of the active transaction requests in the active request queue to create modified transaction request execution times; and
tracking, by the garbage collection simulation model, an average of the modified transaction request execution times to process the plurality of transaction requests in the heap memory, wherein the average of the transaction request execution times evaluates a performance of the garbage collection routine, wherein the garbage collection routine is tuned based upon the average of the modified transaction request execution times tracked by the garbage collection simulation module to thereby improve the performance of the garbage collection routine.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatus are provided for tuning a garbage collection algorithm. The apparatus includes a request generator configured to generate a transaction request including parameters Ta, Te, and M, where Ta represents a transaction request inter-arrival time, Te represents a transaction request execution time, and M represents a transaction request memory allocation amount. The apparatus also includes a memory allocation module, an active request queue, and a garbage collection (GC) module. The memory allocation module is configured to admit the formatted transaction request to the queue if at least M heap memory is available, and to initiate a GC routine if M heap memory is not available.
-
Citations
16 Claims
-
1. A garbage collection simulation model executed on a computer system having heap memory and a central processing unit (CPU), wherein the garbage collection simulation module performs an automated process comprising:
-
generating a plurality of transaction requests by the garbage collection simulation model, each of the plurality of transaction requests including randomly generated parameters representing a randomly generated transaction request inter-arrival time, a randomly generated transaction request execution time, and a randomly generated transaction request memory allocation amount; allocating portions of the heap memory for use in an active request queue of the garbage collection simulation model to maintain one or more active transaction requests while the active transaction requests are awaiting processing by the CPU module, wherein, for each of the plurality of transaction requests, the garbage collection simulation model applies the transaction request to the active request queue if an amount of available heap memory is greater than the transaction request memory allocation amount; in response to the garbage collection simulation model determining that the amount of available heap memory is less than the transaction request memory allocation amount, the garbage collection simulation model initiating a garbage collection routine that interrupts processing of the active transaction requests for a duration of the garbage collection routine, records a time to complete the garbage collection routine, and adds the time to complete the garbage collection routine to the randomly generated transaction request execution times for each of the active transaction requests in the active request queue to create modified transaction request execution times; and tracking, by the garbage collection simulation model, an average of the modified transaction request execution times to process the plurality of transaction requests in the heap memory, wherein the average of the transaction request execution times evaluates a performance of the garbage collection routine, wherein the garbage collection routine is tuned based upon the average of the modified transaction request execution times tracked by the garbage collection simulation module to thereby improve the performance of the garbage collection routine. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A process executed on a physical device having a processor and heap memory in the context of a virtual machine that models operation of a garbage collection routine, the process comprising the steps of:
-
generating, by the virtual machine, a plurality of requests each having randomly generated parameters comprising a randomly generated execution time of the request and a randomly generated memory allocation amount of the request; for each of the generated requests, the virtual machine determining an amount of available heap memory and, in response to a determination that the amount of available heap memory is not less than the memory allocation amount, allocating a portion of the heap memory equal to the memory allocation amount to the request and adding the request to an active request pool, and otherwise interrupting each of the requests in the active request pool and initiating the garbage collection routine that frees allocated portions of the heap memory; completing, by the virtual machine, each of the requests in the active request pool in the execution time of the active request while the garbage collection routine remains inactive; and in response to the garbage collection routine being initiated, the virtual machine; identifying a garbage collection time associated with the interrupting garbage collection routine; and adding the garbage collection time to the times to complete each of the requests in the active request pool; and tracking an average of the execution times to process each of the plurality of transaction requests in the active request pool to thereby evaluate a performance of the garbage collection routine, and wherein the garbage collection routine is tuned based upon the average of the modified transaction request execution times tracked by the garbage collection simulation module to thereby improve the performance of the garbage collection routine. - View Dependent Claims (12, 13, 14, 15, 16)
-
Specification