Numa-aware garbage collection
AssigneeOracle International Corporation
InventorsAntonios Printezis, Igor Veresov, Paul Henry Hohensee, John Coomes
Life of this patent
Estimating the term…
Abstract
System and Methods for non-uniform memory (NUMA) garbage collection are provided. Multiple memories and processors are categorized into local groups. A heap space is divided into multiple pools and stored in each of the memories. Garbage collection threads are assigned to each of the local groups. Garbage collection is performed using the garbage collection threads for objects contained in the pools using the garbage collector threads, memory, and processor assigned to each local group, minimizing remote memory accesses.
Claims23
A method for non-uniform memory access aware garbage collector thread processing, comprising:
- assigning a plurality of processing units and a plurality of memories to a plurality of lgroups, utilizing at least one processing unit of the plurality of processing units, based on access latency between each of the plurality of processing units and each of the plurality of memories;
- dividing, utilizing the at least one processing unit, a heap space into a plurality of pools, each of the plurality of pools stored in one of the plurality of memories, each of the plurality of pools assigned to one of the plurality of lgroups according to the lgroup of the memory the respective pool is stored in;
- providing, utilizing the at least one processing unit, a plurality of garbage collector threads with a plurality of queues, each of the plurality of garbage collector threads including at least a first queue of the plurality of queues for objects contained in one of the plurality of pools assigned to a same lgroup as the respective garbage collector thread and at least a second queue of the plurality of queues for objects contained in one of the plurality of pools assigned to a different lgroup from the respective garbage collector thread;
- and
- executing the plurality of garbage collector threads, utilizing the at least one processing unit, such that each garbage collector thread:
- first processes the at least the first queue,
- second processes queues of other garbage collector threads of the plurality of garbage collector threads that are for objects contained in one of the plurality of pools assigned to the same lgroup as the respective garbage collector thread,
- third processes the at least the second queue, and
- fourth processes queues of other garbage collector threads of the plurality of garbage collector threads that are for objects contained in one of the plurality of pools assigned to the different lgroup from the respective garbage collector thread.
A system for non-uniform memory access aware garbage collector thread processing, comprising:
- a plurality of processing units coupled to a plurality of memories, each of the plurality of processing units and each of the plurality of memories assigned to one of a plurality of lgroups based on access latency;
- a heap space divided into a plurality of pools, each pool of the plurality of pools stored in one of the plurality of memories and assigned to one of the plurality of lgroups according to the lgroup of the memory the respective pool is stored in;
- and
- a plurality of garbage collector threads, each garbage collector thread assigned to one of the plurality of lgroups according to the lgroup of one of the plurality of processing units that executes the respective garbage collector thread, each garbage collector thread including at least a first queue for objects contained in one of the plurality of pools assigned to a same lgroup as the respective garbage collector thread and at least a second queue for objects contained in one of the plurality of pools assigned to a different lgroup from the respective garbage collector thread;
- wherein each of the plurality of garbage collector threads is executed by the respective one of the plurality of processing units to first process the at least the first queue, second process queues of other garbage collector threads of the plurality of garbage collector threads that are for objects contained in one of the plurality of pools assigned to the same lgroup as the respective garbage collector thread, third process the at least the second queue, and fourth process queues of other garbage collector threads of the plurality of garbage collector threads that are for objects contained in one of the plurality of pools assigned to the different lgroup from the respective garbage collector thread.
A method for non-uniform memory access aware garbage collector thread garbage collection, comprising:
- assigning a plurality of processing units and a plurality of memories to a plurality of lgroups, utilizing at least one processing unit of the plurality of processing units, based on access latency between each of the plurality of processing units and each of the plurality of memories;
- dividing, utilizing the at least one processing unit, a heap space into a plurality of pools, each pool of the plurality of pools assigned to one of the plurality of lgroups according to the lgroup of the memory the respective pool is stored in, the plurality of pools including at least a plurality of young regions each operable to store at least one young object and a plurality of old regions each operable to store at least one old object;
- copying, utilizing one of a plurality of garbage collector threads executed by the at least one processing unit, a young object during at least one garbage collection cycle, by:
- determining the lgroup of the pool of the plurality of pools that contains the young object;
- and
- copying the young object to a pool of the plurality of pools assigned to a same lgroup as the pool that contained the young object;
- and
- copying, utilizing the one of the plurality of garbage collector threads executed by the at least one processing unit, an old object during the at least one garbage collection cycle by copying the old object to a pool of the plurality of old regions assigned to a same lgroup as the one of the plurality of garbage collector threads, the one of the plurality of garbage collector threads assigned to the lgroup of the at least one processing unit.
A system for non-uniform memory access aware garbage collector thread copying, comprising:
- a plurality of processing units coupled to a plurality of memories, each of the plurality of processing units and each of the plurality of memories assigned to one of a plurality of lgroups based on access latency;
- a heap space divided into a plurality of pools, each of the plurality of pools assigned to one of the plurality of lgroups according to the lgroup of the memory the respective pool is stored in, the plurality of pools including at least a plurality of young regions each operable to store at least one young object and a plurality of old regions each operable to store at least one old object;
- a plurality of garbage collector threads, each of the plurality of garbage collector threads assigned to the lgroup of one of the plurality of processing units that executes the respective garbage collector thread;
- wherein each of the garbage collector threads is operable to copy an old object during at least one garbage collection cycle by copying the old object to a pool of the plurality of pools assigned to a same lgroup as the respective garbage collector thread and to copy a young object during the garbage collection cycle by determining the lgroup of the pool of the plurality of pools that contains the young object and copying the young object to a pool of the plurality of pools assigned to a same lgroup as the pool that contained the young object.
Dependencies are inferred from the claim text.