Garbage collection thread composition adjustment

EP4689910A1Pending Publication Date: 2026-02-11MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
EP2024719411
Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-28
Filing Date
2024-03-23
Publication Date
2026-02-11

AI Technical Summary

Technical Problem

Garbage collection in computer systems often leads to inefficiencies due to a fixed number of threads, which can result in decreased garbage collection efficiency during bursty processes, increased synchronization overhead, and reduced user process throughput.

Method used

A dynamic garbage collector thread composition adjustment mechanism that changes the number or type of threads during execution based on real-time memory usage and performance optimization goals, utilizing a reinforcement learning mechanism to adapt thread composition proactively.

Benefits of technology

Improves garbage collection efficiency by optimizing thread count and synchronization, reducing pause times, and enhancing user process throughput, especially during bursty activities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2024021240_03102024_PF_FP_ABST
    Figure US2024021240_03102024_PF_FP_ABST
Patent Text Reader

Abstract

Computing system garbage collection thread composition includes data representing the number of garbage collector threads, the kind of garbage collector threads (e.g., allocation, marking, sweeping, compacting), and various garbage collector thread characteristics such as available cores, collection trigger thresholds, and optimization goals for a user process or a garbage collector. A thread composition controller adjusts the thread composition during the execution of a managed memory process such as a user application process. The thread composition adjustment depends on inputs such as process throughput, garbage collection pause time, managed heap size, garbage collection thread count(s), allocation supports, allocation rate, garbage collection work level, optimization goals, thresholds, constraints, composition controller interface routine operation results, or reinforcement learning results. Performance optimization goals drive some proactive adjustments. Some optimization goals are weighted relative to each other.
Need to check novelty before this filing date? Find Prior Art

Description

GARBAGE COLLECTION THREAD COMPOSITION ADJUSTMENTBACKGROUND OF THE INVENTION

[0001] In computer programming, garbage collection (GC) helps provide automatic memory’ management. The “garbage” in question is memory space which has been allocated to a program for use, is no longer needed by that program, but is not yet available for use by other programs. The garbage collector tries to identify such areas of memory- so they can be reclaimed for subsequent re-allocation.

[0002] Garbage collection can free programmers from the need to manually release data objects that are no longer needed, thus making programming easier. Garbage collection can also help prevent some runtime errors, thereby enhancing cybersecurity by improving the integrity and availability of data. Many programming languages either require garbage collection, or else allow garbage collection as an option. Some software development environments allow both garbage collection and manual memory' management in a given program.

[0003] Efficient implementation of garbage collection can be a high priority because garbage collectors may run frequently or at unpredictable times, or both, and may significantly slow down user program execution. Indeed, most if not all garbage collectors sometimes utilize a “stop the world” approach which prevents user programs from running at the same time as the garbage collector. However, naively reducing the amount of time spent on garbage collection may also reduce the amount of memory reclaimed, and thus hamper user program performance in other ways, e.g., by increasing the time spent swapping data between volatile and non-volatile memorydevices.

[0004] Although garbage collection has been used, studied, and modified for several decades, improvements in garbage collection are still possible.SUMMARY OF THE INVENTION

[0005] Some embodiments described herein include functionality which dynamically adjusts a garbage collector’s thread composition, e.g., by changing the number of garbage collector threads, the kind of garbage collector threads, or a characteristic of a garbage collector thread. Dynamic adjustments change the thread composition while the garbage collector is running, unlike command line settings or configuration settings that merely specify an initial thread composition for the garbage collector to use when it starts running. Dynamic thread composition adjustment functionality permits the garbage collector to efficiently adapt in response to a change in memory usage level by a process, or in response to a request to optimize a process, for example.

[0006] Other technical activities and characteristics pertinent to teachings herein will also become apparent to those of skill in the art. The examples given are merely illustrative. ThisSumman' is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Rather, this Summary' is provided to introduce - in a simplified form - some technical concepts that are further described below in the Detailed Description. The innovation is defined with claims as properly understood, and to the extent this Summary conflicts with the claims, the claims should prevail.BRIEF DESCRIPTION OF THE DRAWINGS

[0007] A more particular description will be given with reference to the attached drawings. These drawings only illustrate selected aspects and thus do not fully determine coverage or scope.

[0008] Figure 1 is a diagram illustrating aspects of computer systems and also illustrating configured storage media, including some aspects generally suitable for systems which provide garbage collector thread composition adjustment functionality;

[0009] Figure 2 is a block diagram illustrating an enhanced sy stem configured with a garbage collector thread composition adjustment functionality;

[0010] Figure 3 is a block diagram illustrating aspects of a system enhanced with a garbage collector thread composition adjustment functionality;

[0011] Figure 4 is a block diagram illustrating some additional aspects of garbage collector thread composition adjustment;

[0012] Figure 5 is a block diagram illustrating aspects of some garbage collector thread composition adjustment inputs;

[0013] Figure 6 is a block diagram illustrating some additional aspects of a garbage collector thread composition;

[0014] Figure 7 is a flowchart illustrating steps in a garbage collector thread composition adjustment method;

[0015] Figure 8 is a flowchart further illustrating steps in some garbage collector thread composition adjustment methods, and incorporating Figure 7; and

[0016] Figure 9 is a data flow diagram illustrating a reinforcement learning feedback loop.DETAILED DESCRIPTION

[0017] Overview

[0018] Innovations may expand beyond their origins, but understanding an innovation’s origins can help one more fully appreciate the innovation. In the present case, some teachings described herein were motivated by technical challenges faced by Microsoft innovators who were working to improve technology for performing “bursty” processes in computing systems.

[0019] A bursty process is a process that exhibits burstiness. Burstiness is an increase or decrease in a computational activity. Sometimes a burst is unexpected, but expected variations in workload also qualify as bursts in some scenarios. For example, in one scenario a mail server appis expected to reach its peak workload during 8am to 12pm. Although this burst is expected, it is not necessarily easy for processors to handle as desired. Accordingly, it would be beneficial for a memory7manager such as a garbage collector to dynamically adjust the memory usage to better optimize processing during the burst.

[0020] The computational activity tracked for burstiness is the occurrence of a particular event, or in some scenarios the occurrence of any member of a particular set of events. Burstiness is detected computationally using, e.g., a burstiness score calculated thus:(1) Burst(e, t) = (Et / E - 1 / T) where t is a subset of a time period T, e is an event, Et is a total number of occurrences of event e in subset t, E is a total number of occurrences of event e in time period T, and Burst(e, t) is the burstiness score of t relative to e. A positive burstiness score indicates that e occurs more often in t than e occurs during T, which means that t is bursty7as an increase in e.

[0021] In some scenarios, burstiness is also or instead detected computationally based on standard deviation, e.g., using a calculation of the Fano factor:(2) F(t) = square(ot) I pt where ot is the standard deviation at a time t and pt is the mean number of events of a counting process after time t. Burstiness is also defined using other formulas or criteria, e.g., based on an increase or decrease larger than a specific absolute or relative threshold amount.

[0022] In the garbage collection context, in some scenarios the event(s) being tracked for burstiness include one or more memory allocation events such as allocating heap memory7, freeing heap memory7, allocating at least N bytes of memory7all at once, allocating at least N bytes of memory within length of time t, freeing at least N bytes of memory all at once, and so on. In some scenarios the event(s) being tracked for burstiness include computational events that are less directly correlated wi th memory allocation, such as user thread creation or user process throughput events, for example. Some scenarios track one or more events which are associated herein with, or defined herein as, thread composition adjustment inputs 306.

[0023] With a view toward improving garbage collection efficiency, garbage collection flexibility, or both, the innovators hypothesized that adjusting a garbage collector’s thread count while the garbage collector was running would be worth considering. Such adjustments were a departure from the use of a fixed number of threads in any given execution of a garbage collector.

[0024] Using a predetermined and fixed number of garbage collector threads has a simplicity advantage. But it also has disadvantages, at least when the memory allocated by bursty7processes is being garbage collected. Some garbage collectors are configured to run with a relatively large number of threads in order to handle potential bursts in user process activity. However, when the number of garbage collector threads is set initially and also for the entire garbage collection usinga configuration file or a command line or the like, the number of threads does not change while the garbage collector is running.

[0025] This rigid approach to setting the garbage collector's thread count simplifies garbage collector implementation, but also leads to inefficiencies with bursty user processes. If the fixed number of garbage collector threads is too small during a burst of activity, garbage collection efficiency will decrease and user process throughput will suffer while the user process is stopped to permit garbage collection. If the fixed number of garbage collector threads is too large during non-burst periods, garbage collector thread synchronization overhead will be larger than necessary' relative to the garbage collection work done, and user process throughput will again suffer.

[0026] After considering various approaches and their implications for garbage collectors and user processes, the innovators conceived various beneficial teachings provided herein. These teachings address technical challenges such as determining which kinds of data to use as inputs to control adjustments in the number of garbage collector threads during execution of a garbage collector, determining what kind of adjustments - in addition to or instead of thread count - to make in garbage collector threads during execution of a garbage collector, and determining how to effectively map a particular performance optimization goal to a particular garbage collector thread adjustment.

[0027] Some embodiments described herein utilize or provide an enhanced system which includes a garbage collector thread composition controller, which is configured to adjust a garbage collector thread composition during an execution of a process, by making an adjustment which changes the thread composition. This garbage collector thread composition dynamic adjustment functionality has the technical benefit of improving garbage collection efficiency by adapting the number of garbage collection threads overall, or the number of garbage collection threads of a particular category7(e.g., allocation, compacting, freeing, marking) in response to positive or negative process bursts. In some scenarios, the changes in thread composition optimize process throughput, garbage collector pause time, managed memory size, or weighted combinations thereof.

[0028] Some embodiments include a reinforcement learning mechanism, the reinforcement learning mechanism configured to perform reinforcement learning which produces a reinforcement learning result based at least in part on at least one of the following adjustment inputs: a process throughput, a garbage collector pause time, a managed memory size, an allocation thread support, a garbage collector thread count, a memory allocation rate, a garbage collector thread work level, a composition controller interface routine result, a processor core count, or a reinforcement learning result. The reinforcement learning result is used by the garbage collector thread composition controller. This reinforcement learning usage has the technicalbenefit of automatically and proactively adapting the garbage collector thread composition, which improves garbage collection efficiency. Efficiency is improved particularly, but not solely, for bursty' processes. The initial garbage collector thread composition specified in a configuration setting or a command line may be inefficient. Thus, adjusting it dynamically improves garbage collection efficiency even for a process that is not bursty, and even if only the single change in thread composition is made dynamically.

[0029] In some embodiments, a garbage collector thread composition adjustment method includes obtaining a process throughput adjustment input as an optimization goal, and increasing the allocation thread support. This method has the technical benefit of automatically and proactively improving garbage collector thread composition in a manner (add or optimize support for allocation threads) that tends to increase process throughput. Increased process throughput following a change in the allocation thread support indicates improved garbage collection efficiency.

[0030] In some embodiments, a garbage collector thread composition adjustment method includes obtaining a garbage collector pause time as an optimization goal, obtaining a garbage collector thread count and a garbage collector thread work level, determining that the garbage collector thread count is above a threshold associated with the garbage collector thread work level, and decreasing the garbage collector thread count. The thread count is a total garbage collector thread count or a count of particular kinds of garbage collector threads. This method has the technical benefit of automatically and proactively improving garbage collector thread composition in a manner (reduce thread count) that tends to decrease garbage collector pause time by reducing thread synchronization overhead. Pause time is also referred to as "‘stop the world time”. Decreased pause time following a reduction in the thread count indicates improved garbage collection efficiency.

[0031] In some embodiments, a garbage collector thread composition adjustment method includes obtaining the garbage collector pause time as an optimization goal, obtaining the garbage collector thread count and the garbage collector thread work level, determining that the garbage collector thread count is below a threshold associated with the garbage collector thread work level, and increasing the garbage collector thread count. This method has the technical benefit of automatically and proactively improving garbage collector thread composition in a manner (increase thread count) that tends to decrease garbage collector pause time by doing garbage collection work with more parallelism. Decreased pause time following an increase in the thread count indicates improved garbage collection efficiency despite additional thread synchronization overhead, because there is enough GC work to amortize the synchronization cost.

[0032] In some embodiments, a garbage collector thread composition adjustment methodincludes obtaining a managed memory size as an optimization goal, and increasing the garbage collector thread count by adding at least one garbage collector compacting thread. This method has the technical benefit of automatically and proactively improving garbage collector thread composition in a manner (increase compaction) that tends to decrease managed memory’ size. The managed memory includes one or more heaps. Because managed memory size is an optimization goal, decreasing managed memory' size indicates improved garbage collection efficiency.

[0033] In some embodiments, a garbage collector thread composition adjustment method includes obtaining the managed memory size as an optimization goal, and decreasing a trigger threshold, the trigger threshold being a threshold of a garbage collector thread, the computing system configured to trigger garbage collection when an amount of managed memory' allocated by the thread reaches the trigger threshold. This method has the technical benefit of automatically and proactively improving garbage collector thread composition in a manner (decrease threshold at which garbage collection is triggered) that tends to decrease managed memory size. Because managed memory size is an optimization goal, decreasing managed memory size indicates improved garbage collection efficiency.

[0034] In some embodiments, a garbage collector thread composition adjustment method includes at least one of the following accessing a garbage collector thread composition controller interface: a reinforcement learning mechanism, a testing tool, a profiling tool, or a diagnostic tool. This method has the technical benefit of automatically and proactively improving garbage collector efficiency or flexibility' or both, with respect to garbage collector thread composition. In some embodiments, the garbage collector thread composition controller interface includes an application program interface (API). In some scenarios, the API permits a user process to specify dynamically how many processor cores the garbage collector uses, e.g., as a min, a max, or a range. In some scenarios, the API permits a reinforcement learning mechanism, a testing tool, a profiling tool, or a diagnostic tool to specify particular garbage collector thread compositions in order to assess the efficiency or operational accuracy of specified compositions, thus improving the efficiency and usability' of these mechanisms and tools.

[0035] These and other benefits will be apparent to one of skill from the teachings provided herein.

[0036] Operating Environments

[0037] With reference to Figure 1. an operating environment 100 for an embodiment includes at least one computer system 102. The computer system 102 may be a multiprocessor computer system, or not. An operating environment may include one or more machines in a given computer system, which may be clustered, client-server networked, and / or peer-to-peer networked within a cloud 136. An individual machine is a computer system, and a network or other group ofcooperating machines is also a computer system. A given computer system 102 may be configured for end-users, e.g., with applications, for administrators, as a server, as a distributed processing node, and / or in other ways.

[0038] Human users 104 sometimes interact with a computer system 102 user interface 322 by using displays 126, keyboards 106, and other peripherals 106. via typed text, touch, voice, movement, computer vision, gestures, and / or other forms of I / O. Virtual reality or augmented reality or both functionalities are provided by a system 102 in some embodiments. A screen 126 is a removable peripheral 106 in some embodiments and is an integral part of the system 102 in some embodiments. The user interface supports interaction between an embodiment and one or more human users. In some embodiments, the user interface includes one or more of: a command line interface, a graphical user interface (GUI), natural user interface (NUI), voice command interface, or other user interface (UI) presentations, presented as distinct options or integrated.

[0039] System administrators, network administrators, cloud administrators, security analysts and other security personnel, operations personnel, developers, testers, engineers, auditors, and end-users are each a particular ty pe of human user 104. In some embodiments, automated agents, scripts, playback software, devices, and the like running or otherwise serving on behalf of one or more humans also have user accounts, e.g., service accounts. Sometimes a user account is created or otherwise provisioned as a human user account but in practice is used primarily or solely by one or more services; such an account is a de facto service account. Although a distinction could be made, “service account” and “machine-driven account” are used interchangeably herein with no limitation to any particular vendor.

[0040] Storage devices or networking devices or both are considered peripheral equipment in some embodiments and part of a system 102 in other embodiments, depending on their detachability from the processor 110. In some embodiments, other computer systems not shown in Figure 1 interact in technological ways with the computer system 102 or with another system embodiment using one or more connections to a cloud 136 and / or other network 108 via network interface equipment, for example.

[0041] Each computer system 102 includes at least one processor 110. The computer system 102, like other suitable systems, also includes one or more computer-readable storage media 112, also referred to as computer-readable storage devices 112. In some embodiments, tools 122 include security tools or software applications, on mobile devices 102 or workstations 102 or servers 102, editors, compilers, debuggers and other software development tools, as well as APIs, browsers, or webpages and the corresponding software for protocols such as HTTPS, for example. Files, APIs, endpoints, and other resources may be accessed by an account or set of accounts, user 104 or group of users 104, IP address or group of IP addresses, or other entity. Access attemptsmay present passwords, digital certificates, tokens or other types of authentication credentials.

[0042] Storage media 112 occurs in different physical types. Some examples of storage media 112 are volatile memory, nonvolatile memory, fixed in place media, removable media, magnetic media, optical media, solid-state media, and other types of physical durable storage media (as opposed to merely a propagated signal or mere energy). In particular, in some embodiments a configured storage medium 114 such as a portable (i.e., external) hard drive, CD, DVD, memory stick, or other removable nonvolatile memory medium becomes functionally a technological part of the computer system when inserted or otherwise installed, making its content accessible for interaction with and use by processor 110. The removable configured storage medium 114 is an example of a computer-readable storage medium 112. Some other examples of computer-readable storage media 112 include built-in RAM, ROM, hard disks, and other memory storage devices which are not readily removable by users 104. For compliance with current United States patent requirements, neither a computer-readable medium nor a computer-readable storage medium nor a computer-readable memory nor a computer-readable storage device is a signal per se or mere energy under any claim pending or granted in the United States.

[0043] The storage device 114 is configured with binary instructions 116 that are executable by a processor 110; “executable” is used in a broad sense herein to include machine code, interpretable code, bytecode, and / or code that runs on a virtual machine, for example. The storage medium 114 is also configured with data 118 which is created, modified, referenced, and / or otherwise used for technical effect by execution of the instructions 116. The instructions 116 and the data 118 configure the memory' or other storage medium 114 in which they reside; when that memory or other computer readable storage medium is a functional part of a given computer system, the instructions 116 and data 118 also configure that computer system. In some embodiments, a portion of the data 118 is representative of real-world items such as events manifested in the system 102 hardware, product characteristics, inventories, physical measurements, settings, images, readings, volumes, and so forth. Such data is also transformed by backup, restore, commits, aborts, reformatting, and / or other technical operations.

[0044] Although an embodiment is described as being implemented as software instructions executed by one or more processors in a computing device (e.g., general purpose computer, server, or cluster), such description is not meant to exhaust all possible embodiments. One of skill will understand that the same or similar functionality can also often be implemented, in whole or in part, directly in hardware logic, to provide the same or similar technical effects. Alternatively, or in addition to software implementation, the technical functionality described herein can be performed, at least in part, by one or more hardware logic components. For example, and w ithout excluding other implementations, some embodiments include one of more of: hardware logiccomponents 110, 128 such as Field-Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application-Specific Standard Products (ASSPs), System-on-a-Chip components (SOCs), Complex Programmable Logic Devices (CPLDs), and similar components. In some embodiments, components are grouped into interacting functional modules based on their inputs, outputs, or their technical effects, for example.

[0045] In addition to processors 110 (e.g., CPUs, ALUs, FPUs, TPUs, GPUs, and / or quantum processors), memory' / storage media 112, peripherals 106, and displays 126, some operating environments also include other hardware 128, such as batteries, buses, power supplies, wired and wireless network interface cards, for instance. The nouns "‘screen” and “display” are used interchangeably herein. In some embodiments, a display 126 includes one or more touch screens, screens responsive to input from a pen or tablet, or screens which operate solely for output. In some embodiments, peripherals 106 such as human user I / O devices (screen, keyboard, mouse, tablet, microphone, speaker, motion sensor, etc.) will be present in operable communication with one or more processors 110 and memory 112.

[0046] In some embodiments, the system includes multiple computers connected by a wired and / or wireless network 108. Networking interface equipment 128 can provide access to networks 108, using network components such as a packet-switched network interface card, a wireless transceiver, or a telephone network interface, for example, which are present in some computer systems. In some, virtualizations of networking interface equipment and other network components such as switches or routers or firewalls are also present, e.g., in a software-defined network or a sandboxed or other secure cloud computing environment. In some embodiments, one or more computers are partially or fully “air gapped” by reason of being disconnected or only intermittently connected to another networked device or remote cloud. In particular, garbage collector thread composition adjustment functionality 204 could be installed on an air gapped network and then be updated periodically or on occasion using removable media 114, or not updated at all. Some embodiments also communicate technical data or technical instructions or both through direct memory access, removable or non-removable volatile or nonvolatile storage media, or other information storage-retrieval and / or transmission approaches.

[0047] One of skill will appreciate that the foregoing aspects and other aspects presented herein under “Operating Environments” form part of some embodiments. This document’s headings are not intended to provide a strict classification of features into embodiment and nonembodiment feature sets.

[0048] One or more items are shown in outline form in the Figures, or listed inside parentheses, to emphasize that they are not necessarily part of the illustrated operating environment or all embodiments, but interoperate with items in an operating environment or someembodiments as discussed herein. It does not follow that any items which are not in outline or parenthetical form are necessarily required, in any Figure or any embodiment. In particular, Figure 1 is provided for convenience; inclusion of an item in Figure 1 does not imply that the item, or the described use of the item, was known prior to the current innovations.

[0049] In any later application that claims priority to the current application, reference numerals may be added to designate items disclosed in the current application. Such items may include, e.g., software, hardware, steps, processes, systems, functionalities, mechanisms, data structures, computational resources, programming languages, tools, workflows, or algorithm implementations, or other items in a computing environment, which are disclosed herein but not associated with a particular reference numeral herein. Corresponding drawings may also be added.

[0050] More About Systems

[0051] Figure 2 illustrates a computing system 102 configured by one or more of the garbage collector thread composition enhancements taught herein, resulting in an enhanced system 202. The terms “garbage collector thread composition’’ and “garbage collection thread composition” are used interchangeably herein. In some embodiments, this enhanced system 202 includes a single machine, a local network of machines, machines in a particular building, machines used by a particular entity’, machines in a particular datacenter, machines in a particular cloud, or another computing environment 100 that is suitably enhanced. Figure 2 items are discussed at various points herein, and additional details regarding them are provided in the discussion of a List of Reference Numerals later in this disclosure document.

[0052] Figure 3 shows some aspects of some enhanced systems 202. This is not a comprehensive summary of all aspects of enhanced systems 202 or all aspects of garbage collector thread composition adjustment functionality 204. Nor is it a comprehensive summary of all aspects of an environment 100 or system 202 or other context of an enhanced system 202, or a comprehensive summary of any aspect of functionality 204 for potential use in or with a system 102. Figure 3 items are discussed at various points herein, and additional details regarding them are provided in the discussion of a List of Reference Numerals later in this disclosure document.

[0053] Figure 4 shows some additional aspects of garbage collector thread composition adjustment 206. This is not a comprehensive summary’ of all additional aspects of garbage collector thread composition adjustment, or all aspects of garbage collector thread composition adjustment functionality 204. Figure 4 items are discussed at various points herein, and additional details regarding them are provided in the discussion of a List of Reference Numerals later in this disclosure document.

[0054] Figure 5 shows some aspects of garbage collector thread composition adjustment inputs 306. This is not a comprehensive summary of all inputs to garbage collector threadcomposition adjustment, or a requirement that every example input shown be used in a given embodiment. Figure 5 items are discussed at various points herein, and additional details regarding them are provided in the discussion of a List of Reference Numerals later in this disclosure document.

[0055] Figure 6 shows some aspects of garbage collector thread composition 134. This is not a comprehensive summary of all aspects or examples of garbage collector thread composition, or a requirement that every' example aspect shown be used in a given embodiment. Figure 6 items are discussed at various points herein, and additional details regarding them are provided in the discussion of a List of Reference Numerals later in this disclosure document.

[0056] The other figures are also relevant to systems 202. Figures 7 and 8 illustrate methods of system 202 operation.

[0057] In some embodiments, the enhanced system 202 is networked through an interface 322. In some, an interface 322 includes hardware such as network interface cards, software such as network stacks, APIs, or sockets, combination items such as network connections, or a combination thereof.

[0058] Some embodiments include a computing system 202 with a garbage collector (GC) thread composition controller 302. The composition controller may be integrated into a garbage collector 210, or not. depending on the embodiment. The composition controller adjusts 206 the garbage collector thread composition 134 based on one or more adjustment inputs 306.

[0059] In some embodiments and some scenarios, the adjustment 206 is performed proactively by the composition controller 302. In some, the adjustment 206 is performed in response to input from a routine 320 which is invoked, e.g., by a user process 124 or by another caller 404 such as a tool 122. Some adjustments 206 are performed proactively and some adjustments 206 are performed in response to API 318 calls. For example, in some scenarios a GC thread control API 318 allows a user to say how many cores 528 the GC can use, or lets a reinforcement learning mechanism 214 set boundaries 324, 530, or 416 to facilitate testing. In some scenarios, the GC thread control API 318 allows the thread composition controller 302 to accept information that is external to the process 124 and external to the GC 210, and based at least in part on that external info the composition controller 302 can then influence or override the GC thread composition 134.

[0060] Thread count 324 is an aspect of thread composition 134. In some embodiments, thread count 324 is the only aspect of thread composition 134 which is monitored or controlled by a composition controller 302. But in some other embodiments one or more additional aspects of thread composition 134 are also monitored or controlled, such as: a number 612 of GC allocation thread 510 supports 616, a number 604 of GC compacting threads 518, a number 606 of GCmarking threads 514, a number 608 of GC sweeping threads 522, a number 610 of GC threads 132 in total, or an amount 416 of allocated memory per GC thread that triggers garbage collection.

[0061] Some examples of different kinds 614 of allocation thread support 616 include defragmented (compacted) areas of allocatable heap, copy garbage collection functionality which copies live objects out of a memory region to empty the region, and portions of a garbage collector which are invoked in response to a user process allocation request such as an object constructor call or a mallocQ call. In particular, in some implementations when a user process allocation thread 510 request reaches a GC, the request switches to a corresponding GC thread, which accordingly also functions as an allocation thread 510. An allocation thread support count 612 represents a magnitude of allocation thread supports, e.g., a number of GC threads which are invoked in response to a user process allocation request, or a number of emptied or otherwise defragmented regions of heap of at least a predetermined size.

[0062] Some embodiments include a computing system 202 which is configured to adjust a thread composition 134 of a garbage collector 210 during an execution of a process 124 which uses a managed memory' 112. The managed memory' is managed at least in part by' the garbage collector. The computing system includes: a digital memory' 112 which includes the managed memory 112. and a processor set 110 including at least one processor, the processor set in operable communication with the digital memory. The system 202 also includes a composition controller 302, the composition controller being more specifically a garbage collector thread composition controller 302 which performs thread composition adjustment 206.

[0063] The composition controller 302 is configured to, upon execution by the processor set, adjust 206 the thread composition 134 during the execution of the process 124 by making an adjustment 206 which changes the thread composition from a prior thread composition 134 to an adjusted thread composition 134. Execution of the garbage collector 210 overlaps execution of the process 124 for which the garbage collector is managing memory' 112. The adjustment is based at least in part on at least one of the following adjustment inputs 306: a process throughput 502, a garbage collector pause time 504, a managed memory size 506, an allocation thread count 602, an allocation thread support count 612, a garbage collector thread count 324 (any of 602, 604, 606, 608, or 610), a memory' allocation rate 532, a garbage collector thread work level 524, a composition controller interface routine 320 result 526, a processor core count 530, or a reinforcement learning 212 result 534.

[0064] Although heap memory is managed memory, the term “managed memory’’ is used herein instead of “heap” to help avoid confusion, because “heap” can mean two different things in embodiments in which individual threads are responsible for only a portion of a larger area of managed memory. From the GC perspective, the managed memory in such an implementation ismade of multiple per-thread heaps, whereas from the process 124 perspective it’s all one heap. Sometimes work stealing between such GC threads is permitted, but a given thread remains primarily responsible for managing its own respective heap on behalf of the process 124. In some other embodiments, by contrast, a GC thread is not primarily or solely responsible for only a portion of the heap; instead, every GC thread can routinely manage any portion of the heap. Under either approach - whether the heap is divided between threads, or not - the managed memory includes at least one heap.

[0065] Some embodiments further include the garbage collector itself, in addition to the composition controller 302. Thus, in some embodiments, the composition controller is not integrated to the garbage collector, e g., the composition controller 302 can be modified or substituted without necessarily recompiling the garbage collector. In other embodiments, the composition controller is an integrated portion of the garbage collector.

[0066] Some embodiments further include a reinforcement learning (RL) mechanism 214, the reinforcement learning mechanism configured to perform reinforcement learning 212 which produces the reinforcement learning result 534 that is based at least in part on at least one of the adjustment inputs 306.

[0067] In some embodiments, an RL input 306 represents an amount of deviation from an optimization target. In some of these, deviation is measured in quanta or only provided when above a specified threshold, or both. Deviation is absolute or relative. For example, in one scenario when a measured pause time 504 is sufficiently higher than an optimization target pause time 504, the difference between measured and target values is submitted as an input to the reinforcement learning mechanism 214. This embodiment therefore includes a reinforcement learning closed feedback loop. In some embodiments, the reinforcement learning mechanism utilizes or includes a proportional-integral-derivative controller (PID) loop. Reinforcement learning 212 is discussed further in a separate section later in this disclosure.

[0068] In some embodiments, programmatic access to the composition controller 302 is provided by a composition controller interface 318, which includes an API 318 or other programmatic interface 322. In some embodiments, the API or a portion of the API is exposed for use in end user calls from a caller process 124, 404. In some, API routines 320 to specify a min / max permitted quantum 402 for adjustment of thread count(s) 324 are not published for use by end users. However, the min / max permitted quantum 402 for adjustment of thread count is utilized or made available for use as an internal tuning parameter. In addition to, or in place of, publishing a composition controller API 318 to end users, the API is sometimes invoked by or published to one or more of: the RL mechanism 214, a testing tool 122, a profiling tool 122, or a diagnostic tool 122.

[0069] In some embodiments, the composition controller interface 318 includes a routine 320 which is configured to, upon execution by the processor set during the process execution, specify 804 an optimization goal 312 to the composition controller. For example, sometimes a goal 312 requests or commands the composition controller 302 to optimize GC thread composition for throughput 502, pause time 504. heap size 506, or a weighted 410 mix thereof.

[0070] In some embodiments, the composition controller interface 318 includes a routine 320 which is configured to, upon execution by the processor set during the process execution, specify 804 a processor core count 530 constraint 820 to the composition controller. For example, sometimes a routine 320 requests or commands the composition controller 302 to have the GC use up to a Max number of the cores, or to use between a Low number and a High number of the cores.

[0071] In some embodiments, the composition controller interface 318 includes a routine 320 which is configured to, upon execution by the processor set during the process execution, specify 804 a minimum permitted quantum 402 for any adjustment in a number of garbage collector threads. For example, sometimes a routine 320 requests or commands the composition controller 302 to not change the number 610 of GC threads 132 unless the change is by at least three threads.

[0072] In some embodiments, the composition controller interface 318 includes a routine 320 which is configured to. upon execution by the processor set during the process execution, specify 804 a maximum permitted quantum 402 for any adjustment in a number of garbage collector threads. For example, sometimes a routine 320 requests or commands the composition controller 302 to not change the number 610 of GC threads 132 by more than two threads at a time.

[0073] In some embodiments, the composition controller interface 318 includes a routine 320 which is configured to, upon execution by the processor set during the process execution, specify 804 a minimum permitted wait 408 between any adjustments in a number of garbage collector threads. For example, sometimes a routine 320 requests or commands the composition controller 302 to wait at least 500 milliseconds between changes in the number of GC threads.

[0074] In some embodiments, the composition controller interface 318 includes a routine 320 which is configured to, upon execution by the processor set during the process execution, specify 804 a maximum permitted wait 408 between any adjustments in a number of garbage collector threads. For example, sometimes a routine 320 requests or commands the composition controller 302 to wait no longer than 1000 milliseconds between changes in the number of GC threads.

[0075] Other system embodiments are also described herein, either directly or derivable as system versions of described processes or configured media, duly informed by the extensive discussion herein of computing hardware.

[0076] Although specific garbage collector thread composition adjustment architectureexamples are shown in the Figures, an embodiment may depart from those examples. For instance, items shown in different Figures may be included together in an embodiment, items shown in a Figure may be omitted, functionality shown in different items may be combined into few er items or into a single item, items may be renamed, or items may be connected differently to one another.

[0077] Examples are provided in this disclosure to help illustrate aspects of the technology, but the examples given within this document do not describe all of the possible embodiments. A given embodiment may include additional or different kinds of garbage collector thread composition adjustment functionality, for example, as well as different technical features, aspects, mechanisms, software, expressions, operational sequences, commands, data structures, programming environments, execution environments, environment or system characteristics, or other functionality consistent with teachings provided herein, and may otherwise depart from the particular examples provided.

[0078] Processes (a.k.a. Methods)

[0079] Processes (which are also be referred to as “methods” in the legal sense of that word) are illustrated in various ways herein, both in text and in drawing figures. Figures 7 and 8 each illustrate a family of methods 700 and 800 respectively, which are performed or assisted by some enhanced systems, such as some systems 202 or another garbage collector thread composition adjustment functionality enhanced system as taught herein. Method family 700 is a proper subset of method family 800.

[0080] Figures 1 to 6 illustrate garbage collector thread composition adjustment system 202 architectures with implicit or explicit actions, e.g., launching a process 124, launching a garbage collector, and performing garbage collection operations such as marking, sweeping, compacting, allocating, updating GC data structures, creating or suspending or reviving or terminating GC threads, or otherwise processing data 118, in which the data 118 includes, e.g., heap memory 112, GC data structures, and adjustment inputs 306, among other examples disclosed herein.

[0081] Technical processes shown in the Figures or otherwise disclosed will be performed automatically, e.g., by an enhanced system 202, unless otherwise indicated. Related non-claimed processes may also be performed in part automatically and in part manually to the extent action by a human person is implicated, e.g., in some situations a human 104 types data in response to process 124 execution or kernel 120 execution. But no process contemplated as innovative herein is entirely manual or purely mental; none of the claimed processes can be performed solely in a human mind or on paper. Any claim interpretation to the contrary is squarely at odds with the present disclosure.

[0082] In a given embodiment zero or more illustrated steps of a process may be repeated, perhaps with different parameters or data to operate on. Steps in an embodiment may also be donein a different order than the top-to-bottom order that is laid out in Figure 8. Figure 8 is a supplement to the textual examples of embodiments provided herein and the textual descriptions of embodiments provided herein. In the event of any alleged inconsistency, lack of clarity, or excessive breadth due to an aspect or interpretation of Figure 8, the text of this disclosure shall prevail over that aspect or interpretation of Figure 8.

[0083] Arrows in process or data flow figures indicate allowable flows; arrows pointing in more than one direction thus indicate that flow may proceed in more than one direction. Steps may be performed serially, in a partially overlapping manner, or fully in parallel within a given flow. In particular, the order in which flowchart 800 action items are traversed to indicate the steps performed during a process may vary from one performance instance of the process to another performance instance of the process. The flowchart traversal order may also vary from one process embodiment to another process embodiment. Steps may also be omitted, combined, renamed, regrouped, be performed on one or more machines, or otherwise depart from the illustrated flow, provided that the process performed is operable and conforms to at least one claim of an application or patent that includes or claims priority to the present disclosure. To the extent that a person of skill considers a given sequence S of steps which is consistent with Figure 8 to be non- operable, the sequence S is not within the scope of any claim. Any assertion otherwise is contrary’ to the present disclosure.

[0084] Some embodiments provide or utilize a method 800 method performed by a computing system 202 having a managed memory to adjust 206 a thread composition 134 of a garbage collector 210 during an execution of a process which uses the managed memory, the managed memory being managed at least in part by the garbage collector. In this discussion and generally elsew here herein, “method’’ is used in the legal sense and “process” is used in the computer science sense. The method includes obtaining 304 at least one of the following adjustment inputs 306: a process 124 throughput 502, a garbage collector pause time 504, a managed memory size 506, an allocation thread count 602. an allocation thread support count 612, a garbage collector thread count 324 (any of 602-610), a memory allocation rate 532, a garbage collector thread work level 524, a composition controller interface routine result 526, a processor core count 530, or a reinforcement learning result 534; and during the execution of the process, making 206 an adjustment 206 which changes the thread composition 134 from a prior thread composition to an adjusted thread composition, the adjustment being based at least in part on at least one of the obtained adjustment inputs 306.

[0085] In some scenarios, throughput 502 is an optimization goal. In some embodiments, the method 800 checks the current number or kind of allocation thread supports. Then the method increases 810 the number of GC allocation thread supports or changes the kind of allocation threadsupport, or both, which should increase the allocation rate 532 (megabytes per second). An underlying technical assumption is that increasing the allocation rate will improve (increase) process throughput. If the assumption turns out to be incorrect, one or more subsequent adjustments 206 will compensate for the error.

[0086] In a first variation, the method checks the allocation rate before and after the adjustment to confirm 822 that the allocation rate actually increased sufficiently. If it did, further action to increase the allocation rate is skipped, but if it didn’t then the method increases 810 the allocation thread support count 612 again.

[0087] In a second variation, the method checks the cunent allocation rate before the adjustment and compares 806 it to a target allocation rate. Then the method consults 806 a table or a formula or another heuristic 418 to determine how much to increase the allocation thread support count, based on the current and target allocation rates.

[0088] In some method 800 embodiments, throughput 502 is made an optimization goal in that the obtaining 304 includes obtaining 304 the process throughput 502 adjustment input as an optimization goal 312. In some cases, a specific target throughput 502 is specified 304, in some throughput 502 is given 304 a weight 410 relative to other optimization goal(s), and in some throughput is designated 304 as a goal without any specific target or weight. Regardless, in the present example the obtaining 304 also includes obtaining 304 the allocation thread support count 612, and the adjustment 206 includes increasing 810 the allocation thread support count. In a variation, the step of obtaining an allocation thread support count is skipped and the method adds 810 another allocation thread support without checking the allocation thread support count first.

[0089] In some scenarios, pause time 504 is an optimization goal. In some embodiments, the method 800 checks the current number of threads and the current work level 524. The method discovers that there are too many GC threads for this amount of work, so the method reduces the number of GC threads. A technical assumption is that decreasing 810 the number of threads will reduce thread synchronization overhead and thus reduce GC pause time. If the assumption turns out to be incorrect, one or more subsequent adjustments 206 will compensate for the error.

[0090] Different embodiments define GC work level 524 in different particular ways. In general, an embodiment has data representing, for each GC thread, when the GC thread is doing work and when it’s not working, e.g., because it’s waiting. One measure of GC work level 524 is measured GC working time versus measured GC waiting time, either as a ratio or as a difference.

[0091] In some embodiments, a metric 314 indicates an approximate amount of work left for a GC to do, e.g., as represented by the amount of survived bytes for that GC to perform garbage collection operations on. If the survived bytes amount is very low- relative to a threshold 406, the embodiment reduces 810 the number of GC threads. In some cases, the amount of GC work to dois approximately proportional to the memory that stays on the heap (i.e., that survives). For generational GC this amount is approximately proportional to the memory that survived from the generations that get collected during that GC.

[0092] In a variation, a set of metrics 314 indicates how much work a GC faces by recording data that indicate how much of each kind of GC work was there for the GC to do. For example, some embodiments record the number of cards a GC goes through for young generation collections. Some embodiments also record activities that can be done in parallel or are done in parallel and also notes activities that can’t be done in parallel or aren’t done in parallel. The activities that can’t be or aren’t done in parallel are not dependent on the number of GC threads.

[0093] In some method 800 embodiments, pause time 504 is made an optimization goal in that the obtaining 304 includes obtaining 304 the garbage collector pause time 504 as an optimization goal 312. In some cases, a specific target pause time is specified 304, in some pause time is given 304 a weight 410 relative to other optimization goal(s), and in some pause time is designated 304 as a goal without any specific target or weight 410. Regardless, in the present example the obtaining 304 also includes obtaining 304 the garbage collector thread count 324 (any of 602-610) and obtaining 304 the garbage collector thread work level 524. The method 800 further includes determining 812 that the garbage collector thread count is above a threshold associated with the garbage collector thread work level, and the adjustment includes decreasing 810 the garbage collector thread count. A technical assumption is that decreasing GC thread count will reduce synchronization cost and make the GC run faster, thus improving (reducing) pause time 504. without harming GC efficiency, because there are too many GC threads for this amount of work. If the assumption turns out to be incorrect, one or more subsequent adjustments 206 will compensate for the error.

[0094] In a related scenario, pause time is again an optimization goal. The method checks the current number of threads and the current work level, and discovers that there are too few GC threads for this amount of work, so the method increases the number of GC threads. A technical assumption is that increasing the number of threads will reduce GC pause time despite the increase in synchronization overhead. If the assumption turns out to be incorrect, one or more subsequent adjustments 206 will compensate for the error.

[0095] That is, in some embodiments the obtaining includes obtaining 304 the garbage collector pause time as an optimization goal; the obtaining 304 also includes obtaining the garbage collector thread count and the garbage collector thread work level 524; and the method further includes determining 812 that the garbage collector thread count is below a threshold associated with the garbage collector thread work level (too few GC threads for this amount of work). The adjustment includes increasing 810 the garbage collector thread count. A technical assumption isthat increasing GC thread count will make the GC run faster despite increased synchronization cost, thus improving (reducing) pause time. If the assumption turns out to be incorrect, one or more subsequent adjustments 206 will compensate for the error.

[0096] In some scenarios, heap size 506 is an optimization goal. In some embodiments, the method 800 increases 810 the number 604 of compacting threads 518. The technical assumption is that increasing the number of compacting threads will reduce heap size; if this is incorrect, subsequent adjustment(s) 206 can be made.

[0097] In some embodiments, the obtaining 304 includes obtaining 304 the managed memory' size 506 as an optimization goal 312. In some cases, a specific target size 506 is specified 304 for a particular thread’s part of the heap or for the overall heap, in some cases heap size is given 304 a weight 410 relative to other optimization goal(s), and in some heap size is designated 304 as a goal without any specific target or weight. The adjustment includes increasing 810 the garbage collector thread count 610 and 604 by adding at least one garbage collector compacting thread 518.

[0098] In a related scenario, heap size is again an optimization goal. But in this scenario the method 800 decreases the amount 416 of allocated memory7per GC thread that triggers garbage collection.

[0099] In some embodiments, the obtaining 304 includes obtaining 304 the managed memory size 506 as an optimization goal 312. In some cases, a specific target size 506 is specified 304 for a particular thread’s part of the heap or specified 304 for the overall heap, in some cases heap size is given 814 a weight 410 relative to other optimization goal(s), and in some the heap size is designated 304 as a goal 312 without any specific target or weight. The adjustment 206 includes decreasing 810 a trigger threshold 416, the trigger threshold being a threshold 406 of a garbage collector thread 132, the computing system 202 configured to trigger garbage collection when an amount of managed memory allocated by the thread reaches the trigger threshold.

[0100] In another scenario, the method 800 checks how long a thread has to wait during allocation. The thread might not request as much memory in the allocation, but an optimization target is to finish each allocation faster than previously measured, or to finish faster than a specified wait time.

[0101] In some embodiments, the obtaining 304 includes obtaining 304 the process throughput 502 adjustment input 306 as an optimization goal 312. The obtaining also includes obtaining 304 the allocation thread support count 612 and obtaining 304 an allocation duration 536. The adjustment includes adjusting 206 the allocation thread support count 612 based at least in part on the allocation duration. Waiting for allocations cuts into throughput 502. In general, adding allocation thread supports will tend to reduce allocation duration, and removing allocationthread supports will tend to increase allocation duration. As in other scenarios, further adjustments are also possible if the optimization target is not reached.

[0102] Some embodiments and scenarios utilize multiple optimization goals 312. Sometimes goals 312 are weighted 410 relative to one another. For example, one scenario specifies 80% throughput 502 and 20% pause 504 as weighted optimization goals 312. Adjustment 206 operations are then prioritized and performed accordingly.

[0103] In some embodiments, the obtaining 304 includes obtaining 304 at least two optimization goals 312, the obtained optimization goals including at least two of the following: the process throughput 502, the garbage collector pause time 504, or the managed memory size 506; and the method 800 further includes assigning 814 each of the obtained optimization goals a weight 410 relative to one or more other obtained optimization goals.

[0104] In some embodiments, reinforcement learning drives thread composition adjustments. In some, the obtaining 304 includes obtaining 304 the reinforcement learning result 534, and the adjustment 206 is based on at least the reinforcement learning result.

[0105] Some scenarios highlight the dynamic nature of thread composition adjustments. In some embodiments and scenarios, the method 800 repeats in multiple instances 412 of the method, and the instances are characterized by meeting 816 at least one of the following dynamic characteristics 818: the instances collectively make at least three thread composition adjustments 206 during the execution of the process; or the instances collectively make an average of at least one thread composition adjustment 206 per minute during the execution of the process, and the execution lasts at least two minutes.

[0106] In some embodiments, the method 800 includes at least one of the following accessing 808 a garbage collector thread composition controller interface 318: a reinforcement learning mechanism 214, a testing tool 122, a profiling tool 122, or a diagnostic tool 122.

[0107] Configured Storage Media

[0108] Some embodiments include a configured computer-readable storage medium 112. Some examples of storage medium 1 12 include disks (magnetic, optical, or otherwise), RAM, EEPROMS or other ROMs, and other configurable memory, including in particular computer- readable storage media (which are not mere propagated signals). In some embodiments, the storage medium which is configured is in particular a removable storage medium 114 such as a CD, DVD. or flash memory. A general-purpose memory, which is be removable or not, and is volatile or not, depending on the embodiment, can be configured in the embodiment using items such as a garbage collector 210, a garbage collection thread composition controller 302, a composition controller interface 318, thread counts 324, composition adjustment inputs 306, and a reinforcement learning mechanism 214, in the form of data 118 and instructions 116. read froma removable storage medium 114 and / or another source such as a network connection, to form a configured storage medium. The configured storage medium 112 is capable of causing a computer system 202 to perform technical process steps for providing or utilizing garbage collection thread composition adjustment functionality 204, as disclosed herein. The Figures thus help illustrate configured storage media embodiments and process (a.k.a. method) embodiments, as well as system and process embodiments. In particular, any of the method steps illustrated in Figures 7 or 8, or otherwise taught herein, may be used to help configure a storage medium to form a configured storage medium embodiment.

[0109] Some embodiments use or provide a computer-readable storage device 112, 114 configured with data 118 and instructions 116 which upon execution by a processor 1 10 cause a computing system 202 to perform a method 800 to adjust a thread composition 134 of a garbage collector during an execution of a garbage collected process (one which uses a garbage collector managed memory 112). This method includes obtaining 304 at least one of the following adjustment inputs 306: a process throughput 502, a garbage collector pause time 504, a managed memory size 506, an allocation thread count 602, an allocation thread support count 612, a garbage collector thread count 324, a memory' allocation rate 532, a garbage collector thread work level 524, a composition controller interface routine result 526, a processor core count 530, or a reinforcement learning result 534: and during the execution of the process 124. making 206 an adjustment 206 which changes the thread composition from a prior thread composition to an adjusted thread composition, the adjustment 206 being based at least in part on at least one of the obtained adjustment inputs 306.

[0110] In some embodiments, the obtaining obtains 304 at least two of the adjustment inputs, and the adjustment is based at least in part on the at least two obtained adjustment inputs. In some, the obtaining obtains 304 at least N of the adjustment inputs, and the adjustment is based at least in part on the at least N obtained adjustment inputs, where N is in the range from three to nine.

[0111] In some embodiments, the obtaining 304 includes obtaining 304 the process throughput 502 adjustment input as an optimization goal 312, and the adjustment includes adjusting 206 the allocation thread support count 612.

[0112] In some embodiments, the obtaining 304 includes obtaining 304 the managed memory' size 506 as an optimization goal 312, and the adjustment includes adjusting 206 a garbage collector compacting thread count 604.

[0113] In some embodiments, the obtaining 304 includes obtaining 304 the garbage collector pause time 504 as an optimization goal 312, and the adjustment includes adjusting 206 the garbage collector thread count 610.

[0114] More About Reinforcement Learning

[0115] In some embodiments, reinforcement learning functionality (RL) is a closed feedback loop, and is used to leam an optimal policy or an optimal function to decide what heap thread count or other target to choose based on some optimization criteria. In some cases, the optimization criteria include the reduction of total pause time, an optimal heap size, or dampening tail latencies, or a combination of any of these.

[0116] In some embodiments, components in a RL algorithm include the following.

[0117] An agent component includes a learning decision maker that interacts with the environment. The garbage collector 210 is the agent in these examples.

[0118] An environment component includes a realm 100 in which the agent operates. In these examples the environment includes an execution engine 120 and a managed application process 124, because the garbage collector 210 is reactive to conditions available to both. Although reference numeral 124 is applied herein to both a process and a managed application for convenience, in some variations the managed application includes multiple processes which are individually memory managed by garbage collection.

[0119] A state component includes a digital representation of a current situation of the agent. In these examples the state of the managed process includes one or more metrics 314, such as fragmentation, allocations, durations, counts, context switches, and so on. In some cases, state data 118 also includes a virtual machine state at a particular point in time.

[0120] A reward component includes feedback data 118 from the environment. A user process or other goal 312 selector chooses or influences a choice of feedback which is utilized to tune garbage collection, e.g., based on metrics such as those associated with total pause duration, memory footprint, tail latency, or a combination.

[0121] A policy component includes a function that computationally maps the agent’s state to a specific action. In some cases, the map function implements an algorithm to decide what is the most optimal heap count (or other goal 312) at a given point in time.

[0122] A value component includes a digital representation of a future reward an agent would receive by taking the specified action. In some cases, a value represents a long-term improvement or reward obtained by choosing a specific heap thread count 324 or heap size 506 based on a particular state. In some cases, a value is the total pause time, a heap size before a garbage collection operation, a predefined percentile (e.g., 95%) of a goal 312, or a combination of any of these.

[0123] In some embodiments, a RL closed feedback loop 900 is consistent with the diagram shown in Figure 9. In that diagram, St is the state at time t, St+1 is the state at time t+1, Rt is the reward at time t, Rt+1 is the reward at time t+1, At is the action at time t, and arrows represent data flow. The vertical dashed line represents a boundary’ between time t and time t+1. In somevariations, only the process 124 or the execution engine 120 is present in the RL loop.

[0124] In some embodiments, the agent (GC) leams an optimal policy using a version of RL known as Q-Leaming. In some, the agent (GC) leams an optimal policy using a version of RL which is model-free, such as RL utilizing Markov Decision Processes (MDPs) or RL utilizing State- Action-Reward-State-Action (SARSA).

[0125] Additional Observations

[0126] Additional support for the discussion of garbage collector thread composition adjustment functionality 204 herein is provided under various headings. However, it is all intended to be understood as an integrated and integral part of the present disclosure's discussion of the contemplated embodiments.

[0127] One of skill will recognize that not every part of this disclosure, or any particular details therein, are necessarily required to satisfy legal criteria such as enablement, written description, best mode, novelty, nonobviousness, inventive step, or industrial applicability. Any apparent conflict with any other patent disclosure, even from the owner of the present innovations, has no role in interpreting the claims presented in this patent disclosure. With this understanding, which pertains to all parts of the present disclosure, examples and observations are offered herein.

[0128] Some workloads do computational work in bursts. For example, a mail server often has busy times and slack times. In some environments, a garbage collection thread count is set by configuration or command line value to a count high enough to cover expected bursts. But this count may well overshoot what is needed for the bursts. Moreover, outside of the bursts the higher thread count creates inefficiencies, e.g.. due to interthread communication synchronization, per thread data structures, and in some implementations, fragmentation of the heap. Determining even an approximately efficiently initial GC thread count also requires expertise, and performance data, that is not always present in a given managed memoiy program execution environment.

[0129] Some embodiments disclosed herein improve garbage collector performance in containers by dynamically adjusting the number of garbage collector threads during the container process lifetime. Some familiar GCs have options to specify the number of GC threads, but this number does not change during the process lifetime. For example, if the workload suddenly increases and there is a lot more survival, adjusting to provide more GC threads would be beneficial instead of staying with a constant number of GC threads.

[0130] In some embodiments, a method 800 of managing memoiy in a computing system includes: ascertaining 304 a current garbage collection thread count which indicates how- many 324 garbage collection threads 132 are currently enabled; obtaining 304 at least one of the following factors 306: an allocation thread count which indicates how many allocation threads are enabled, an allocation thread support count 612, an allocation rate which indicates how fastallocations occur, a garbage collection thread work level which indicates whether it’s productive to adjust the thread count relative to the fixed cost of a garbage collection, an available core count which indicates how many processor cores are available, or a reinforcement learning result which indicates how well the adjustment has worked; determining 806 a target 312 garbage collection thread count; and adjusting 206 the number of enabled garbage collection threads when the target garbage collection thread count differs from the current garbage collection thread count.

[0131] Some embodiments dynamically adjust the number of GC threads for optimal performance in nonregular workloads. In this context, “nonregular’' workloads are bursty workloads where the demand varies during a process's lifetime, or workloads for which the demand is regular but the process is relocated or reconfigured for running in different software or hardware configurations.

[0132] In some environments 100, a parallel GC 210 uses multiple GC threads 132 to perform the GC work so it can finish in a shorter amount of time. In a familiar implementation there is a constant number of GC threads. In some cases, this number can be configured with a selected initial value, but still doesn’t change during the process lifetime. However, depending on the workload and the environment the process runs in, vary ing the number of GC threads can be very beneficial.

[0133] Some embodiments vary the number of GC threads or the allocation support based on one or more of the following factors 306.

[0134] A number 602 of allocating threads and an allocation rate 532. If GC threads are also responsible for doing the allocation work, when there's more allocation work more GC threads would tend to be beneficial.

[0135] An amount 524 of GC work. If there’s too little GC work, the synchronization cost between garbage collector (GC) threads can be too costly relative to the amount of GC work, so fewer GC threads (or just one thread) can make each garbage collection (GC) faster. If there's a lot of GC work, more GC threads will tend to make GCs finish more quickly and the synchronization cost will be amortized by the amount of GC work.

[0136] Number 530 of available cores 528. Adjusting the number of GC threads may be costly depending on the implementation, so some embodiments have a quantum 402 or an interval 408 or both at which the number 530 is adjusted 206. In some cases, if there are more cores than a threshold then this interval is larger and vice versa. For example, in some cases if the system 202 has eight cores available for GC, a quantum 402 of one is used but if the system has at least sixteen cores a quantum of two is used, and if the system 202 has at least fifty' cores then a quantum of eight is used. In some cases, if a system 202 has a hundred cores, it does not adjust from two GC threads to three GC threads, rather it adjusts 206 from two threads to ten threads. Thecomputational cost of adjusting from two to ten is about the same as adjusting from two to three. Some embodiments use some reinforcement learning 212 to see if changing the number 324 of GC threads 132 dynamically is likely to, or does, result in better performance.

[0137] Some embodiments provide an API 318 for users to change the number of GC threads, e.g., when it is known the workload is changing.

[0138] As a note on the implementation, in the parallel GC in some systems each GC thread works on its own part of the heap, although there is some work stealing between threads. As a result, changing the number of GC threads involves dividing up the heap differently. This division of the heap includes updating data structures that are associated with the heap parts, to reflect the new number of GC threads. Some data structures associated with the GC or with a GC thread specify, e.g., which portion of the heap corresponds to which thread, where in memory that portion of the heap is located, and where to access a free list of items for fitting.

[0139] Some embodiments give 814 different factors 306 different weights 410 depending on the optimization goal 312. For example, sometimes an API 318 permits a caller 404 to request or require optimization for throughput (maximize), for GC pause time (minimize), or for GC heap size (smaller is better). (The heap 112 that is managed by a GC is sometimes referred to as the “GC heap”. This is not to be confused with a separate memory region in some GC implementations that is also organized as a heap but is used by the GC itself, a.k.a. the “GC’s heap” or the “GC’s own heap”.) Some embodiments favor a GC work level as an input 306 when optimizing 310 for GC pause time. In some cases, there is lots of GC work to do even though there are not many allocations, so the controller 302 increases thread count to finish GC sooner.

[0140] Some embodiments optimize GC heap size 506 by keeping the same number of GC threads but reducing the number 416 of megabytes a process can allocate on the GC heap before triggering the next garbage collection. Some embodiments optimize GC heap size 506 by changing the number of GC threads, e.g., creating more compacting GC threads instead of sweeping. Some do a mix.

[0141] In some embodiments, the system 202 is an embedded system such as an Internet of Things system. “loT” or “Internet of Things” means any networked collection of addressable embedded computing or data generation or actuator nodes. An individual node is referred to as an internet of things device 101 or loT device 101 or internet of things system 102 or loT system 102. Such nodes are examples of computer systems 102 as defined herein, and may include or be referred to as a “smart” device, “endpoint”, “chip”, “label”, or “tag”, for example, and loT may be referred to as a “cyber-physical system”. In the phrase “embedded system” the embedding referred to is the embedding a processor and memory' in a device, not the embedding of debug script in source code.

[0142] loT nodes and systems typically have at least two of the following characteristics: (a) no local human-readable display; (b) no local keyboard; (c) a primary source of input is sensors that track sources of non-linguistic data to be uploaded from the loT device; (d) no local rotational disk storage - RAM chips or ROM chips provide the only local memory; (e) no CD or DVD drive; (1) being embedded in a household appliance or household fixture; (g) being embedded in an implanted or wearable medical device; (h) being embedded in a vehicle; (i) being embedded in a process automation control system; or (j) a design focused on one of the following: environmental monitoring, civic infrastructure monitoring, agriculture, industrial equipment monitoring, energy usage monitoring, human or animal health or fitness monitoring, physical security, physical transportation system monitoring, object tracking, inventory control, supply chain control, fleet management, or manufacturing. loT communications may use protocols such as TCP / IP, Constrained Application Protocol (CoAP). Message Queuing Telemetry Transport (MQTT), Advanced Message Queuing Protocol (AMQP), HTTP, HTTPS, Transport Layer Security (TLS), UDP, or Simple Object Access Protocol (SOAP), for example, for wired or wireless (cellular or otherwise) communication. loT storage or actuators or data output or control may be a target of unauthorized access, either via a cloud, via another netw ork, or via direct local access attempts.

[0143] Technical Character

[0144] The technical character of embodiments described herein will be apparent to one of ordinary skill in the art, and will also be apparent in several ways to a wide range of attentive readers. Some embodiments address technical activities such as computing system memory garbage collection 210, computing system performance measurements 502, 504, 506, and reinforcement learning 212, which are each an activity deeply rooted in computing technology. Some of the technical mechanisms discussed include, e.g., garbage collectors 210, threads 132, reinforcement learning mechanisms 214, and thread composition controllers 302. Some of the technical effects discussed include, e.g., changes in thread count 324 or core count 530, and changes in performance 504, 504, 506. Thus, purely mental processes and activities limited to pen-and-paper are clearly excluded. Other advantages based on the technical characteristics of the teachings will also be apparent to one of skill from the description provided.

[0145] One of skill understands that garbage collection 210 is a technical activity which cannot be performed mentally, because it requires traversal of computing system memory 112. This includes, for example, traversal of heap management data structures such as a free list. As disclosed herein, garbage collection also involves creation, scheduling, suspension, execution, and termination of garbage collection threads 132, w hich cannot be performed mentally or manually. Moreover, mental or pen-and-paper activity cannot pause computing system execution of a process 124 as needed to permit the execution of garbage collection operations such as (dependingon the GC implementation) marking 512, sweeping 520, or compacting 516. One of skill also understands that attempting to perform garbage collection even in part manually would create unacceptable delays in program execution, and would introduce a risk of human errors that can cause programs to crash. People manifestly lack the speed, accuracy, memory capacity, and specific processing capabilities required to perform garbage collection. This is evident for example in the decades of technical advances in garbage collection technology, which would be pointless rather than being praised and pursued, if garbage collection was routinely done by mental processes or on paper alone. It is not, and cannot be.

[0146] In particular, computing system memory garbage collection is a part of computing technology. Hence, the garbage collector improvements such as functionality 204 described herein are improvements to computing technology.

[0147] Different embodiments provide different technical benefits or other advantages in different circumstances, but one of skill informed by the teachings herein will acknowledge that particular technical advantages will likely follow from particular innovation features or feature combinations, as noted at various points herein. Any generic or abstract aspects are integrated into a practical application such as a kernel garbage collector 210, a language runtime garbage collector 210, or another process garbage collector 210.

[0148] Some embodiments described herein address technical challenges of computer technology, and more particularly technical challenges arising in the use of garbage collectors 210. Improvements in garbage collector functionality lead to improvements in the performance, useability', security, and maintainability of softw are whose execution utilizes - and often depends on - the improved garbage collector functionality.

[0149] Some embodiments described herein may be viewed by some people in a broader context. For instance, concepts such as efficiency, reliability, user satisfaction, or waste may be deemed relevant to a particular embodiment. However, it does not follow from the availability of a broad context that exclusive rights are being sought herein for abstract ideas; they’ are not.

[0150] Rather, the present disclosure is focused on providing appropriately specific embodiments whose technical effects fully or partially solve particular technical problems, such as how to adapt a garbage collector to improve process throughput 502, how' to adapt a garbage collector to reduce garbage collection pauses 504, how to adapt a garbage collector to reduce heap size 506, and how to determine an efficient number of cores 528 to dedicate to garbage collection. Other configured storage media, systems, and processes involving efficiency, reliability, user satisfaction, or waste are outside the present scope. Accordingly, vagueness, mere abstractness, lack of technical character, and accompanying proof problems are also avoided under a proper understanding of the present disclosure.

[0151] Additional Combinations and Variations

[0152] Any of these combinations of software code, data structures, logic, components, communications, and / or their functional equivalents may also be combined with any of the systems and their variations described above. A process may include any steps described herein in any subset or combination or sequence which is operable. Each variant may occur alone, or in combination with any one or more of the other variants. Each variant may occur with any of the processes and each process may be combined with any one or more of the other processes. Each process or combination of processes, including variants, may be combined with any of the configured storage medium combinations and variants described above.

[0153] More generally, one of skill will recognize that not every part of this disclosure, or any particular details therein, are necessarily required to satisfy legal criteria such as enablement, written description, or best mode. Also, embodiments are not limited to the particular scenarios, motivating examples, operating environments, tools, peripherals, software process flows, identifiers, data structures, data selections, naming conventions, notations, control flows, or other implementation choices described herein. Any apparent conflict with any other patent disclosure, even from the owner of the present innovations, has no role in interpreting the claims presented in this patent disclosure.

[0154] Acronyms, abbreviations, names, and symbols

[0155] Some acronyms, abbreviations, names, and symbols are defined below'. Others are defined elsew'here herein, or do not require definition here in order to be understood by one of skill.

[0156] ALU: arithmetic and logic unit

[0157] API: application program interface

[0158] BIOS: basic input / output system

[0159] CD: compact disc

[0160] CPU: central processing unit

[0161] DVD: digital versatile disk or digital video disc

[0162] FPGA: field-programmable gate array

[0163] FPU: floating point processing unit

[0164] GDPR: General Data Protection Regulation

[0165] GPU: graphical processing unit

[0166] GUI: graphical user interface

[0167] HTTPS: hypertext transfer protocol, secure

[0168] laaS or lAAS: infrastructure-as-a-service

[0169] LAN: local area network

[0170] OS: operating system

[0171] PaaS or PAAS: platform-as-a-service

[0172] RAM: random access memory

[0173] ROM: read only memory

[0174] TPU: tensor processing unit

[0175] UEFI: Unified Extensible Firmware Interface

[0176] UI: user interface

[0177] WAN: wide area network

[0178] Some Additional Terminology

[0179] Reference is made herein to exemplary embodiments such as those illustrated in the drawings, and specific language is used herein to describe the same. But alterations and further modifications of the features illustrated herein, and additional technical applications of the abstract principles illustrated by particular embodiments herein, which would occur to one skilled in the relevant art(s) and having possession of this disclosure, should be considered within the scope of the claims.

[0180] The meaning of terms is clarified in this disclosure, so the claims should be read with careful attention to these clarifications. Specific examples are given, but those of skill in the relevant art(s) will understand that other examples may also fall within the meaning of the terms used, and within the scope of one or more claims. Terms do not necessarily have the same meaning here that they have in general usage (particularly in non-technical usage), or in the usage of a particular industry, or in a particular dictionary or set of dictionaries. Reference numerals may be used with various phrasings. to help show the breadth of a term. Omission of a reference numeral from a given piece of text does not necessarily mean that the content of a Figure is not being discussed by the text. The present disclosure asserts and exercises the right to specific and chosen lexicography. Quoted terms are being defined explicitly, but a term may also be defined implicitly without using quotation marks. Terms may be defined, either explicitly or implicitly, here in the Detailed Description and / or elsewhere in the application file.

[0181] A “computer system” (a.k.a. “computing system”) may include, for example, one or more servers, motherboards, processing nodes, laptops, tablets, personal computers (portable or not), personal digital assistants, smartphones, smartwatches, smart bands, cell or mobile phones, other mobile devices having at least a processor and a memory, video game systems, augmented reality systems, holographic projection systems, televisions, wearable computing systems, and / or other device(s) providing one or more processors controlled at least in part by instructions. The instructions may be in the form of firmware or other softw are in memory and / or specialized circuitry.

[0182] A “multithreaded” computer system is a computer system which supports multiple execution threads. The term “thread” should be understood to include code capable of or subject to scheduling, and possibly to synchronization. A thread may also be known outside this disclosure by another name, such as “task,” “process," or “coroutine,” for example. However, a distinction is made herein between threads and processes, in that a thread defines an execution path inside a process. Also, threads of a process share a given address space, whereas different processes have different respective address spaces. The threads of a process may run in parallel, in sequence, or in a combination of parallel execution and sequential execution (e.g., time-sliced).

[0183] A “processor” is a thread-processing unit, such as a core in a simultaneous multithreading implementation. A processor includes hardware. A given chip may hold one or more processors. Processors may be general purpose, or they may be tailored for specific uses such as vector processing, graphics processing, signal processing, floating-point arithmetic processing, encryption, I / O processing, machine learning, and so on.

[0184] “Kernels” include operating systems, hypervisors, virtual machines, BIOS or UEFI code, and similar hardware interface software.

[0185] “Code” means processor instructions, data (which includes constants, variables, and data structures), or both instructions and data. “Code” and “software” are used interchangeably herein. Executable code, interpreted code, and firmware are some examples of code.

[0186] “Program” is used broadly herein, to include applications, kernels, drivers, interrupt handlers, firmware, state machines, libraries, and other code written by programmers (who are also referred to as developers) and / or automatically generated.

[0187] A “routine” is a callable piece of code which normally returns control to an instruction just after the point in a program execution at which the routine was called. Depending on the terminology used, a distinction is sometimes made elsewhere between a “function” and a “procedure”: a function normally returns a value, while a procedure does not. As used herein, “routine” includes both functions and procedures. A routine may have code that returns a value (e.g., sin(x)) or it may simply return without also providing a value (e.g., void functions).

[0188] “Service” means a consumable program offering, in a cloud computing environment or other network or computing system environment, which provides resources to multiple programs or provides resource access to multiple programs, or does both. A service implementation may itself include multiple applications or other programs.

[0189] “Cloud” means pooled resources for computing, storage, and networking which are elastically available for measured on-demand service. A cloud 136 may be private, public, community, or a hybrid, and cloud services may be offered in the form of infrastructure as a service (laaS), platform as a service (PaaS), software as a service (SaaS). or another service.Unless stated otherwise, any discussion of reading from a file or writing to a file includes reading / writing a local file or reading / writing over a network, which may be a cloud network or other network, or doing both (local and networked read / write). A cloud may also be referred to as a “cloud environment” or a “cloud computing environment”.

[0190] “Access” to a computational resource includes use of a permission or other capability to read, modify, write, execute, move, delete, create, or otherwise utilize the resource. Attempted access may be explicitly distinguished from actual access, but “access” without the “attempted” qualifier includes both attempted access and access actually performed or provided.

[0191] Herein, activity by a user refers to activity by a user device or activity by a user account, or by software on behalf of a user, or by hardware on behalf of a user. Activity is represented by digital data or machine operations or both in a computing system. Activity within the scope of any claim based on the present disclosure excludes human actions per se. Software or hardware activity “on behalf of a user” accordingly refers to software or hardware activity on behalf of a user device or on behalf of a user account or on behalf of another computational mechanism or computational artifact, and thus does not bring human behavior per se within the scope of any embodiment or any claim.

[0192] “Digital data” means data in a computing system, as opposed to data written on paper or thoughts in a person’s mind, for example. Similarly, “digital memory” refers to a non-living device, e.g., computing storage hardware, not to human or other biological memory.

[0193] As used herein, “include” allows additional elements (i.e., includes means comprises) unless otherwise stated.

[0194] “Optimize” means to improve, not necessarily to perfect. For example, it may be possible to make further improvements in a program or an algorithm which has been optimized.

[0195] “Process” is sometimes used herein as a term of the computing science arts, and in that technical sense encompasses computational resource users, which may also include or be referred to as coroutines, threads, tasks, interrupt handlers, application processes, kernel processes, procedures, or object methods, for example. As a practical matter, a “process” 124 is the computational entity identified by system utilities such as Windows® Task Manager, Linux® ps, or similar utilities in other operating system environments (marks of Microsoft Corporation, Linus Torvalds, respectively). “Process” may also be used as a patent law term of art, e.g., in describing a process claim as opposed to a system claim or an article of manufacture (configured storage medium) claim. Similarly, “method” is used herein primarily as a technical term in the computing science arts (a kind of “routine”) but it is also a patent law term of art (akin to a “process”). “Process” and “method” in the patent law sense are used interchangeably herein. Those of skill will understand which meaning is intended in a particular instance, and will alsounderstand that a given claimed process or method (in the patent law sense) may sometimes be implemented using one or more processes or methods (in the computing science sense).

[0196] “Automatically” means by use of automation (e.g., general purpose computing hardware configured by software for specific operations and technical effects discussed herein), as opposed to without automation. In particular, steps performed “automatically” are not performed by hand on paper or in a person’s mind, although they may be initiated by a human person or guided interactively by a human person. Automatic steps are performed with a machine in order to obtain one or more technical effects that would not be realized without the technical interactions thus provided. Steps performed automatically are presumed to include at least one operation performed proactively.

[0197] One of skill understands that technical effects are the presumptive purpose of a technical embodiment. The mere fact that calculation is involved in an embodiment, for example, and that some calculations can also be performed without technical components (e.g., by paper and pencil, or even as mental steps) does not remove the presence of the technical effects or alter the concrete and technical nature of the embodiment, particularly in real-world embodiment implementations. Garbage collector thread composition adjustment operations such as changing the number 610 of threads 132, calling an API 318, obtaining 304 a GC work level 524, obtaining 304 an allocation rate 532, performing reinforcement learning 212. and many other operations discussed herein (whether recited in the Figures or not), are understood to be inherently digital. A human mind cannot interface directly with a CPU or other processor, or with RAM or other digital storage, to read and write the necessary data to perform the garbage collector thread composition adjustment steps 800 taught herein even in a hypothetical prototype situation, much less in an embodiment’s real world large computing environment. This would all be well understood by persons of skill in the art in view of the present disclosure.

[0198] “Computationally” likewise means a computing device (processor plus memory', at least) is being used, and excludes obtaining a result by mere human thought or mere human action alone. For example, doing arithmetic with a paper and pencil is not doing arithmetic computationally as understood herein. Computational results are faster, broader, deeper, more accurate, more consistent, more comprehensive, and / or otherwise provide technical effects that are beyond the scope of human performance alone. “Computational steps” are steps performed computationally. Neither “automatically” nor “computationally” necessarily means “immediately”. “Computationally” and “automatically” are used interchangeably herein.

[0199] “Proactively” means without a direct request from a user. Indeed, a user may not even realize that a proactive step by an embodiment was possible until a result of the step has been presented to the user. Except as otherwise stated, any computational and / or automatic stepdescribed herein may also be done proactively.

[0200] “Based on” means based on at least, not based exclusively on. Thus, a calculation based on X depends on at least X, and may also depend on Y.

[0201] Throughout this document, use of the optional plural “(s)”, “(es)”, or “(ies)” means that one or more of the indicated features is present. For example, “processor(s)” means “one or more processors” or equivalently “at least one processor”.

[0202] “At least one” of a list of items means one of the items, or two of the items, or three of the items, and so on up to and including all N of the items, where the list is a list of N items. The presence of an item in the list does not require the presence of the item (or a check for the item) in an embodiment. For instance, if an embodiment of a system is described herein as including at least one of A, B, C, or D, then a system that includes A but does not check for B or C or D is an embodiment, and so is a system that includes A and also includes B but does not include or check for C or D. Similar understandings pertain to items which are steps or step portions or options in a method embodiment. This is not a complete list of all possibilities; it is provided merely to aid understanding of the scope of “at least one” that is intended herein.

[0203] For the purposes of United States law and practice, use of the word “step” herein, in the claims or elsewhere, is not intended to invoke means-plus-function, step-plus-function, or 35 United State Code Section 112 Sixth Paragraph / Section 112(f) claim interpretation. Any presumption to that effect is hereby explicitly rebutted.

[0204] For the purposes of United States law and practice, the claims are not intended to invoke means-plus-function interpretation unless they use the phrase “means for”. Claim language intended to be interpreted as means-plus-function language, if any, will expressly recite that intention by using the phrase “means for”. When means-plus-function interpretation applies, whether by use of “means for” and / or by a court’s legal construction of claim language, the means recited in the specification for a given noun or a given verb should be understood to be linked to the claim language and linked together herein by virtue of any of the following: appearance within the same block in a block diagram of the figures, denotation by the same or a similar name, denotation by the same reference numeral, afunctional relationship depicted in any of the figures, a functional relationship noted in the present disclosure’s text. For example, if a claim limitation recited a “zac widget” and that claim limitation became subject to means-plus-function interpretation, then at a minimum all structures identified anywhere in the specification in any figure block, paragraph, or example mentioning “zac widget”, or tied together by any reference numeral assigned to a zac widget, or disclosed as having a functional relationship with the structure or operation of a zac widget, would be deemed part of the structures identified in the application for zac widgets and would help define the set of equivalents for zac widget structures.

[0205] One of skill will recognize that this innovation disclosure discusses various data values and data structures, and recognize that such items reside in a memory (RAM, disk, etc.), thereby configuring the memory7. One of skill will also recognize that this innovation disclosure discusses various algorithmic steps which are to be embodied in executable code in a given implementation, and that such code also resides in memory, and that it effectively configures any general-purpose processor which executes it, thereby transforming it from a general -purpose processor to a specialpurpose processor which is functionally special-purpose hardware.

[0206] Accordingly, one of skill would not make the mistake of treating as non-overlapping items (a) a memory7recited in a claim, and (b) a data structure or data value or code recited in the claim. Data structures and data values and code are understood to reside in memory', even when a claim does not explicitly recite that residency for each and every7data structure or data value or piece of code mentioned. Accordingly, explicit recitals of such residency are not required. However, they are also not prohibited, and one or two select recitals may be present for emphasis, without thereby excluding all the other data values and data structures and code from residency. Likewise, code functionality' recited in a claim is understood to configure a processor, regardless of whether that configuring quality7is explicitly recited in the claim.

[0207] Throughout this document, unless expressly stated otherwise any reference to a step in a process presumes that the step may be performed directly by a party of interest and / or performed indirectly by the party through intervening mechanisms and / or intervening entities, and still lie within the scope of the step. That is, direct performance of the step by the party' of interest is not required unless direct performance is an expressly stated requirement. For example, a computational step on behalf of a party of interest, such as accessing, adjusting, allocating, assessing, assigning, calling, changing, collecting, compacting, controlling, decreasing, determining, executing, increasing, learning, making, marking, measuring, meeting, obtaining, pausing, performing, specifying, sweeping, traversing, triggering, weighting, working (and accesses, accessed, adjusts, adjusted, etc.) with regard to a destination or other subject may involve intervening action, such as the foregoing or such as forwarding, copying, uploading, downloading, encoding, decoding, compressing, decompressing, encrypting, decrypting, authenticating, invoking, and so on by some other party7or mechanism, including any action recited in this document, yet still be understood as being performed directly by or on behalf of the party of interest. Example verbs listed here may overlap in meaning or even be synonyms: separate verb names do not dictate separate functionality in every case.

[0208] Whenever reference is made to data or instructions, it is understood that these items configure a computer-readable memory and / or computer-readable storage medium, thereby transforming it to a particular article, as opposed to simply existing on paper, in a person's mind,or as a mere signal being propagated on a wire, for example. For the purposes of patent protection in the United States, a memory or other storage device or other computer-readable storage medium is not a propagating signal or a carrier wave or mere energy' outside the scope of patentable subj ect matter under United States Patent and Trademark Office (USPTO) interpretation of the In re Nuijten case. No claim covers a signal per se or mere energy in the United States, and any claim interpretation that asserts otherwise in view of the present disclosure is unreasonable on its face. Unless expressly stated otherwise in a claim granted outside the United States, a claim does not cover a signal per se or mere energy.

[0209] Moreover, notwithstanding anything apparently to the contrary elsewhere herein, a clear distinction is to be understood between (a) computer readable storage media and computer readable memory, on the one hand, and (b) transmission media, also referred to as signal media, on the other hand. A transmission medium is a propagating signal or a carrier wave computer readable medium. By contrast, computer readable storage media and computer readable memory’ and computer readable storage devices are not propagating signal or earner wave computer readable media. Unless expressly stated otherwise in the claim, ‘'computer readable medium” means a computer readable storage medium, not a propagating signal per se and not mere energy'.

[0210] An “embodiment” herein is an example. The term “embodiment” is not interchangeable with “the invention”. Embodiments may freely share or borroyv aspects to create other embodiments (provided the result is operable), even if a resulting combination of aspects is not explicitly described per se herein. Requiring each and every permitted combination to be explicitly and individually described is unnecessary for one of skill in the art, and would be contrary to policies which recognize that patent specifications are written for readers who are skilled in the art. Formal combinatorial calculations and informal common intuition regarding the number of possible combinations arising from even a small number of combinable features will also indicate that a large number of aspect combinations exist for the aspects described herein. Accordingly, requiring an explicit recitation of each and every combination yvould be contrary to policies calling for patent specifications to be concise and for readers to be knowledgeable in the technical fields concerned.

[0211] List of Reference Numerals

[0212] The following list is provided for convenience and in support of the drawing figures and as part of the text of the specification, which describe innovations by reference to multiple items. Items not listed here may nonetheless be part of a given embodiment. For better legibility of the text, a given reference number is recited near some, but not all, recitations of the referenced item in the text. The same reference number may be used with reference to different examples or different instances of a given item. The list of reference numerals is:

[0213] 100 operating environment, also referred to as computing environment; includes one or more systems 102

[0214] 101 machine in a system 102, e.g., any device having at least a processor 110 and a memory 112 and also having a distinct identifier such as an IP address or a MAC (media access control) address; may be a physical machine or be a virtual machine implemented on physical hardware

[0215] 102 computer system, also referred to as a “computational system” or “computing system”, and when in a network may be referred to as a “node”

[0216] 104 users, e.g., user of an enhanced system 202

[0217] 106 peripheral device

[0218] 108 network generally, including, e.g., LANs, WANs, software-defined networks, clouds, and other wired or wireless networks

[0219] 110 processor or set of processors; includes hardware

[0220] 112 computer-readable storage medium, e.g., RAM, hard disks

[0221] 114 removable configured computer-readable storage medium

[0222] 116 instructions executable with processor; may be on removable storage media or in other memory (volatile or nonvolatile or both)

[0223] 118 digital data in a system 102; data structures, values, source code, and other examples are discussed herein

[0224] 120 kemel(s), e.g., operating system(s), BIOS, UEFI, device drivers; also refers to an execution engine such as a language runtime

[0225] 122 software tools, software applications; computational

[0226] 124 process, in the computing science sense; presumed to be a memory managed (i.e., garbage collected) process if not specified otherwise

[0227] 126 display screens, also referred to as “displays”

[0228] 128 computing hardware not otherwise associated with a reference number 106, 108,110, 112, 1 14

[0229] 132 thread, in the computing science sense; presumed to be a GC thread if not specified otherwise

[0230] 134 garbage collection thread composition, as represented in a computing system

[0231] 136 cloud, also referred to as cloud environment or cloud computing environment

[0232] 202 enhanced computing system, i.e., system 102 enhanced with garbage collector thread composition adjustment functionality as taught herein

[0233] 204 garbage collector thread composition adjustment functionality (also referred to as“garbage collection thread composition adjustment”), e.g., software or specialized hardwarewhich performs or is configured to perform steps 304 and 206, or step 802 in a garbage collection RL loop 900, or any software or hardware which performs or is configured to perform a novel method 800 or a computational garbage collection thread composition adjustment activity first disclosed herein

[0234] 206 garbage collection thread composition adjustment: computational activity or result thereof in a computing system: computationally make an adjustment 206, e.g., by creating, starting, suspending, stopping, or terminating a GC thread 132, or by changing a computational characteristic of a GC thread such as its priority, its available computational resources such as a core 528 or memory for the GC thread’s own usage, its assigned portion of the heap 112 that it manages as part of the GC 210, its trigger 416 to perform a garbage collection, or by a combination of such operations

[0235] 210 garbage collector (GC) in a computing system; garbage collection (GC) computational activity

[0236] 212 reinforcement learning in a computing system; pertains to garbage collection unless stated otherwise; computational activity or result thereof

[0237] 214 reinforcement learning mechanism in a computing system, e.g., an implementation of an RL loop which includes a garbage collector 210

[0238] 302 garbage collection thread composition controller; computational

[0239] 304 computationally obtain an adjustment input 306; also referred to ascertaining, designating, getting, giving, or specifying an input 306

[0240] 306 garbage collection thread composition adjustment input, also referred to as a factor; digital data; includes a measured value, an aspirational value (i.e.. goal), a value threshold or constraint, or a mix thereof

[0241] 310 computationally activity of optimizing garbage collection, or a result of such activity

[0242] 312 optimization goal or target, as represented in a computing system

[0243] 314 metric; computationally activity of measuring a performance status or characteristic in a computing system, or a digital measurement result of such activity

[0244] 318 API or other computational interface 322 to a composition controller 302, e.g., shared memory, message exchange system

[0245] 320 routine in an interface 318 in a computing system

[0246] 322 interface generally in a computing system; computational, digital

[0247] 324 GC thread count, e.g., any of the counts 602 to 610; digital data and hence in a computing system, not mental or on paper

[0248] 402 minimum or maximum adjustment 206 quantum; digital

[0249] 404 caller of a routine 320; digital; e.g., a tool 122, a runtime 120, or an RL mechanism214

[0250] 406 digital threshold

[0251] 408 minimum or maximum adjustment 206 time interval, also referred to as wait; digital

[0252] 410 relative weight of a goal 312 or other adjustment input 306; digital

[0253] 412 instance of a method 800, e.g., an obtaining step 304 and an adjusting 206 step

[0254] 414 execution time, e.g., duration of existence of a process 124, or during the life of a process 124; digital

[0255] 416 trigger value for performing a garbage collection, e.g., amount of managed heap allocated or amount of managed heap available for allocation; digital; also referred to as a threshold or an amount

[0256] 418 heuristic, e.g., lookup table or formula to determine an acceptable thread count or an optimal thread count, based on a metric

[0257] 502 process throughput, e.g., a count, size, or other amount of data produced or ratified by a process; digital

[0258] 504 garbage collection pause time, e.g., amount of time in which a non-GC process or portion thereof is suspended to permit garbage collection; digital

[0259] 506 managed memory size, e.g., size of a heap which is managed by garbage collection; digital

[0260] 508 allocation computational activity during memory management, or a result thereof in a computing system

[0261] 510 allocation thread; thread 132 which performs, enables, or otherwise facilitates allocation 508

[0262] 512 marking GC computational activity during memory7management, or a result thereof in a computing system

[0263] 514 marking thread; thread 132 which performs, enables, or otherwise facilitates marking 512

[0264] 516 compacting GC computational activity during memory management, or a result thereof in a computing system

[0265] 518 compacting thread; thread 132 which performs, enables, or otherwise facilitates compacting 516

[0266] 520 sweeping GC computational activity7during memory management, or a result thereof in a computing system

[0267] 522 sweeping thread; thread 132 which performs, enables, or otherwise facilitatessweeping 520

[0268] 524 GC work level, also referred to as an amount; digital

[0269] 526 digital result of execution of a routine 320

[0270] 528 processor core; computational hardware

[0271] 530 digital count of core(s) 528

[0272] 532 memory allocation rate; digital

[0273] 534 digital result of reinforcement learning 212, e.g., Rt+1, St+1, At in Figure 9

[0274] 536 allocation 508 duration, i.e., how long system or GC takes to perform allocation508; digital

[0275] 602 digital count of GC allocation threads; whether suspended threads are counted depends on the embodiment

[0276] 604 digital count of GC compacting threads; whether suspended threads are counted depends on the embodiment

[0277] 606 digital count of GC marking threads; whether suspended threads are counted depends on the embodiment

[0278] 608 digital count of GC sweeping threads; whether suspended threads are counted depends on the embodiment

[0279] 610 digital count of GC threads of any kind; whether suspended threads are counted depends on the embodiment

[0280] 612 digital count or other magnitude representation of allocation thread supports

[0281] 614 kind of allocation thread support

[0282] 616 allocation thread support, e.g.. @

[0283] 700 flowchart; 700 also refers to garbage collection thread composition adjustment methods that are illustrated by or consistent with the Figure 7 flowchart

[0284] 800 flowchart; 800 also refers to garbage collection thread composition adjustment methods that are illustrated by or consistent with the Figure 8 flowchart, which incorporates the Figure 7 flowchart and other steps taught herein

[0285] 802 computationally perform reinforcement learning 212

[0286] 804 computationally specify a digital value, e.g., via an API or by assigning the value to a variable in a memory 112

[0287] 806 computationally determine an adjustment, e.g., based on RL 212. a heuristic 418, a metric 314, or a routine call result 526

[0288] 808 computationally access an interface, e.g., by calling a routine of the interface or assigning a digital value to a variable in the interface

[0289] 810 computationally change (increase or decrease) a GC thread count 324. e.g., bycreating or terminating one or more threads 132

[0290] 812 computationally determine that a thread count 324 meets or exceeds a threshold406; one of skill recognizes that meeting a threshold is functionally equivalent to exceeding (in the higher or lower sense) a slightly different threshold in most cases, e.g., for integers x, x > 3 is equivalent to x >= 4

[0291] 814 computationally assign a weight 410 to a goal 312, e g., based on an interface call result 526 or a default weighting

[0292] 816 computationally meet an adjustment dynamic characteristic 818, i.e., have or exhibit the characteristic 818

[0293] 818 adjustment dynamic characteristic, as represented in a computing system, e.g., an amount of adjustments or a frequency of adjustments

[0294] 820 computational resource usage constraint; digital

[0295] 822 computationally assess an adjustment by comparing a result of the adjustment to a goal 312

[0296] 824 any step or item discussed in the present disclosure that has not been assigned some other reference numeral; 824 may thus be shown expressly as a reference numeral for various steps or items or both, and may be added as a reference numeral (in the current disclosure or any subsequent patent application which claims priority to the current disclosure) for various steps or items or both without thereby adding new matter

[0297] 900 reinforcement learning loop, as represented and implemented in a computing system; presumed to include data flow to and from a garbage collector

[0298] Conclusion

[0299] In some embodiments, computing system garbage collection thread composition 134 includes data representing the number 324 of garbage collector threads 132, the kind of garbage collector threads (e.g., allocation 508, marking 512, sweeping 520, compacting 516), and various garbage collector thread characteristics such as available cores 528, collection trigger 416 thresholds 406, and optimization goals 312 for a user process 124 or a garbage collector 210. A thread composition controller 302 adjusts 206 the thread composition 134 during the execution of a managed memory' process 124 such as a user application 122 process 124. The thread composition adjustment 206 depends on inputs 306 such as process throughput 502, garbage collection pause time 504, managed heap size 506, garbage collection thread count(s) 324, allocation rate 532, garbage collection work level 524, optimization goals 312, thresholds 406, constraints 820, composition controller interface routine 320 operation results 526, or reinforcement learning 212 results 534. Performance optimization goals 312 drive some proactive adjustments 206. Some optimization goals 312 are weighted 410 relative to each other.

[0300] Embodiments are understood to also themselves include or benefit from tested and appropriate security controls and privacy controls such as the General Data Protection Regulation (GDPR). Use of the tools and techniques taught herein is compatible with use of such controls.

[0301] Although Microsoft technology is used in some motivating examples, the teachings herein are not limited to use in technology supplied or administered by Microsoft. Under a suitable license, for example, the present teachings could be embodied in software or services provided by other cloud service providers.

[0302] Although particular embodiments are expressly illustrated and described herein as processes, as configured storage media, or as systems, it will be appreciated that discussion of one type of embodiment also generally extends to other embodiment types. For instance, the descriptions of processes in connection with the Figures also help describe configured storage media, and help describe the technical effects and operation of systems and manufactures like those discussed in connection with other Figures. It does not follow that any limitations from one embodiment are necessarily read into another. In particular, processes are not necessarily limited to the data structures and arrangements presented while discussing systems or manufactures such as configured memories.

[0303] Those of skill will understand that implementation details may pertain to specific code, such as specific thresholds, comparisons, specific kinds of platforms or programming languages or architectures, specific scripts or other tasks, and specific computing environments, and thus need not appear in every embodiment. Those of skill will also understand that program identifiers and some other terminology used in discussing details are implementation-specific and thus need not pertain to every embodiment. Nonetheless, although they are not necessarily required to be present here, such details may help some readers by providing context and / or may illustrate a few of the many possible implementations of the technology' discussed herein.

[0304] With due attention to the items provided herein, including technical processes, technical effects, technical mechanisms, and technical details which are illustrative but not comprehensive of all claimed or claimable embodiments, one of skill will understand that the present disclosure and the embodiments described herein are not directed to subject matter outside the technical arts, or to any idea of itself such as a principal or original cause or motive, or to a mere result per se, or to a mental process or mental steps, or to a business method or prevalent economic practice, or to a mere method of organizing human activities, or to a law of nature per se, or to a naturally occurring thing or process, or to a living thing or part of a living thing, or to a mathematical formula per se, or to isolated software per se, or to a merely conventional computer, or to anything wholly imperceptible or any abstract idea per se, or to insignificant post-solution activities, or to any method implemented entirely on an unspecified apparatus, or to any methodthat fails to produce results that are useful and concrete, or to any preemption of all fields of usage, or to any other subject matter which is ineligible for patent protection under the laws of the jurisdiction in which such protection is sought or is being licensed or enforced.

[0305] Reference herein to an embodiment having some feature X and reference elsewhere herein to an embodiment having some feature Y does not exclude from this disclosure embodiments which have both feature X and feature Y, unless such exclusion is expressly stated herein. All possible negative claim limitations are within the scope of this disclosure, in the sense that any feature which is stated to be part of an embodiment may also be expressly removed from inclusion in another embodiment, even if that specific exclusion is not given in any example herein. The term “embodiment” is merely used herein as a more convenient form of “process, system, article of manufacture, configured computer readable storage medium, and / or other example of the teachings herein as applied in a manner consistent with applicable law.” Accordingly, a given “embodiment” may include any combination of features disclosed herein, provided the embodiment is consistent with at least one claim.

[0306] Not every item shown in the Figures need be present in every embodiment. Conversely, an embodiment may contain item(s) not shown expressly in the Figures. Although some possibilities are illustrated here in text and drawings by specific examples, embodiments may depart from these examples. For instance, specific technical effects or technical features of an example may be omitted, renamed, grouped differently, repeated, instantiated in hardware and / or software differently, or be a mix of effects or features appearing in two or more of the examples. Functionality shown at one location may also be provided at a different location in some embodiments; one of skill recognizes that functionality modules can be defined in various ways in a given implementation without necessarily omitting desired technical effects from the collection of interacting modules viewed as a whole. Distinct steps may be shown together in a single box in the Figures, due to space limitations or for convenience, but nonetheless be separately performable, e.g., one may be performed without the other in a given performance of a method.

[0307] Reference has been made to the figures throughout by reference numerals. Any apparent inconsistencies in the phrasing associated with a given reference numeral, in the figures or in the text, should be understood as simply broadening the scope of what is referenced by that numeral. Different instances of a given reference numeral may refer to different embodiments, even though the same reference numeral is used. Similarly, a given reference numeral may be used to refer to a verb, a noun, and / or to corresponding instances of each, e.g., a processor 110 may process 110 instructions by executing them.

[0308] As used herein, terms such as “a”, “an”, and “the” are inclusive of one or more of theindicated item or step. In particular, in the claims a reference to an item generally means at least one such item is present and a reference to a step means at least one instance of the step is performed. Similarly, “is” and other singular verb forms should be understood to encompass the possibility of “are” and other plural forms, when context permits, to avoid grammatical errors or misunderstandings.

[0309] Headings are for convenience only; information on a given topic may be found outside the section whose heading indicates that topic.

[0310] All claims and the abstract, as filed, are part of the specification. The abstract is provided for convenience and for compliance with patent office requirements; it is not a substitute for the claims and does not govern claim interpretation in the event of any apparent conflict with other parts of the specification. Similarly, the summary is provided for convenience and does not govern in the event of any conflict with the claims or with other parts of the specification. Claim interpretation shall be made in view of the specification as understood by one of skill in the art; innovators are not required to recite every nuance within the claims themselves as though no other disclosure was provided herein.

[0311] To the extent any term used herein implicates or otherwise refers to an industry7standard, and to the extent that applicable law requires identification of a particular version of such as standard, this disclosure shall be understood to refer to the most recent version of that standard which has been published in at least draft form (final form takes precedence if more recent) as of the earliest priority date of the present disclosure under applicable patent law.

[0312] While exemplary embodiments have been shown in the drawings and described above, it will be apparent to those of ordinary skill in the art that numerous modifications can be made without departing from the principles and concepts set forth in the claims, and that such modifications need not encompass an entire abstract concept. Although the subject matter is described in language specific to structural features and / or procedural acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific technical features or acts described above the claims. It is not necessary for every means or aspect or technical effect identified in a given definition or example to be present or to be utilized in every' embodiment. Rather, the specific features and acts and effects described are disclosed as examples for consideration when implementing the claims.

[0313] All changes which fall short of enveloping an entire abstract idea but come within the meaning and range of equivalency7of the claims are to be embraced within their scope to the full extent permitted by law.

Claims

CLAIMS1. A computing system (202) which is configured to adjust (206) a thread composition (134) of a garbage collector (210) during an execution of a process (124) which uses a managed memory (112), the managed memory being managed at least in part by the garbage collector, the computing system comprising: a digital memory (112) which comprises the managed memory (1 12); a processor set (110) including at least one processor (110), the processor set in operable communication with the digital memory; a composition controller (302), the composition controller being a garbage collector thread composition controller; wherein the composition controller (302) is configured to, upon execution by the processor set, adjust (206) the thread composition during the execution of the process by making an adjustment (206) which changes the thread composition from a prior thread composition to an adjusted thread composition, the adjustment being based at least in part on at least one of the following adjustment inputs (306): a process throughput (502), a garbage collector pause time (504), a managed memory’ size (506). an allocation thread count (602), an allocation thread support count (612). a garbage collector thread count (610), a memory allocation rate (532), a garbage collector thread work level (524), a composition controller interface routine result (526), a processor core count (530), or a reinforcement learning result (534).

2. The computing system of claim 1, further comprising the garbage collector (210).

3. The computing system of claim 1 or claim 2, further comprising a reinforcement learning mechanism (214), the reinforcement learning mechanism configured to perform reinforcement learning (212) which produces the reinforcement learning result (534) based at least in part on at least one of the adjustment inputs (306).

4. The computing system of any of claims 1 to 3, further comprising a composition controller interface (318) which comprises at least one of the following: a routine (320) configured to, upon execution by the processor set during the process execution, specify (804) an optimization goal (312) to the composition controller; a routine (320) configured to, upon execution by the processor set during the process execution, specify (804) a processor core count (530) constraint (820) to the composition controller; a routine (320) configured to, upon execution by the processor set during the process execution, specify (804) a minimum permitted quantum (402) for any adjustmentin a number of garbage collector threads; a routine (320) configured to, upon execution by the processor set during the process execution, specify (804) a maximum permitted quantum (402) for any adjustment in a number of garbage collector threads; a routine (320) configured to, upon execution by the processor set during the process execution, specify (804) a minimum permitted wait (408) between any adjustments in a number of garbage collector threads; or a routine (320) configured to, upon execution by the processor set during the process execution, specify (804) a maximum permitted wait (408) between any adjustments in a number of garbage collector threads.

5. A method (800) performed by a computing system (202) having a managed memory' to adjust (206) a thread composition (134) of a garbage collector (210) during an execution of a process (124) which uses the managed memory, the managed memory being managed at least in part by the garbage collector, the method comprising: obtaining (304) at least one of the following adjustment inputs (306): a process throughput (502), a garbage collector pause time (504), a managed memory' size (506). an allocation thread count (602), an allocation thread support count (612), a garbage collector thread count (610). a memory allocation rate (532), a garbage collector thread work level (524), a composition controller interface routine result (526), a processor core count (530), or a reinforcement learning result (534); and during the execution of the process, making an adjustment (206) which changes the thread composition (134) from a prior thread composition to an adjusted thread composition, the adjustment being based at least in part on at least one of the obtained adjustment inputs (306).

6. The method of claim 5, wherein: the obtaining (304) comprises obtaining (304) the process throughput (502) adjustment input as an optimization goal (312); and the adjustment comprises increasing (810) the allocation thread support count (612).

7. The method of claim 5 or claim 6, wherein: the obtaining (304) comprises obtaining (304) the garbage collector pause time (504) as an optimization goal (312); the obtaining (304) comprises obtaining (304) the garbage collector thread count (610) and the garbage collector thread work level (524); the method further comprises determining (812) that the garbage collector thread count is above a threshold (406) associated with the garbage collector thread work level;and the adjustment comprises decreasing (810) the garbage collector thread count.

8. The method of claim 5 or claim 6, wherein: the obtaining (304) comprises obtaining (304) the garbage collector pause time (504) as an optimization goal (312); the obtaining (304) also comprises obtaining (304) the garbage collector thread count (610) and the garbage collector thread work level (524); the method further comprises determining (812) that the garbage collector thread count is below a threshold (406) associated with the garbage collector thread work level; and the adjustment comprises increasing (810) the garbage collector thread count.

9. The method of claim 5, claim 6, or claim 8, wherein: the obtaining (304) comprises obtaining (304) the managed memory- size as an optimization goal; and the adjustment comprises increasing (810) the garbage collector thread count by adding at least one garbage collector compacting thread (518).

10. The method of any of claims 5 to 9, wherein: the obtaining (304) comprises obtaining (304) the managed memory size as an optimization goal; and the adjustment comprises decreasing (308) a trigger threshold (416), the trigger threshold being a threshold of a garbage collector thread, the computing system configured to trigger garbage collection when an amount of managed memory allocated by the thread reaches the trigger threshold.

11. The method of any of claims 5 to 10, wherein: the obtaining (304) comprises obtaining (304) the process throughput (502) adjustment input as an optimization goal (312); the obtaining (304) also comprises obtaining (304) the allocation thread support count (612); the obtaining (304) also comprises obtaining (304) an allocation duration (536); and the adjustment comprises adjusting (206) the allocation thread support count based at least in part on the allocation duration.

12. The method of any of claims 5 to 11, wherein: the obtaining (304) comprises obtaining (304) at least two optimization goals, the obtained optimization goals including at least two of the following: the process throughput (502). the garbage collector pause time (504), or the managedmemory size (506); and the method further comprises assigning (814) each of the obtained optimization goals a weight (410) relative to one or more other obtained optimization goals.

13. The method of any of claims 5 to 12. wherein: the obtaining (304) comprises obtaining (304) the reinforcement learning result; and the adjustment is based on at least the reinforcement learning result (534).

14. The method of any of claims 5 to 13, wherein the method repeats in multiple instances (412) of the method, and the instances are characterized by meeting (816) at least one of the following dynamic characteristics (818): the instances collectively make (308) at least three thread composition adjustments (206) during the execution of the process; the instances collectively make (308) an average of at least one thread composition adjustment (206) per minute during the execution of the process (124), and the execution lasts at least two minutes.

15. The method of any of claims 5 to 14, wherein the method further comprises at least one of the following accessing (808) a garbage collector thread composition controller interface (318): a reinforcement learning mechanism (214), a testing tool (122), a profiling tool (122), or a diagnostic tool (122).

16. A computer-readable storage device (112, 114) configured with data (118) and instructions (116) which upon execution by a processor (110) cause a computing system (202) to perform a method (800) to adjust (206) a thread composition (134) of a garbage collector (210) during an execution of a process (124) which uses a managed memory (112). the method comprising: obtaining (304) at least one of the following adjustment inputs (306): a process throughput (502), a garbage collector pause time (504), a managed memory size (506). an allocation thread count (602), an allocation thread support count (612) a garbage collector thread count (610), a memory allocation rate (532), a garbage collector thread work level (524), a composition controller interface (318) routine result (526), a processor core count (530), or a reinforcement learning result (534); and during the execution of the process, making (308) an adjustment (206) which changes the thread composition (134) from a prior thread composition to an adjusted thread composition, the adjustment being based at least in part on at least one of the obtained adjustment inputs (306).

17. The computer-readable storage device of claim 16, wherein the obtaining (304)obtains at least two of the adjustment inputs (306), and the adjustment (206) is based at least in part on the at least two obtained adjustment inputs.

18. The computer-readable storage device of claim 16 or claim 17, wherein the obtaining comprises obtaining (304) the process throughput (502) adjustment input (306) as an optimization goal (312), and the adjustment comprises adjusting (206) the allocation thread support count (612) or the kind 614) of allocation thread support (616), or both.

19. The computer-readable storage device of any of claims 16 to 18, wherein the obtaining comprises obtaining (304) the managed memory' size (506) as an optimization goal (312), and the adjustment comprises adjusting (206) a garbage collector compacting thread count (604).

20. The computer-readable storage device of any of claims 16 to 19, wherein the obtaining comprises obtaining (304) the garbage collector pause time (504) as an optimization goal (312), and the adjustment comprises adjusting (206) the garbage collector thread count (610).