Garbage collection thread composition adjustment

By dynamically adjusting the garbage collector thread composition and utilizing reinforcement learning mechanisms and controllers, the problem of low garbage collector efficiency under fixed thread configuration is solved, achieving more efficient memory management and process throughput optimization.

CN120641882APending Publication Date: 2025-09-12MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480011024.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-28
Filing Date
2024-03-23
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

When existing garbage collectors handle bursty processes, the fixed number of threads configured leads to low efficiency, affecting user process throughput and memory management efficiency.

Method used

By dynamically adjusting the garbage collector thread composition, utilizing reinforcement learning mechanism and garbage collector thread composition controller, the number and type of threads are adjusted in real time according to sudden changes in the process to optimize garbage collection efficiency.

Benefits of technology

Improved garbage collection efficiency, reduced user process pause time, optimized memory management, and increased process throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120641882A_ABST
    Figure CN120641882A_ABST
Patent Text Reader

Abstract

A computing system garbage collection thread composition includes data representing a number of garbage collector threads, types of garbage collector threads (e.g., assigning, marking, sweeping, compressing), and various garbage collector thread characteristics (such as available cores, collection trigger thresholds, and optimization objectives for user processes or for garbage collectors). A thread composition controller adjusts thread compositions during execution of a managed memory process, such as a user application process. Thread composition adjustments rely on inputs, such as process throughput, garbage collection pause time, managed heap size, garbage collection thread count (s), allocation support, allocation rates, garbage collection work levels, optimization objectives, thresholds, constraints, composition controller interface routine operation results, or reinforcement learning results. Performance optimization objectives drive some active adjustments. Some optimization objectives are weighted relative to each other.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

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

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

[0003] An efficient implementation of garbage collection can be a high priority because the garbage collector may run frequently or at unpredictable times or both, and may significantly slow down user program execution. In fact, most (if not all) garbage collectors sometimes utilize a "stop the world" approach that prevents the user program from running at the same time as the garbage collector. However, simply reducing the amount of time spent on garbage collection can also reduce the amount of reclaimed memory, and therefore hinder user programming performance in other ways (e.g., by increasing the time spent exchanging data between volatile and non-volatile memory devices).

[0004] Although garbage collection has been used, studied, and modified for decades, improvements to garbage collection are still possible. Summary of the Invention

[0005] Some embodiments described herein include functionality for dynamically adjusting the thread composition of a garbage collector, for example, by changing the number of garbage collector threads, the type of garbage collector threads, or the characteristics of the garbage collector threads. Dynamic adjustment changes the thread composition while the garbage collector is running, as opposed to command line settings or configuration settings that only specify the initial thread composition that the garbage collector uses when it begins running. For example, dynamic thread composition adjustment functionality allows the garbage collector to efficiently adapt in response to changes in memory usage levels by a process or in response to requests to optimize a process.

[0006] Other technical activities and features related to the teachings of this article will also be apparent to those skilled in the art. The examples provided are illustrative only. This summary is not intended to identify the 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. On the contrary, this summary is provided to introduce in a simplified form some technical concepts that will be further described in the detailed description below. This innovation is defined by the claims as properly understood, and to the extent that this summary conflicts with the claims, the claims shall prevail. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] A more detailed description will be given with reference to the accompanying drawings, which illustrate only selected aspects and are therefore not intended to be comprehensive in coverage or scope.

[0008] Figure 1 is a diagram illustrating aspects of a computer system and also illustrating configured storage media, including aspects of a system generally adapted to provide garbage collector thread composition tuning functionality;

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

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

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

[0012] Figure 5 is a block diagram illustrating aspects of adjusting input to some garbage collector thread components;

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

[0014] Figure 7 is a flow chart illustrating steps in a method for adjusting garbage collector thread composition;

[0015] Figure 8 It further illustrates some steps in the garbage collector thread composition adjustment method and combines Figure 7 Flowchart of

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

[0017] Overview

[0018] Innovations can transcend their origins, but understanding their origins can help people understand them more completely. In the present case, some of the teachings described herein were inspired by technical challenges faced by Microsoft innovators who were working to improve techniques for executing "bursty" processes in computing systems.

[0019] A bursty process is one that exhibits burstiness. Bursting is an increase or decrease in computing activity. Sometimes bursts are unexpected, but expected changes in workload can also qualify as bursts in some scenarios. For example, in one scenario, a mail server app is expected to reach its peak workload between 8:00 AM and 12:00 PM. While this burst is expected, it's not necessarily easy for the processor to handle as expected. Accordingly, it would be beneficial for a memory manager, such as a garbage collector, to dynamically adjust memory usage to better optimize processing during bursts.

[0020] The computational activity of burst tracking is the occurrence of a specific event, or in some scenarios, the occurrence of any member of a specific set of events. Burstiness is computationally detected using a burst score calculated, for example, as follows:

[0021] (1) Burst(e, t) = (Et / E – 1 / T)

[0022] where t is a subset of time period T, e is an event, Et is the total number of occurrences of event e in subset t, E is the 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 frequently in t than during T, which means that t is bursty because e increases.

[0023] In some scenarios, burstiness is also or alternatively detected computationally based on the standard deviation, for example, using calculation of the Fano factor:

[0024] (2) F(t) = square(σt) / μt

[0025] Where σt is the standard deviation at time t and μt is the mean number of events of the counting process after time t. Other formulas or criteria are also used to define burstiness, for example, based on an increase or decrease greater than a certain absolute or relative threshold amount.

[0026] In the context of garbage collection, in some scenarios, the event(s) tracked for burstiness include one or more memory allocation events, such as allocating heap memory, freeing heap memory, allocating at least N bytes of memory at once, allocating at least N bytes of memory within a time length t, freeing at least N bytes of memory at once, etc. In some scenarios, the event(s) tracked for burstiness include computational events that are less directly related to memory allocation, such as user thread creation or user process throughput events. Some scenarios track one or more events that are associated with or defined herein as thread composition adjustment input 306.

[0027] To improve garbage collection efficiency, garbage collection flexibility, or both, the innovators hypothesize that it would be worth considering adjusting the garbage collector's thread count while the garbage collector is running. This adjustment is different from using a fixed number of threads in any given execution of the garbage collector.

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

[0029] This rigid approach to setting the garbage collector thread count simplifies the implementation of the garbage collector, but also leads to inefficiencies with bursty user processes. If the fixed number of garbage collector threads is too small during bursts of activity, garbage collection efficiency will be reduced and user process throughput will be affected while user processes are stopped to allow garbage collection. If the fixed number of garbage collector threads is too large during non-bursty periods, the garbage collector thread synchronization overhead will be greater than necessary relative to the garbage collection work performed, and user process throughput will again be affected.

[0030] After considering various approaches and their impact on the garbage collector and user processes, the innovators conceived the various beneficial teachings provided herein. These teachings address technical challenges such as determining what data to use as input to control adjustments to the number of garbage collector threads during execution of the garbage collector, determining what adjustments to make in the garbage collector threads during execution of the garbage collector (in addition to or in lieu of thread counts), and determining how to efficiently map specific performance optimization goals to specific garbage collector thread adjustments.

[0031] Some embodiments described herein utilize or provide an enhanced system that includes a garbage collector thread composition controller configured to adjust the garbage collector thread composition during the execution of a process by making adjustments that change the thread composition. The garbage collection thread composition dynamic adjustment functionality has the technical benefit of improving garbage collection efficiency by adapting the number of overall garbage collection threads or the number of garbage collection threads of a specific category (e.g., allocation, compaction, deallocation, marking) in response to positive or negative process bursts. In some scenarios, the change in thread composition optimizes process throughput, garbage collector pause time, managed memory size, or a weighted combination thereof.

[0032] Some embodiments include a reinforcement learning mechanism configured to perform reinforcement learning that produces reinforcement learning results based at least in part on at least one of the following tuning inputs: process throughput, garbage collector pause time, managed memory size, allocation thread support, garbage collector thread count, memory allocation rate, garbage collector thread work level, composition controller interface routine results, processor core count, or reinforcement learning results. The reinforcement learning results are used by a garbage collector thread composition controller. The use of reinforcement learning has the technical benefit of automatically and proactively adapting the garbage collector thread composition, which improves garbage collection efficiency. Specifically, but not exclusively, efficiency is improved for bursty processes. The initial garbage collector thread composition specified in a configuration setting or command line may be inefficient. Thus, even for processes that are not bursty, and even if only a single change to the thread composition is made dynamically, dynamic tuning improves garbage collection efficiency.

[0033] In some embodiments, a garbage collector thread composition adjustment method includes obtaining a process throughput adjustment input as an optimization target and increasing allocation thread support. The method has the technical benefit of automatically and proactively improving the garbage collector thread composition in a manner that tends to increase process throughput (adding or optimizing allocation thread support). The increased process throughput after the allocation thread support change indicates improved garbage collection efficiency.

[0034] In some embodiments, a garbage collector thread composition adjustment method includes: obtaining a garbage collector pause time as an optimization target; 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 reducing the garbage collector thread count. The thread count is a total garbage collector thread count or a count of garbage collector threads of a particular type. The method has the technical benefit of automatically and proactively improving the garbage collector thread composition in a manner that tends to reduce garbage collector pause time (reducing the thread count) by reducing thread synchronization overhead. Pause time is also referred to as "stop the world time". The reduced pause time after the thread count is reduced indicates improved garbage collection efficiency.

[0035] In some embodiments, a method for adjusting garbage collector thread composition includes: obtaining 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 below a threshold associated with the garbage collector thread work level; and increasing the garbage collector thread count. The method has the technical benefit of automatically and proactively improving the garbage collector thread composition in a manner (increasing the thread count) that tends to reduce garbage collector pause times by performing garbage collection work with more parallelism. The reduced pause time after the increase in the thread count indicates improved garbage collection efficiency despite the additional thread synchronization overhead because there is sufficient GC work to amortize the synchronization costs.

[0036] In some embodiments, a method for adjusting garbage collector thread composition includes: obtaining a managed memory size as an optimization target; and increasing a garbage collector thread count by adding at least one garbage collector compaction thread. This method has the technical benefit of automatically and proactively improving the garbage collector thread composition in a manner that tends to reduce the managed memory size (increased compaction). The managed memory includes one or more heaps. Because the managed memory size is the optimization target, reducing the managed memory size indicates improved garbage collection efficiency.

[0037] In some embodiments, a method for adjusting garbage collector thread composition includes: obtaining managed memory size as an optimization target; and reducing a trigger threshold, which is a threshold for the garbage collector thread, wherein the computing system is configured to trigger garbage collection when the amount of managed memory allocated by the thread reaches the trigger threshold. This method has the technical benefit of automatically and proactively improving the garbage collector thread composition in a manner that tends to reduce managed memory size (reducing the threshold for triggering garbage collection). Because managed memory size is the optimization target, reducing managed memory size indicates improved garbage collection efficiency.

[0038] In some embodiments, the garbage collector thread composition adjustment method includes the following access to at least one of the garbage collector thread composition controller interface: a reinforcement learning mechanism, a testing tool, a profiling tool, or a diagnostic tool. In terms of garbage collector thread composition, the method has the technical benefit of automatically and proactively improving garbage collector efficiency or flexibility or both. In some embodiments, the garbage collector thread composition controller interface includes an application program interface (API). In some cases, the API allows a user process to dynamically specify how many processor cores the garbage collector uses, for example, as a minimum, maximum, or range. In some cases, the API allows a reinforcement learning mechanism, a testing tool, a profiling tool, or a diagnostic tool to specify a specific garbage collector thread composition in order to evaluate the efficiency or operational accuracy of the specified composition, thereby improving the efficiency and usability of these mechanisms and tools.

[0039] These and other benefits will be apparent to those skilled in the art based on the teachings provided herein.

[0040] Operating Environment

[0041] refer to Figure 1 , an operating environment 100 for an embodiment includes at least one computer system 102. Computer system 102 may or may not be a multi-processor computer system. The 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 cloud 136. An individual machine is a computer system, and a network or other group of cooperating machines is also a computer system. A given computer system 102 may be configured for end users, for example, with applications, for administrators, as a server, as a distributed processing node, and / or in other ways.

[0042] Human users 104 sometimes interact with computer system 102 user interface 322 by using display 126, keyboard 106, and other peripheral devices 106, via typed text, touch, voice, movement, computer vision, gestures, and / or other forms of I / O. In some embodiments, virtual reality or augmented reality or both are provided by system 102. In some embodiments, screen 126 is a removable peripheral device 106, and in some embodiments, screen 126 is an integral part of system 102. User interfaces support interaction between embodiments and one or more human users. In some embodiments, user interfaces include one or more of a command line interface, a graphical user interface (GUI), a natural user interface (NUI), a voice command interface, or other user interface (UI) presentations, presented as different options or integrated.

[0043] System administrators, network administrators, cloud administrators, security analysts and other security personnel, operations personnel, developers, testers, engineers, auditors, and end users are each specific types of human users 104. In some embodiments, automated agents, scripts, playback software, devices, and the like that operate or otherwise serve on behalf of one or more humans also have user accounts, such as service accounts. User accounts are sometimes created or otherwise provided as human user accounts, but in practice are primarily or exclusively used by one or more services; such accounts are actually service accounts. While a distinction can be made, "service account" and "machine-driven account" are used interchangeably herein and are not limited to any particular provider.

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

[0045] Each computer system 102 includes at least one processor 110. Similar to other suitable systems, the computer system 102 also includes one or more computer-readable storage media 112, also referred to as computer-readable storage devices 112. In some embodiments, the tools 122 include security tools or software applications, editors, compilers, debuggers, and other software development tools on the mobile device 102 or workstation 102 or server 102, as well as APIs, browsers, or web pages and corresponding software for protocols such as HTTPS. Files, APIs, endpoints, and other resources can be accessed by an account or set of accounts, a user 104 or user group 104, an IP address or IP address group, or other entity. Access attempts can present passwords, digital certificates, tokens, or other types of authentication credentials.

[0046] Storage media 112 comes in various physical forms. Some examples of storage media 112 include volatile memory, non-volatile memory, fixed-place media, removable media, magnetic media, optical media, solid-state media, and other types of physical, persistent storage media (rather than simply propagated signals or pure energy). Specifically, in some embodiments, a configured storage medium 114 (such as a portable (i.e., external) hard drive, CD, DVD, memory stick, or other removable non-volatile storage medium) functionally becomes a physical part of the computer system when inserted or otherwise installed, making its contents accessible for interaction with and use by processor 110. Removably configured storage media 114 is an example of computer-readable storage media 112. Other examples of computer-readable storage media 112 include built-in RAM, ROM, hard drives, and other memory storage devices that are not readily removable by user 104. For purposes of compliance with current U.S. patent requirements, no computer-readable medium, computer-readable storage medium, computer-readable memory, or computer-readable storage device is a signal per se or pure energy under any pending or issued U.S. claim.

[0047] Storage device 114 is configured with binary instructions 116 that can be executed by processor 110; "executable" is used broadly herein to include, for example, machine code, interpretable code, bytecode, and / or code running on a virtual machine. Storage media 114 is also configured with data 118, which is created, modified, referenced, and / or otherwise used for technical effect by the execution of instructions 116. Instructions 116 and data 118 configure the memory or other storage media 114 in which they reside; when such memory or other computer-readable storage media is a functional part of a given computer system, instructions 116 and data 118 also configure that computer system. In some embodiments, a portion of data 118 represents real-world items, such as events, product characteristics, inventory, physical measurements, settings, images, readings, volumes, etc., represented in the system 102 hardware. This data is also transformed through backup, restore, submission, abort, reformatting, and / or other technical operations.

[0048] Although the embodiment is described as being implemented as the software instruction executed by one or more processors in a computing device (for example, a general-purpose computer, a server, or a cluster), this description is not meant to exhaust all possible embodiments. It will be understood by those skilled in the art that identical or similar functions may also be generally implemented in whole or in part, directly in hardware logic, to provide identical or similar technical effects. Alternatively or in addition to software implementations, the technical functions described herein may be performed at least in part by one or more hardware logic components. For example, and without excluding other implementations, some embodiments include one or more of the following: hardware logic components 110, 128 (such as field programmable gate arrays (FPGAs)), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip components (SOCs), complex programmable logic devices (CPLDs), and similar components. In some embodiments, components are grouped into interactive function modules based on, for example, their inputs, outputs, or their technical effects.

[0049] In addition to the processor 110 (e.g., CPU, ALU, FPU, TPU, GPU, and / or digital processor), memory / storage media 112, peripheral devices 106, and display 126, some operating environments also include other hardware 128, such as batteries, buses, power supplies, wired and wireless network interface cards. The terms "screen" and "display" are used interchangeably herein. In some embodiments, the display 126 includes one or more touch screens, a screen that responds to input from a pen or tablet, or a screen that operates only for output. In some embodiments, peripheral devices 106, such as human user I / O devices (screen, keyboard, mouse, input board, microphone, speaker, motion sensor, etc.), will be presented as being in operable communication with the one or more processors 110 and memory 112.

[0050] In some embodiments, the system includes multiple computers connected via a wired and / or wireless network 108. The network interface equipment 128 can provide access to the network 108 using network components (such as packet-switched network interface cards, wireless transceivers, or telephone network interfaces, etc.) that are present in some computer systems. In some embodiments, for example, in a software-defined network or sandbox or other secure cloud computing environment, virtualization of the networking interface equipment and other network components (such as switches or routers or firewalls) is also present. In some embodiments, one or more computers are partially or completely in an "air gap" state due to being disconnected or only intermittently connected to another networked device or remote cloud. Specifically, the garbage collector thread composition adjustment function 204 can be installed on an air gap network and then periodically or occasionally updated, or not updated at all, using removable media 114. Some embodiments also communicate technical data or technical instructions or both via direct memory access, removable or non-removable volatile or non-volatile storage media, or other information storage-retrieval and / or transmission methods.

[0051] Those skilled in the art will appreciate that the foregoing and other aspects presented herein under the "operating environment" form part of some embodiments. The headings of this document are not intended to strictly categorize features into embodiment and non-embodiment feature sets.

[0052] One or more items are shown in outline form in the figures, or listed in parentheses, to emphasize that they are not necessarily part of the illustrated operating environment or all embodiments, but rather interact with the operating environment or items in some embodiments as described herein. Any item that is not outlined or in parentheses is not necessarily required in any figure or any embodiment. Specifically, Figure 1 is provided for convenience; Figure 1 The inclusion of an item does not imply that the item or the use of the item described was known prior to the current innovation.

[0053] In any subsequent application claiming priority from the present application, reference numerals may be added to designate items disclosed in this application. Such items may include, for example, software, hardware, steps, processes, systems, functions, mechanisms, data structures, computing resources, programming languages, tools, workflows, or algorithm implementations, or other items in a computing environment, which are disclosed herein but are not associated with specific reference numerals herein. Corresponding drawings may also be added.

[0054] More about the system

[0055] Figure 2The diagram illustrates a computing system 102 configured with 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, the enhanced system 202 comprises a single machine, a local network of machines, machines in a particular building, machines used by a particular entity, machines in a particular data center, machines in a particular cloud, or another computing environment 100 suitably enhanced. Figure 2 Items of are discussed at various points herein, and additional details regarding them are provided in the discussion of the list of reference numerals later in this disclosure document.

[0056] Figure 3 Some aspects of some enhancement systems 202 are shown. This is not a comprehensive overview of all aspects of the enhancement system 202 or all aspects of the garbage collector thread composition tuning functionality 204. Nor is it a comprehensive overview of all aspects of the environment 100 or system 202 or other contexts of the enhancement system 202, or any aspects of the functionality 204 that might be used in or with the system 102. Figure 3 Items of are discussed at various points herein, and additional details regarding them are provided in the discussion of the list of reference numerals later in this disclosure document.

[0057] Figure 4 Illustrated are some additional aspects of the garbage collector thread composition adjustment 206. This is not a comprehensive overview of all additional aspects of the garbage collector thread composition adjustment or all aspects of the garbage collector thread composition adjustment functionality 204. Figure 4 Items of are discussed at various points herein, and additional details regarding them are provided in the discussion of the list of reference numerals later in this disclosure document.

[0058] Figure 5 Illustrated are some aspects of garbage collector thread composition tuning inputs 306. This is not a comprehensive overview of all inputs to garbage collector thread composition tuning, nor is it a requirement that each of the example inputs shown be used in a given embodiment. Figure 5 Items of are discussed at various points herein, and additional details regarding them are provided in the discussion of the list of reference numerals later in this disclosure document.

[0059] Figure 6 Some aspects of the garbage collector thread composition 134 are shown. This is not a comprehensive overview of all aspects or examples of the garbage collector thread composition, nor is it a requirement to use each of the example aspects shown in a given embodiment. Figure 6Items of are discussed at various points herein, and additional details regarding them are provided in the discussion of the following list of reference numerals in this disclosure document.

[0060] Other figures are also relevant to system 202 . Figure 7 and Figure 8 The method of operation of the system 202 is illustrated.

[0061] In some embodiments, enhancement system 202 is networked via interface 322. In some embodiments, interface 322 comprises hardware (such as a network interface card), software (such as a network stack, API, or sockets), a combination (such as a network connection), or a combination thereof.

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

[0063] In some embodiments and some scenarios, adjustments 206 are performed proactively by the composition controller 302. In some embodiments, adjustments 206 are performed in response to input from a routine 320, which is called, for example, by a user process 124 or 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, the GC thread control API 318 allows the user to specify how many cores 528 the GC can use, or to have the 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 external to the process 124 and external to the GC 210, and based at least in part on this external information, the composition controller 302 can then influence or override the GC thread composition 134.

[0064] The thread count 324 is one aspect of the thread composition 134. In some embodiments, the thread count 324 is the only aspect of the thread composition 134 that is monitored or controlled by the composition controller 302. However, in some other embodiments, one or more additional aspects of the thread composition 134 are also monitored or controlled, such as: the number 612 of GC allocation threads 510 support 616, the number 604 of GC compaction threads 518, the number 606 of GC marking threads 514, the number 608 of GC sweep threads 522, the total number 610 of GC threads 132, or the amount 416 of memory allocated by each GC thread that triggers garbage collection.

[0065] Some examples of different types 614 of allocation thread support 616 include defragmenting (compacting) areas of the allocatable heap, copying garbage collection functionality that copies live objects out of a memory area to clear that area, and portions of the garbage collector that are invoked in response to user process allocation requests, such as object constructor calls or malloc() calls. Specifically, in some implementations, when a user process allocation thread 510 request arrives at the GC, the request is switched to the corresponding GC thread, which in turn also serves as the allocation thread 510. The allocation thread support count 612 indicates the size of the allocation thread support, for example, a number of GC threads that are invoked in response to user process allocation requests, or a number of empty or otherwise defragmented areas of the heap of at least a predetermined size.

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

[0067] The composition controller 302, when executed by the set of processors, is configured to adjust 206 the thread composition 134 during execution of the process 124 by making an adjustment 206 to change the thread composition from a previous thread composition 134 to an adjusted thread composition 134. Execution of the garbage collector 210 overlaps with 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: process throughput 502, garbage collector pause time 504, managed memory size 506, allocation thread count 602, allocation thread support count 612, garbage collector thread count 324 (any of 602, 604, 606, 608, or 610), memory allocation rate 532, garbage collector thread work level 524, composition controller interface routine 320 results 526, processor core count 530, or reinforcement learning 212 results 534.

[0068] Although heap memory is managed memory, the term "managed memory" is used herein rather than "heap" to help avoid confusion, as "heap" can mean two different things in embodiments where separate threads are responsible for only a portion of a larger area of ​​managed memory. From the GC's perspective, the managed memory in such an implementation consists of multiple per-thread heaps, while from the perspective of process 124, it is all one heap. Work stealing is sometimes permitted between such GC threads, but a given thread is still primarily responsible for managing its own respective heap on behalf of process 124. In some other embodiments, by contrast, a GC thread is not primarily or solely responsible for a portion of the heap; instead, each GC thread can routinely manage any portion of the heap. Under either approach—regardless of whether the heap is divided among threads—managed memory includes at least one heap.

[0069] In addition to the composition controller 302, some embodiments also include the garbage collector itself. Thus, in some embodiments, the composition controller is not integrated into the garbage collector, e.g., the composition controller 302 can be modified or replaced without having to recompile the garbage collector. In other embodiments, the composition controller is an integrated part of the garbage collector.

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

[0071] In some embodiments, the RL input 306 represents the amount of deviation from the optimization target. In some of these embodiments, the deviation is measured in a quantity, or is provided only when it is above a specified threshold, or both. The deviation is absolute or relative. For example, in one scenario, when the measured pause time 504 is sufficiently above the optimization target pause time 504, the difference between the measured value and the target value is submitted as an input to the reinforcement learning mechanism 214. Thus, this embodiment 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 further discussed in a separate section later in this disclosure.

[0072] In some embodiments, programmatic access to the composition controller 302 is provided by a composition controller interface 318 including an API 318 or other programming interface 322. In some embodiments, the API or a portion of the API is exposed for end-user calls from the caller process 124, 404. In some embodiments, the API routine 320 that specifies the minimum / maximum permitted number 402 for adjusting the thread count(s) 324 is not published for use by the end user. However, the minimum / maximum permitted number 402 for adjusting the thread count is utilized or can be used as an internal tuning parameter. In addition to or instead of publishing the composition controller API 318 to the end user, the API is sometimes called by or published to one or more of the following: the RL mechanism 214, the testing tool 122, the profiling tool 122, or the diagnostic tool 122.

[0073] In some embodiments, the composition controller interface 318 includes a routine 320 that is configured to specify 804 optimization goals 312 to the composition controller when executed by the set of processors during process execution. For example, sometimes the goals 312 request or instruct the composition controller 302 to optimize the GC thread composition for throughput 502, pause time 504, heap size 506, or a weighted 410 mixture thereof.

[0074] In some embodiments, the composition controller interface 318 includes a routine 320 that is configured to specify 804 a processor core count 530 constraint 820 to the composition controller when executed by the set of processors during process execution. For example, sometimes the routine 320 requests or instructs the composition controller 302 to cause the GC to use up to a maximum number of cores, or to use cores between a low and a high number.

[0075] In some embodiments, the composition controller interface 318 includes a routine 320 that, when executed by the set of processors during process execution, specifies 804 a minimum permitted number 402 for any adjustment in the number of garbage collector threads. For example, sometimes the routine 320 requests or instructs the composition controller 302 not to change the number 610 of GC threads 132 unless the change is to at least three threads.

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

[0077] In some embodiments, the composition controller interface 318 includes a routine 320 that, when executed by the set of processors during process execution, is configured to specify 804 a minimum permissible wait 408 between any adjustments in the number of garbage collector threads. For example, sometimes the routine 320 requests or instructs the composition controller 302 to wait at least 500 milliseconds between changes in the number of GC threads.

[0078] In some embodiments, the composition controller interface 318 includes a routine 320 that is configured to, when executed by the set of processors during process execution, specify 804 a maximum permissible wait 408 between any adjustments in the number of garbage collector threads. For example, sometimes the routine 320 requests or instructs the composition controller 302 to wait no more than 1000 milliseconds between changes in the number of GC threads.

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

[0080] Although specific examples of garbage collector thread composition adjustment architectures are shown in the accompanying drawings, embodiments may depart from these examples. For example, items shown in different drawings may be included together in an embodiment, items shown in a drawing may be omitted, functions shown in different items may be combined into fewer items or a single item, items may be renamed, or items may be connected to each other differently.

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

[0082] Process (also known as method)

[0083] A process (which term is also referred to as a "method" in the legal sense) is variously illustrated herein in the text and in the drawings. Figure 7 and Figure 8 The method series 700 and the method series 800 are each illustrated as being performed or assisted by some enhancement system, such as some system 202 or another garbage collector thread composition adjustment enhancement system as taught herein.

[0084] Figures 1 to 6 The diagram illustrates a garbage collector thread composition tuning system 202 architecture with implicit or explicit actions, such as starting a process 124, starting a garbage collector, and performing garbage collection operations such as marking, sweeping, compacting, allocating, updating GC data structures, creating or pausing or resuming or terminating GC threads, or otherwise processing data 118, where the data 118 includes, for example, heap memory 112, GC data structures, and tuning inputs 306, as well as other examples disclosed herein.

[0085] Unless otherwise indicated, the technical processes illustrated in the figures or otherwise disclosed are performed automatically (e.g., automatically by augmentation system 202). Related unclaimed processes may also be performed partially automatically and partially manually, as long as human action is involved, for example, in some cases, human 104 enters data in response to the execution of process 124 or kernel 120. However, the processes contemplated herein as innovative are not entirely manual or purely mental processes; the claimed processes cannot be performed solely in a person's head or on paper. Any contrary claim interpretation is inconsistent with this disclosure.

[0086] In a given embodiment, zero or more of the illustrated steps of a process may be repeated, possibly operating with different parameters or data. The steps in an embodiment may also be performed in the same manner as described above. Figure 8 The order shown is different from top to bottom. Figure 8 It is a supplement to the text examples and text descriptions of the embodiments provided herein. Figure 8 In the event of any alleged inconsistency, lack of clarity, or overbroadness resulting from any aspect or interpretation of the present disclosure, the text of the present disclosure shall take precedence. Figure 8 aspects or explanations of.

[0087] Arrows in a process or data flow diagram indicate permissible flows; thus, arrows pointing in more than one direction indicate that the flow can proceed in more than one direction. Steps may be performed serially, with partial overlap, or entirely in parallel within a given flow. Specifically, the action items of flowchart 800 are traversed to indicate that the order of 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. Steps may also be omitted, combined, renamed, regrouped, performed on one or more machines, or otherwise depart from the illustrated flow, so long as the performed process is operable and complies with at least one claim of an application or patent that includes or claims priority to the present disclosure. It will be recognized by those skilled in the art that the steps described herein may be performed in accordance with the present disclosure. Figure 8Where a consistent given sequence of steps S is not operable, the sequence S is not within the scope of any claim. Any other assertion is inconsistent with the present disclosure.

[0088] Some embodiments provide or utilize a method 800 performed by a computing system 202 with managed memory to adjust 206 a thread composition 134 of a garbage collector 210 during execution of a process that uses the managed memory, wherein the managed memory is at least partially managed by the garbage collector. In this discussion and generally elsewhere herein, "method" is used in a legal sense and "process" is used in a computer science sense. The method includes obtaining 304 at least one of the following adjustment inputs 306: process 124 throughput 502, garbage collector pause time 504, managed memory size 506, allocation thread count 602, allocation thread support count 612, garbage collector thread count 324 (any of 602 to 610), memory allocation rate 532, garbage collector thread work level 524, composition controller interface routine results 526, processor core count 530, or reinforcement learning results 534; and during execution of the process, making 206 an adjustment 206 that changes the thread composition 134 from a previous 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.

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

[0090] In a first variation, the method checks the allocation rate before and after the adjustment to confirm 822 that the allocation rate has actually increased substantially. If so, further action of increasing the allocation rate is skipped, but if not, the method increases 810 the allocation thread support count 612 again.

[0091] In a second variation, the method checks the current allocation rate before adjusting and compares it to the target allocation rate 806. The method then queries 806 a table or formula or another heuristic 418 to determine how much to increase the allocation thread support count based on the current and target allocation rates.

[0092] In some embodiments of method 800, throughput 502 is targeted for optimization because obtaining 304 includes obtaining 304 a process throughput 502 adjustment input as an optimization target 312. In some cases, a specific target throughput 502 is specified 304, in some cases, throughput 502 is given a weight 410 relative to other optimization targets (or targets), and in some cases, throughput is specified 304 as a target without any specific target or weight. Regardless, in this example, obtaining 304 also includes obtaining 304 an allocation thread support count 612, and adjusting 206 includes increasing 810 the allocation thread support count. In a variation, obtaining the allocation thread support count is skipped and the method adds 810 another allocation thread support without first checking the allocation thread support count.

[0093] In some scenarios, pause time 504 is an optimization goal. In some embodiments, method 800 examines the current number of threads and the current workload level 524. The method finds that there are too many GC threads for the workload, so the method reduces the number of GC threads. The technical assumption is that reducing 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.

[0094] Different embodiments define GC work level 524 in different specific ways. Generally, for each GC thread, an embodiment has data indicating when the GC thread is working and when it is not working (e.g., because it is waiting). One measure of GC work level 524 is the ratio or difference of measured GC work time compared to measured GC wait time.

[0095] In some embodiments, metric 314 indicates an approximate amount of work remaining for the GC to perform, for example, as represented by the number of live bytes for which the GC performs garbage collection operations. If the number of live bytes is very low relative to threshold 406, embodiments reduce 810 the number of GC threads. In some cases, the amount of GC work to be performed is approximately proportional to the memory remaining on the heap (i.e., live memory). For generational GCs, this amount is approximately proportional to the live memory in the generation collected during the GC.

[0096] In a variation, metric set 314 indicates how much work the GC faces by recording data indicating how much of each type of GC work the GC has to perform. For example, some embodiments record the number of cards the GC went through for a new generation collection. Some embodiments also record activities that could be completed or were completed in parallel, and also note activities that could not be completed or were not completed in parallel. The activities that could not or were not completed in parallel do not depend on the number of GC threads.

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

[0098] In a related scenario, pause time is also an optimization goal. The method examines the current number of threads and the current workload level and finds that there are too few GC threads for the workload, so the method increases the number of GC threads. The technical assumption is that increasing the number of threads will reduce GC pause times, despite the increased synchronization overhead. If this assumption turns out to be incorrect, one or more subsequent adjustments 206 will compensate for the error.

[0099] That is, in some embodiments, obtaining includes obtaining 304 garbage collector pause time as an optimization target; obtaining 304 also includes obtaining a garbage collector thread count and a 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 workload). Adjusting includes increasing 810 the garbage collector thread count. The technical assumption is that increasing the GC thread count will make the GC run faster (although with increased synchronization costs), thereby improving (reducing) pause times. If the assumption turns out to be incorrect, one or more subsequent adjustments 206 will compensate for the error.

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

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

[0102] In a related scenario, heap size is still the optimization target. However, in this scenario, method 800 reduces the amount of memory allocated 416 by each GC thread that triggers garbage collection.

[0103] In some embodiments, obtaining 304 includes obtaining 304 a managed memory size 506 as an optimization target 312. In some cases, a specific target size 506 is specified 304 for a specific thread's portion of a heap or for the entire heap, in some cases the heap size is given 814 a weight 410 relative to other optimization target(s), and in some cases the heap size is specified 304 as a target 312 without any specific target or weight. Adjusting 206 includes reducing 810 a trigger threshold 416, which is a threshold 406 for the garbage collector thread 132, the computing system 202 being configured to trigger garbage collection when the amount of managed memory allocated by the thread reaches the trigger threshold.

[0104] In another scenario, method 800 checks how long a thread must wait during allocation. The thread may not request the same amount of memory in the allocation, but the optimization goal is to complete each allocation faster than previously measured, or faster than a specified wait time.

[0105] In some embodiments, obtaining 304 includes obtaining 304 process throughput 502 adjustment input 306 as optimization target 312. Obtaining also includes obtaining 304 allocation thread support count 612 and obtaining 304 allocation duration 536. Adjusting includes adjusting 206 allocation thread support count 612 based at least in part on the allocation duration. Waiting for allocations can reduce throughput 502. Generally, adding allocation thread support will tend to reduce allocation duration, and removing allocation thread support will tend to increase allocation duration. As in other scenarios, further adjustments are possible if the optimization target is not achieved.

[0106] Some embodiments and scenarios utilize multiple optimization goals 312. Sometimes the goals 312 are weighted 410 relative to each other. 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.

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

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

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

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

[0111] Configuring Storage Media

[0112] Some embodiments include a configured computer-readable storage medium 112. Examples of storage medium 112 include disks (magnetic, optical, or other), RAM, EEPROM or other ROM, and other configurable memory, specifically computer-readable storage media (which does more than simply propagate signals). In some embodiments, the configured storage medium is specifically a removable storage medium 114, such as a CD, DVD, or flash memory. Depending on the embodiment, the general-purpose memory may be removable or non-removable, and volatile or non-volatile, and may in this embodiment be configured using items in the form of data 118 and instructions 116 (such as the garbage collector 210, the garbage collection thread composition controller 302, the composition controller interface 318, the thread count 324, the composition adjustment input 306, and the reinforcement learning mechanism 214) read from the removable storage medium 114 and / or another source such as a network connection to form the configured storage medium. As disclosed herein, the configured storage medium 112 enables the computer system 202 to perform the process steps of the technology for providing or utilizing the garbage collection thread composition adjustment functionality 204. Thus, the figures help illustrate configured storage medium embodiments and process (also referred to as "method") embodiments, as well as system and process embodiments. Specifically, in Figure 7 or Figure 8 Any method steps illustrated in or taught herein may be used to help configure a storage medium to form a configured storage medium embodiment.

[0113] Some embodiments use or provide computer-readable storage devices 112, 114 configured with data 118 and instructions 116 that, when executed by the processor 110, cause the computing system 202 to perform the method 800 to adjust the thread composition 134 of the garbage collector during execution of a garbage collection process (a process that uses memory 112 managed by the garbage collector). The method includes obtaining 304 at least one of the following adjustment inputs 306: process throughput 502, garbage collector pause time 504, managed memory size 506, allocation thread count 602, allocation thread support count 612, garbage collector thread count 324, memory allocation rate 532, garbage collector thread work level 524, composition controller interface routine results 526, processor core count 530, or reinforcement learning results 534; and during execution of the process 124, making 206 an adjustment 206 that changes the thread composition from a previous 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.

[0114] In some embodiments, obtaining 304 at least two of the adjustment inputs and adjusting is based at least in part on the at least two obtained adjustment inputs. In some embodiments, obtaining 304 at least N of the adjustment inputs and adjusting is based at least in part on the at least N obtained adjustment inputs, where N is in a range of 3 to 9.

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

[0116] In some embodiments, obtaining 304 includes obtaining 304 the managed memory size 506 as the optimization target 312 , and adjusting includes adjusting 206 the garbage collector compaction thread count 604 .

[0117] In some embodiments, obtaining 304 includes obtaining 304 garbage collector pause time 504 as optimization target 312 , and adjusting includes adjusting 206 garbage collector thread count 610 .

[0118] More about reinforcement learning

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

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

[0121] The agent component includes a learning decision maker that interacts with the environment. In these examples, the garbage collector 210 is the agent.

[0122] The environment component includes the domain 100 in which the agent operates. In these examples, the environment includes the execution engine 120 and the managed application process 124, as the garbage collector 210 reacts to conditions where both are available. Although for convenience herein the reference numeral 124 is applied to both the process and the managed application, in some variations, the managed application includes multiple processes that are individually memory managed by garbage collection.

[0123] The state component includes a digital representation of the current status of the agent. In these examples, the state of the managed process includes one or more metrics 314, such as segmentation, allocation, duration, count, context switch, etc. In some cases, the state data 118 also includes the state of the virtual machine at a specific point in time.

[0124] The reward component includes feedback data from the environment 118. A user process or other target 312 selector selects or influences the selection of feedback that is utilized to tune garbage collection, for example based on metrics such as associated with total pause duration, memory footprint, tail latency, or a combination thereof.

[0125] The strategy component includes functions that map the state of the agent to specific actions computationally. In some cases, the mapping function implements an algorithm to decide what is the optimal heap count (or other goal 312) at a given point in time.

[0126] The value component includes a numeric representation of a future reward that the agent will receive by taking a specified action. In some cases, the value represents the long-term improvement or reward obtained by selecting a specific heap thread count 324 or heap size 506 based on a specific state. In some cases, the value is the total pause time, the heap size before garbage collection operations, a predetermined percentile (e.g., 95%) of the target 312, or a combination of any of these.

[0127] In some embodiments, the RL closed feedback loop 900 is connected to Figure 9 The shown Figure 1 In this 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 the arrows represent data flow. The vertical dashed line represents the boundary between time t and time t+1. In some variations, only the process 124 or the execution engine 120 is present in the RL loop.

[0128] In some embodiments, the agent (GC) learns the optimal policy using a version of RL known as Q-learning. In some embodiments, the agent (GC) learns the optimal policy using a model-free version of RL, such as RL using Markov decision processes (MDPs) or RL using state-action-reward-state-action (SARSA).

[0129] Additional Notes

[0130] Additional support for the discussion of the garbage collector thread composition adjustment functionality 204 herein is provided under various headings. However, all of these are intended to be understood as integral and integral to the discussion of the embodiments contemplated by the present disclosure.

[0131] Those skilled in the art will recognize that not every part of this disclosure, or any specific detail therein, must meet legal standards such as enablement, written description, best mode, novelty, non-obviousness, inventive step, or industrial applicability. Any apparent conflict with any other patent disclosure, even from the owner of the present innovation, shall not affect the interpretation of the claims set forth in this patent disclosure. With this understanding in mind (which applies to all parts of this disclosure), the examples and illustrations are provided herein.

[0132] Some workloads perform computational work in bursts. For example, mail servers typically have periods of busy and idle time. In some environments, the garbage collection thread count is set, via configuration or command-line values, to a sufficiently high count to cover the expected bursts. However, this count is likely to exceed the value required for the bursts. Furthermore, during non-burst periods, a higher thread count leads to inefficiencies, for example, due to synchronization of inter-thread communication, per-thread data structures, and, in some implementations, heap segmentation. Even determining an approximately efficient initial GC thread count requires expertise and performance data that are not always present in a given managed memory program execution environment.

[0133] Some embodiments disclosed herein improve garbage collector performance in containers by dynamically adjusting the number of garbage collector threads during the life of the container process. Some common GCs have an option to specify the number of GC threads, but this number does not change during the life of the process. For example, if the workload suddenly increases and there are more live objects, it would be beneficial to adjust to provide more GC threads rather than maintaining a constant number of GC threads.

[0134] In some embodiments, a method 800 for managing memory in a computing system includes: determining 304 a current garbage collection thread count indicating how many 324 garbage collection threads 132 are currently enabled; obtaining 304 at least one of the following factors 306: an allocation thread count indicating how many allocation threads are enabled, an allocation thread support count 612, an allocation rate indicating how quickly allocations occur, a garbage collection thread work level indicating whether adjusting the thread count relative to a fixed cost of garbage collection is effective, an available core count indicating how many processor cores are available, or a reinforcement learning result indicating the effect of the adjustment; determining 806 a target 312 garbage collection thread count; and when the target garbage collection thread count is different from the current garbage collection thread count, adjusting 206 the number of enabled garbage collection threads.

[0135] Some embodiments dynamically adjust the number of GC threads for optimal performance in unusual workloads. In this context, an "unusual" workload is either a bursty workload where the demands vary during the life of the process, or a workload where the demands are regular but the process is relocated or reconfigured to run on a different software or hardware configuration.

[0136] In some environments 100, the parallel GC 210 uses multiple GC threads 132 to perform GC work so it can be completed in a shorter amount of time. In a common implementation, there is a constant number of GC threads. In some cases, this number can be configured to a chosen initial value that does not change during the life of the process. However, depending on the workload and environment in which the process is running, varying the number of GC threads can be very beneficial.

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

[0138] A number 602 of allocation threads and an allocation rate 532. If GC threads are also responsible for doing allocation work, then more GC threads will tend to be beneficial when there is more allocation work.

[0139] GC Workload 524. If there is too little GC work, the synchronization cost between the garbage collector (GC) threads may be too expensive relative to the GC work, so fewer GC threads (or just one thread) can make each garbage collection (GC) faster. If there is a lot of GC work, more GC threads will tend to make the GC complete faster and the synchronization cost will be amortized by the GC work.

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

[0141] Some embodiments provide an API 318 for the user to change the number of GC threads, for example, when the workload is known to be changing.

[0142] As an implementation illustration, in some systems with parallel GC, each GC thread works on its own portion of the heap, although there is some work stealing between threads. Therefore, changing the number of GC threads involves partitioning the heap differently. This partitioning of the heap involves updating data structures associated with the heap portions to reflect the new number of GC threads. Some data structures associated with the GC or GC threads specify, for example, which portion of the heap corresponds to which thread, where that portion of the heap is located in memory, and where to access the free list of items for adaptation.

[0143] Some embodiments give 814 different weights 410 to different factors 306 depending on the optimization goal 312. For example, sometimes the API 318 allows the 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 managed by the GC is sometimes referred to as the "GC heap." In some GC implementations, this is not to be confused with a separate memory area that is also organized as a heap but used by the GC itself (also referred to as the "GC's heap" or the "GC's own heap"). When optimizing 310 GC pause time, some embodiments prefer GC work level as input 306. In some cases, even without many allocations, there is a lot of GC work to be done, so the controller 302 increases the thread count to complete the GC faster.

[0144] Some embodiments optimize the GC heap size 506 by maintaining the same number of GC threads but reducing the number of megabytes 416 that a process can allocate on the GC heap before triggering the next garbage collection. Some embodiments optimize the GC heap size 506 by changing the number of GC threads, for example, creating more compacting GC threads instead of sweeping threads. Some embodiments utilize a hybrid approach.

[0145] In some embodiments, system 202 is an embedded system such as an Internet of Things system. "IoT" or "Internet of Things" means any networked collection of addressable embedded computing or data generation or actuator nodes. Individual nodes are referred to as Internet of Things devices 101 or IoT devices 101 or Internet of Things systems 102 or IoT systems 102. Such nodes are examples of computer systems 102 as defined herein and may include or be referred to as, for example, "smart" devices, "endpoints," "chips," "tags," or "labels," and the IoT may be referred to as a "cyber-physical system." In the phrase "embedded system," the embedding referred to is embedding a processor and memory in the device, not embedding a debug script in the source code.

[0146] IoT nodes and systems typically have at least two of the following characteristics: (a) no local human-readable display; (b) no local keyboard; (c) the primary source of input is a sensor that tracks the source of non-verbal data to be uploaded from the IoT device; (d) no local rotating disk storage—RAM chips or ROM chips provide the only local memory; (e) no CD or DVD drive; (f) embedded in a home appliance or household device; (g) embedded in an implantable or wearable medical device; (h) embedded in a vehicle; (i) embedded in a process automation control system; or (j) designed with a focus on one of the following: environmental monitoring, urban 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. IoT communications can 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 wired or wireless (cellular or other) communications. IoT storage devices or actuators or data output or control can be the target of unauthorized access attempts via the cloud, via another network, or via direct local access.

[0147] Technical features

[0148] The technical features of the embodiments described herein will be apparent to one of ordinary skill in the art, and will also be apparent to the attentive reader in several respects. Some embodiments address technical activities such as computing system memory garbage collection 210, computing system performance measurement 502, 504, 506, and reinforcement learning 212, each of which is deeply rooted in computing technology. Some of the technical mechanisms discussed include, for example, a garbage collector 210, threads 132, reinforcement learning mechanisms 214, and a thread composition controller 302. Some of the technical effects discussed include, for example, 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 completely eliminated. Based on the description provided, other advantages of the teaching-based technical features will also be apparent to one of ordinary skill in the art.

[0149] Those skilled in the art will appreciate that garbage collection 210 is a technical activity that cannot be performed mentally because it requires traversing the computing system memory 112. For example, this includes traversing heap management data structures such as free lists. As disclosed herein, garbage collection also involves the creation, scheduling, pausing, execution, and termination of the garbage collection thread 132, which cannot be performed mentally or manually. Furthermore, mental or pen-and-paper activities cannot pause the computing system's execution of the process 124 as needed to permit the execution of garbage collection operations such as marking 512, sweeping 520, or compacting 516 (depending on the GC implementation). Those skilled in the art will also appreciate that even a partial manual attempt to perform garbage collection would result in unacceptable delays in program execution and introduce the risk of human error that could crash the program. The speed, accuracy, memory capacity, and specialized processing power required to perform garbage collection are clearly lacking. For example, decades of technological advancements in garbage collection technology demonstrate this; if garbage collection were routinely performed mentally or solely on paper, it would be meaningless and not celebrated or pursued. But that is not the case, and it cannot be so.

[0150] Specifically, computing system memory garbage collection is part of computing technology. Therefore, garbage collector improvements such as function 204 described herein are improvements to computing technology.

[0151] Different embodiments provide different technical benefits or other advantages in different situations, but those skilled in the art, informed by the teachings herein, will recognize that particular technical advantages may result from particular innovative features or combinations of features, as described at various points herein. Any general or abstract aspects are integrated into actual applications, such as a kernel garbage collector 210, a language runtime garbage collector 210, or another process garbage collector 210.

[0152] Some embodiments described herein address technical challenges in computer technology, and more specifically address technical challenges arising in the use of garbage collector 210. Improvements in garbage collector functionality result in improvements in the performance, usability, security, and maintainability of software whose execution utilizes—and often depends on—the improved garbage collector functionality.

[0153] Some of the embodiments described herein may be viewed by some within a broader context. For example, concepts such as efficiency, reliability, user satisfaction, or waste may be considered relevant to a particular embodiment. However, the availability of a broader context does not necessarily lead to the conclusion that the exclusive rights sought herein are for abstract concepts; this is not the case.

[0154] Instead, the present disclosure focuses on providing suitable specific embodiments whose technical effects fully or partially solve specific technical problems, such as how to adapt the garbage collector to improve process throughput 502, how to adapt the garbage collector to reduce garbage collection pauses 504, how to adapt the garbage collector to reduce the heap size 506, and how to determine the effective number of cores 528 to dedicate to garbage collection. Other configured storage media, systems, and processes related to efficiency, reliability, user satisfaction, or waste are outside the scope of this disclosure. Accordingly, with a proper understanding of the present disclosure, ambiguity, mere abstraction, lack of technical features, and attendant proof problems are also avoided.

[0155] Other combinations and variations

[0156] Any combination 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 described above and variations thereof. A process may include any of the steps described herein, which may be in any subset or combination or sequential form that is operable. Each variation may occur alone or in combination with any one or more of the other variations. Each variation may occur with any process and each process may be combined with any one or more of the other processes. Each process or combination of processes (including variations) may be combined with any of the configured storage media described above and variations thereof.

[0157] More generally, those skilled in the art will recognize that not every part of this disclosure, or any specific detail therein, is required to meet legal standards such as enforceability, written description, or best mode. Furthermore, embodiments are not limited to the specific scenarios, motivational examples, operating environments, tools, peripherals, software process flows, identifiers, data structures, data selections, naming conventions, symbols, control flows, or other implementation choices described herein. Any apparent conflict with any other patent disclosure, even from the owner of the present innovation, shall not affect the interpretation of the claims set forth in this patent disclosure.

[0158] Acronyms, Abbreviations, Names, and Symbols

[0159] Some acronyms, abbreviations, names, and symbols are defined below. Others are defined elsewhere herein or are understood by those skilled in the art to be not required to be defined herein.

[0160] ALU: Arithmetic and Logic Unit

[0161] API: Application Programming Interface

[0162] BIOS: Basic Input / Output System

[0163] CD: compact disc

[0164] CPU: Central Processing Unit

[0165] DVD: Digital Versatile Disc or Digital Video Disc

[0166] FPGA: Field Programmable Gate Array

[0167] FPU: Floating Point Processing Unit

[0168] GDPR: General Data Protection Regulation

[0169] GPU: Graphics Processing Unit

[0170] GUI: Graphical User Interface

[0171] HTTPS: Hypertext Transfer Protocol Secure

[0172] IaaS or IAAS: Infrastructure as a Service

[0173] LAN: Local Area Network

[0174] OS: operating system

[0175] PaaS or PAAS: Platform as a Service

[0176] RAM: Random Access Memory

[0177] ROM: Read-Only Memory

[0178] TPU: Tensor Processing Unit

[0179] UEFI: Unified Extensible Firmware Interface

[0180] UI: User Interface

[0181] WAN: Wide Area Network

[0182] Some additional terms

[0183] Reference is made herein to exemplary embodiments such as those illustrated in the accompanying drawings, and specific language is used herein to describe the exemplary embodiments. However, changes and further modifications to the features described herein, as well as additional technical applications of the abstract principles illustrated by the specific embodiments herein, which would be apparent to persons skilled in the relevant art(s) and in possession of the present disclosure, should be considered within the scope of the claims.

[0184] The meaning of the terms is set forth in this disclosure, so the claims should be read carefully to note these elaborations. Specific examples are given, but it will be understood by those skilled in the relevant art that other examples may also fall within the meaning of the terms used and fall within the scope of one or more claims. The terms do not necessarily have the same meaning as they do in general use (particularly in non-technical use), or in the use of a specific industry, or in a specific dictionary or dictionary collection. Figure numerals may be used together with various phrases to help display the breadth of the terms. Omitting a figure numeral from a given text does not necessarily mean that the text does not discuss the contents of the drawings. This disclosure declares and exercises the right to interpret specific and selected words. The referenced terms are clearly defined, but the terms may also be implicitly defined without using quotation marks. Term may be defined explicitly or implicitly in the specific embodiments herein and / or elsewhere in the application documents.

[0185] A "computer system" (also referred to as a "computing system") may include, for example, one or more servers, motherboards, processing nodes, laptop computers, tablet computers, personal computers (portable or non-portable), personal digital assistants, smartphones, smart watches, smart bracelets, cellular or mobile phones, other mobile devices having at least one processor and memory, video game systems, augmented reality systems, holographic projection systems, televisions, wearable computing systems, and / or other devices that provide one or more processors controlled at least in part by instructions. The instructions may be in the form of firmware or other software in memory and / or dedicated circuitry.

[0186] A "multi-threaded" computer system is a computer system that supports multiple threads of execution. The term "thread" should be understood to include code that can or is subject to scheduling constraints and may be synchronized. Outside of the present disclosure, threads may also be referred to by other names, such as "tasks," "processes," or "co-routines." However, this document distinguishes between threads and processes because threads define the execution path within a process. In addition, the threads of a process share a given address space, while different processes have different corresponding address spaces. The threads of a process can run sequentially in parallel or in a combination of parallel and sequential execution (e.g., time slicing).

[0187] A "processor" is a thread processing unit, such as a core in a simultaneous multithreading implementation. A processor comprises hardware. A given chip can house one or more processors. Processors can be general-purpose or specialized for specific purposes, such as vector processing, graphics processing, signal processing, floating-point arithmetic processing, encryption, I / O processing, machine learning, and so on.

[0188] The "kernel" includes the operating system, hypervisor, virtual machine, BIOS or UEFI code, and similar hardware interface software.

[0189] "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.

[0190] "Program" is used broadly herein to include applications, kernels, drivers, interrupt handlers, firmware, state machines, libraries, and other code written by programmers (also called developers) and / or automatically generated.

[0191] A "routine" is a callable code segment that typically returns control to the instruction following the point in program execution where the routine was called. Depending on the terminology used, a distinction is sometimes made between "functions" and "procedures" elsewhere: functions typically return a value, while procedures do not. As used herein, "routine" includes both functions and procedures. Routines can have code that returns a value (e.g., sin(x)), or can simply return without providing a value (e.g., a void function).

[0192] "Service" means a consumable program in a cloud computing environment or other network or computing system environment that provides resources to multiple programs or provides access to resources to multiple programs, or both. The service implementation itself may include multiple applications or other programs.

[0193] "Cloud" means a pool of resources for computing, storage, and networking that are elastically available for metered, on-demand services. Cloud 136 can be private, public, community, or hybrid, and cloud services can be provided as Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Software as a Service (SaaS), or another service. Unless otherwise specified, any discussion of reading from or writing to a file includes reading / writing local files or reading / writing over a network (where the network can be a cloud network or other network), or both (local and networked read / write). A cloud may also be referred to as a "cloud environment" or a "cloud computing environment."

[0194] "Access" to a computing resource includes the exercise of permissions or other capabilities to read, modify, write, execute, move, delete, create, or otherwise exploit the resource. Attempted access can be clearly distinguished from actual access, but "access" without the "attempt" qualifier includes both attempted access and actual access performed or provided.

[0195] In this document, a user's activity refers to the activity of a user's device or the activity of a user's account, or the activity of software acting on behalf of a user, or the activity of hardware acting on behalf of a user. Activity is represented by digital data or machine operations, or both, in a computing system. Activities within the scope of any claim based on this disclosure do not include actions of humans per se. Accordingly, software or hardware activity "on behalf of a user" refers to software or hardware activity on behalf of a user's device or on behalf of a user's account or on behalf of another computing mechanism or computing artifact, and therefore does not include human behavior per se within the scope of any embodiment or any claim.

[0196] "Digital data" means data in a computing system, as opposed to data written on paper or thoughts in a person's head, for example. Similarly, "digital memory" refers to inanimate devices (e.g., computing storage hardware), as opposed to human or other biological memory.

[0197] As used herein, "comprising" allows for additional elements (ie, comprising means including) unless stated otherwise.

[0198] "Optimization" means improvement, not necessarily perfection. For example, an already optimized program or algorithm can be further improved.

[0199] In this document, "process" is sometimes used as a term in the field of computing science and in this technical sense encompasses computing resource users, which may also include or be referred to as, for example, co-routines, threads, tasks, interrupt handlers, application processes, kernel processes, procedures, or object methods. In practice, a "process" 124 is a program that is executed by a utility program such as task manager, ps) or other similar utility-identified computing entities in an operating environment (respectively, the marks of Microsoft Corporation and Linus Torvalds). "Process" may also be used as a term in the field of patent law, for example, in describing a process claim as opposed to a system claim or an article (configured storage medium) claim. Similarly, "method" is used herein primarily as a technical term in the field of computer science (a "routine"), but it is also a term in the field of patent law (similar to "process"). "Process" and "method" in the patent law sense are used interchangeably herein. Those skilled in the art will understand which meaning is intended in a particular instance, and will also understand 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 computer science sense).

[0200] "Automatic" means the use of automation (e.g., general-purpose computing hardware configured by software for the specific operations and technical effects discussed herein), rather than the absence of automation. Specifically, the steps performed "automatically" are not performed by hand on paper or in a person's mind, although they may be initiated by a person or guided interactively by a person. The automated steps are performed by a machine to achieve one or more technical effects that would not be achievable without the technical interaction provided thereby. It is assumed that the automatically performed steps include at least one actively performed operation.

[0201] It should be understood by those skilled in the art that a technical effect is a hypothetical purpose of a technical embodiment. For example, the fact that an embodiment involves computation, and that some computations can be performed without the technical components (e.g., by paper and pencil, or even as a mental step), does not eliminate the existence of a technical effect or change the specific and technical nature of the embodiment, particularly in a real-world implementation of the embodiment. Garbage collector thread composition adjustment operations (such as changing the number of threads 132 610, calling API 318, obtaining 304 GC work level 524, obtaining 304 allocation rate 532, performing reinforcement learning 212, and the various other operations discussed herein (whether or not illustrated in the accompanying drawings)) should be understood as having inherent digital properties. Even in a hypothetical prototype scenario, the human mind cannot directly interface with a CPU or other processor, or interface with RAM or other digital storage devices to read and write the necessary data to perform the garbage collector thread composition adjustment step 800 taught herein, let alone in a real-world large-scale computing environment of the embodiment. In light of this disclosure, those skilled in the art will well understand this.

[0202] "Computationally" also means that a computing device (at least a processor plus memory) is being used, and excludes obtaining a result solely through human thought or solely through human action. For example, performing arithmetic with paper and pencil is not computationally performing arithmetic as understood herein. The results of the computation are faster, broader, deeper, more accurate, more consistent, more comprehensive, and / or otherwise provide technical effects beyond the scope of human performance. A "computational step" is a step performed computationally. "Automatically" or "computationally" do not necessarily mean "immediately." "Automatically" or "computationally" are used interchangeably herein.

[0203] "Active" means without a direct request from the user. In fact, the user may not even be aware that an active step of an embodiment is possible until the results of that step have been presented to the user. Unless otherwise stated, any calculation and / or automatic steps described herein may also be completed actively.

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

[0205] Throughout this document, the use of the optional plural forms "s," "es," or "ies" means that there are one or more of the indicated features. For example, "processor(s)" means "one or more processors" or equivalently "at least one processor."

[0206] "At least one of" in a list of items means one of those items, or two of those items, or three of those items, etc., up to and including all N of those items, where the list contains N items. The presence of an item in a list does not require that the item be present in an embodiment (or require that the item be checked in an embodiment). For example, 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 thus a system that includes A and also includes B but does not include or check for C or D is also an embodiment. A similar understanding applies to steps or portions of steps 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" described herein.

[0207] For purposes of U.S. law and practice, the use of the word "step" in the claims or elsewhere is not intended to invoke means-plus-function, step-plus-function, or claim construction under 35 U.S.C. § 112(f). Any inference that it does so is expressly disclaimed.

[0208] For purposes of U.S. law and practice, claims are not intended to invoke means-plus-function interpretation unless they use the phrase “means for . ” Claim terms, if any, that are intended to be interpreted as means-plus-function terms will expressly state that intent through the use of the phrase “means for . ” When means-plus-function interpretation applies, whether through the use of “means for ” and / or through legal construction of the claim terms by the courts, the means recited in the specification for a given noun or a given verb should be understood to be linked to the claim terms and are linked together herein by any of the following: appearing in the same box in a block diagram of the accompanying drawings, being represented by the same or similar name, being represented by the same figure number, having a functional relationship depicted in any drawing, or having a functional relationship indicated in the text of the disclosure. For example, if a claim limitation recites a "zac widget" and that claim limitation is subject to a means-plus-function interpretation, then at least all structure identified anywhere in any frame, paragraph, or example that mentions "zac widget" in the specification, or all structure bound together by any figure labels assigned to the zac widget, or all structure disclosed as having a functional relationship to the structure or operation of the zac widget, will be considered part of the structure of the zac widget identified in this application and will help define the set of equivalents of the zac widget structure.

[0209] Those skilled in the art will recognize that the present disclosure discusses various data values ​​and data structures, and recognizes that these items reside in memory (RAM, disk, etc.), thereby configuring the memory. Those skilled in the art will also recognize that the present disclosure discusses various algorithmic steps 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 that executes the code, thereby converting it from a general-purpose processor to a special-purpose processor that is functionally specialized for hardware.

[0210] Therefore, one skilled in the art would not mistakenly regard (a) the memory stated in the claims and (b) the data structures or data values ​​or code stated in the claims as non-overlapping items. The data structures and data values ​​and the code are understood to reside in the memory even when the claims do not explicitly state the residency of each data structure or data value or code fragment mentioned. Accordingly, an explicit statement of such residency is not required. However, they are not prohibited, and one or two optional statements may be presented for emphasis, but do not thereby exclude all other data values ​​and data structures and code from residing in the memory. Similarly, the code function stated in the claims is understood to configure the processor, regardless of whether the configuration quality is explicitly stated in the claims.

[0211] Throughout this document, unless explicitly stated otherwise, any reference to a step in a process assumes that the step can be performed directly by the stakeholder and / or indirectly by that party through an intermediary mechanism and / or intermediary entity and still be within the scope of that step. That is, there is no requirement that the stakeholder perform the step directly unless direct performance is an explicitly stated requirement. For example, a computational step on behalf of a stakeholder (such as accessing, adjusting, allocating, evaluating, dispatching, invoking, changing, collecting, compressing, controlling, reducing, determining, implementing, increasing, learning, making, marking, measuring, satisfying, obtaining, pausing, executing, specifying, sweeping, traversing, triggering, weighting, working (and other forms of access, adjustment, etc.) with respect to a destination or other object) may involve intermediary actions (such as the aforementioned actions or such as forwarding, copying, uploading, downloading, encoding, decoding, compressing, decompressing, encrypting, decrypting, authenticating, invoking, etc., including any actions described in this document) but is still understood to be performed directly by or on behalf of the stakeholder. The example verbs listed here may overlap in meaning or even be synonyms; the verb names alone do not indicate separate functions in every case.

[0212] Whenever reference is made to data or instructions, it should be understood that these items configure computer-readable memory and / or computer-readable storage media, thereby converting them into specific items, rather than simply existing on paper, in a person's mind, or, for example, as a signal propagating only on a wire. For purposes of U.S. patent protection, memory or other storage devices or other computer-readable storage media are not propagating signals or carrier waves or pure energy, which are outside the scope of patentable subject matter under the U.S. Patent and Trademark Office (USPTO) interpretation of the In re Nuijten case. In the United States, no claim covers the signal itself or pure energy, and any claim interpretation that asserts otherwise is clearly unreasonable in light of this disclosure. Unless otherwise expressly stated in a claim granted outside the United States, the claim does not cover the signal itself or pure energy.

[0213] Furthermore, despite any apparent contention elsewhere herein, a distinction should be made between (a) computer-readable storage media and computer-readable memory, on the one hand, and (b) transmission media, also known as signal media, on the other. Transmission media are propagating signals or carrier wave computer-readable media. In contrast, computer-readable storage media and computer-readable memory, as well as computer-readable storage devices, are not propagating signals or carrier wave computer-readable media. Unless expressly stated otherwise in the claims, "computer-readable medium" means computer-readable storage media, not propagating signals per se and not pure energy.

[0214] The "embodiments" herein are examples. The terms "embodiments" and "invention" are not interchangeable. The embodiments may freely share or borrow aspects to create other embodiments (so long as the result is operable), even if the resulting combination of aspects is not itself explicitly described herein. Requiring explicit and individual description of each and all permitted combinations would be unnecessary for one skilled in the art and contrary to the strategy of patent specifications being written for one skilled in the art. Formal combinatorial calculations and informal intuition about the number of possible combinations arising from even a small number of combinable features would indicate that there are a large number of combinations for the aspects described herein. Accordingly, requiring explicit representation of each and all combinations would be contrary to the strategy of patent specifications being concise and requiring the reader to possess knowledge of the relevant technical field.

[0215] Reference Signs List

[0216] The following list is provided for convenience and support of the drawings and is part of the specification text, which describes the innovation by reference to multiple items. Items not listed here may still be part of a given embodiment. For better readability of the text, reference numerals appear near some statements in the text that mention an item, but not near all statements that mention the item. Different examples or different instances of a given item may be referred to using the same reference numeral. The list of reference numerals is:

[0217] 100 operating environment, also known as a computing environment; includes one or more systems 102

[0218] 101 A machine in system 102, for example, 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; it may be a physical machine or a virtual machine implemented on physical hardware.

[0219] 102 Computer systems, also called "computing systems" or "computing systems," and when in a network, may be called "nodes"

[0220] 104 users, for example, users of the enhanced system 202

[0221] 106 peripheral devices

[0222] 108 Network, typically including, for example, LAN, WAN, software-defined network, cloud, and other wired or wireless networks

[0223] 110 Processor or collection of processors; including hardware

[0224] 112 Computer readable storage medium, such as RAM, hard disk

[0225] 114 Removable computer readable storage medium

[0226] 116 Processor-executable instructions; may be located on a removable storage medium or in other memory (volatile or non-volatile or both)

[0227] 118 Digital data in system 102; data structures, values, source code, and other examples discussed herein

[0228] 120 (multiple) cores, e.g., operating system(s), BIOS, UEFI, device drivers; also refers to execution engines such as language runtimes

[0229] 122 Software tools, software applications; computing

[0230] 124 Process, in the computing science sense; if not otherwise specified, assumed to be a memory management (i.e., garbage collection) process

[0231] 126 Display screen, also known as "display"

[0232] 128 Computing hardware not associated with reference numerals 106, 108, 110, 112, 114

[0233] 132 threads, in the computing science sense; if not otherwise specified, assumed to be GC threads

[0234] 134 Garbage Collection Thread Composition (as represented in a computing system)

[0235] 136 Cloud, also known as cloud environment or cloud computing environment

[0236] 202 Enhanced computing system, ie, system 102 enhanced by garbage collector thread composition adjustment functionality as taught herein

[0237] 204 Garbage collector thread composition adjustment functionality (also referred to as "garbage collection thread composition adjustment"), e.g., software or dedicated hardware that performs or is configured to perform steps 304 and 206, or step 802 in the garbage collection RL loop 900, or any software or hardware that performs or is configured to perform the novel method 800 first disclosed herein or the computational garbage collection thread composition adjustment activity.

[0238] 206 Garbage collection thread composition adjustment; computational activity in the computing system or its results; adjustment 206 is computationally made, for example, by creating, starting, pausing, stopping, or terminating a GC thread 132, or by changing a computational characteristic of the GC thread (such as its priority), changing its available computational resources (such as cores 528 or memory for use by the GC thread itself), changing the portion of the heap 112 it allocates that it manages as part of the GC 210, changing the trigger value 416 at which it performs garbage collection, or by a combination of such operations.

[0239] 210 Garbage Collector (GC) in Computing Systems; Garbage Collection (GC) Computing Activities

[0240] 212 Reinforcement learning in computational systems; with respect to garbage collection, unless otherwise noted; computational activity or its results

[0241] 214 Reinforcement learning mechanism in computing system, for example, implementation of RL loop including garbage collector 210

[0242] 302 garbage collection threads constitute the controller; computing type

[0243] 304 obtains adjustment input 306 by computation; also referred to as determining, specifying, obtaining, giving, or indicating input 306 .

[0244] 306 Garbage collection thread composition tuning inputs, also known as factors; numeric data; including measured values, ideal values ​​(ie, targets), thresholds or constraints, or a mixture thereof

[0245] 310 Computationally optimizing garbage collection activities or the results of such activities

[0246] 312 Optimization goal or metric (as represented in a computing system)

[0247] 314 Metrics; the activity of computationally measuring the performance state or characteristic of a computing system, or the numerical results of such activity

[0248] 318 API or other computing interface 322 to component controller 302, such as shared memory, message exchange system

[0249] 320 Routines in interface 318 in computing system

[0250] 322Interfaces, usually in computing systems; computing, digital

[0251] 324GC thread count, for example, any of counts 602 to 610; digital data and therefore located in a computing system, not in the mind or on paper

[0252] 402 Minimum or Maximum Adjustment 206 Quantity; Digital

[0253] 404 Caller of routine 320; digital; e.g., tool 122, runtime 120, or RL mechanism 214

[0254] 406 digital threshold

[0255] 408 Minimum or maximum adjustment 206 time interval, also known as wait; digital

[0256] 410 Relative weight of target 312 or other adjustment input 306; digital

[0257] 412 Example of method 800, e.g., obtaining step 304 and adjusting step 206

[0258] 414 execution time, e.g., duration of existence of process 124, or during the lifetime of process 124; digital

[0259] 416 A trigger value for performing garbage collection, e.g., the amount of managed heap allocated or the amount of managed heap used for allocation; numerical; also known as a threshold or amount

[0260] 418 Heuristics, e.g., lookup tables or formulas based on metrics to determine acceptable thread counts or optimal thread counts

[0261] 502 Process throughput, e.g., count, size, or other amount of data generated or processed by a process; digital

[0262] 504 Garbage Collection Pause Time, e.g., the amount of time a non-GC process or portion thereof is paused to permit garbage collection; numerical

[0263] 506 managed memory size, e.g., the size of a heap managed by garbage collection; digital

[0264] 508 Allocate computing activities or their results during memory management in a computing system

[0265] 510 Allocate thread; execute, enable, or otherwise facilitate the thread 132 allocated 508

[0266] 512 Mark GC computation activity or its results during memory management in a computing system

[0267] 514 Mark thread; execute, enable, or otherwise facilitate the thread 132 marked 512

[0268] 516 Compacting GC computation activity or its results during memory management in a computing system

[0269] 518 compression thread; execute, enable, or otherwise facilitate compression 516 thread 132

[0270] 520 Sweep GC computation activity or its results during memory management in a computing system

[0271] 522 Cleaning thread; executes, enables, or otherwise facilitates the cleaning of thread 132 520

[0272] 524GC working grade, also known as quantity; digital

[0273] 526 Numerical execution results of routine 320

[0274] 528 processor cores; computing hardware

[0275] 530(Multiple) Core 528 Digital Count

[0276] 532Memory allocation rate; digital

[0277] 534 Numerical results of reinforcement learning 212, e.g. Figure 9 Rt+1, St+1

[0278] 536 Allocation 508 duration, that is, how long the system or GC takes to perform allocation 508; digital

[0279] 602 GC allocation thread digital count; whether to count suspended threads depends on the embodiment

[0280] 604 Digital count of GC compaction threads; whether to count paused threads depends on the implementation

[0281] 606 GC digital count of marked threads; whether to count suspended threads depends on the embodiment

[0282] 608 Digital count of GC sweep threads; whether to count suspended threads depends on the implementation

[0283] 610 Numeric count of any type of GC threads; whether to count paused threads depends on the implementation

[0284] 612 allocation threads support digital counts or other magnitude representations

[0285] 614 Allocate thread supported types

[0286] 616 Allocate thread support, for example, @

[0287] 700 flow chart; 700 also refers to the garbage collection thread composition adjustment method, which consists of Figure 7 As shown in the flowchart or with Figure 7Process Figure 1 To

[0288] 800 flow chart; 800 also refers to the garbage collection thread composition adjustment method, which consists of Figure 8 As shown in the flowchart or with Figure 8 Process Figure 1 To, Figure 8 The flowchart contains Figure 7 Flowcharts and other steps taught herein

[0289] 802 Computationally Implementing Reinforcement Learning 212

[0290] 804 specifies a numerical value by computation, for example, via an API or by assigning the value to a variable in memory 112

[0291] 806 computationally determines adjustments, for example, based on RL 212, heuristics 418, metrics 314, or routine call results 526

[0292] 808 Accessing an interface computationally, for example, by calling a routine in the interface or assigning a numeric value to a variable in the interface

[0293] 810 computationally changes (increases or decreases) the GC thread count 324, for example, by creating or terminating one or more threads 132

[0294] 812 computationally determines whether the thread count 324 meets or exceeds the threshold 406; those skilled in the art recognize that in most cases, meeting a threshold is functionally equivalent to exceeding a slightly different threshold (in a higher or lower sense), e.g., for an integer x, x>3 is equivalent to x>=4

[0295] 814 Assign weight 410 to target 312 by calculation, for example, based on interface call result 526 or default weighting

[0296] 816 satisfies the adjustment dynamic characteristic 818 by calculation, i.e., has or exhibits the characteristic 818

[0297] 818 Adjustment dynamic characteristics, as represented in the computing system, such as adjustment amount or adjustment frequency

[0298] 820 Computing Resource Usage Constraints; Digital

[0299] 822 computationally evaluates the adjustment by comparing the result of the adjustment to the target 312 .

[0300] 824 any step or item discussed in this disclosure that is not assigned some other reference numeral; 824 may therefore be explicitly shown as a reference numeral for various steps or items, or both, and may be added as a reference numeral for various steps or items, or both, in the present disclosure or in any subsequent patent application claiming priority from the present disclosure, without thereby adding new matter

[0301] 900 Reinforcement learning loops, as represented and implemented in a computing system; assumed to include data flow to and from a garbage collector

[0302] in conclusion

[0303] In some embodiments, the computing system garbage collection thread composition 134 includes data representing the number 324 of garbage collector threads 132, the type of garbage collector thread (e.g., allocation 508, marking 512, sweeping 520, compaction 516), and various garbage collector thread characteristics, such as available cores 528, collection trigger value 416, threshold 406, and optimization goal 312 for a user process 124 or the garbage collector 210. The thread composition controller 302 adjusts 206 the thread composition 134 during execution of a managed memory process 124, such as a user application 122 process 124. Thread composition adjustments 206 depend 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 effort 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 of the proactive adjustments 206. Some of the optimization goals 312 are weighted 410 relative to each other.

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

[0305] Although Microsoft technology is used in some of the motivational examples, the teachings herein are not limited to use in technologies provided or managed by Microsoft. For example, under appropriate licenses, the present invention can be embodied in software or services provided by other cloud service providers.

[0306] Although specific embodiments are clearly illustrated and described herein as processes, configured storage media, or systems, it should be understood that discussions of one type of embodiment generally extend to other types of embodiments as well. For example, descriptions of processes in conjunction with the accompanying drawings also help describe configured storage media and help describe the technical effects and operations of systems and articles of manufacture as discussed in conjunction with other drawings. It does not follow that any limitations of one embodiment necessarily apply to another embodiment. In particular, processes are not necessarily limited to the data structures and arrangements presented when discussing systems or articles of manufacture (such as configured memories).

[0307] Those skilled in the art will appreciate that implementation details may involve specific code, such as specific thresholds, comparisons, specific types of platforms or programming languages ​​or architectures, specific scripts or other tasks, and specific computing environments, and therefore need not appear in every embodiment. Those skilled in the art will also appreciate that program identifiers and some other terms used in discussing the details are implementation-specific and therefore need not apply to every embodiment. Nevertheless, while this article does not necessarily require the presentation of these details, they may help some readers by providing context and / or may illustrate some of the multiple possible implementations of the technology discussed herein.

[0308] Note that the items provided herein, including technical processes, technical effects, technical mechanisms, and technical details, are illustrative but do not cover all claimed or claimable embodiments, and those skilled in the art will understand that the present disclosure and the embodiments described herein do not relate to subject matter outside the technical field, nor do they relate to the following: such as the main or original cause or motivation itself, or the result itself, or the thought process or thought steps, or business methods or general economic practices, or methods of organizing human activities, or natural laws themselves, or naturally occurring things or processes, or organisms or parts of organisms, or mathematical formulas themselves, or separate software itself, or just conventional computers, or any completely imperceptible or any abstract concept itself, or insignificant post-solution activities, or any method implemented entirely on an unspecified instrument, or any method that cannot produce useful and specific results, or any other subject matter that does not meet the conditions for patent protection under the jurisdiction where such protection is sought, licensed, or enforced.

[0309] References herein to embodiments having some feature X and references elsewhere herein to embodiments having some feature Y do not exclude embodiments from the present disclosure having both feature X and feature Y, unless such exclusion is expressly stated herein. All possible negative claim limitations are within the scope of the present disclosure, in the sense that any feature stated as part of an embodiment may also be expressly excluded from another embodiment, even if no specific exclusion is given in any example herein. The term "embodiment" is used herein merely as a more convenient form of applying the "process, system, article, configured computer-readable storage medium, and / or other examples" taught herein in a manner applicable to the law. Accordingly, a given "embodiment" may include any combination of the features disclosed herein, so long as the embodiment is consistent with at least one claim.

[0310] Not every item shown in the accompanying drawings needs to appear in every embodiment. On the contrary, an embodiment may include (multiple) items that are not explicitly shown in the accompanying drawings. Although some possibilities are shown in this article and the accompanying drawings by specific examples, an embodiment may be separated from these examples. For example, the specific technical effects or technical features of the examples can be omitted, renamed, grouped differently, repeated, instantiated, or a mixture of the effects or features that appear in two or more examples in the examples in hardware and / or software. In some embodiments, the function shown in one location can also be provided at a different location; those skilled in the art recognize that functional modules can be defined in various ways in a given implementation, and the desired technical effects may not be omitted from the set of overall interactive modules. Due to space limitations or for convenience, different steps can be shown together in a single box in the figure, but can still be performed separately, for example, in a given method execution, one step can be performed without performing another step.

[0311] Throughout the text, reference is made to the accompanying drawings by reference numerals. Any apparent inconsistency in the descriptions associated with a given reference numeral in the drawings or text should be understood as merely broadening the scope of the reference numeral. Different instances of a given reference numeral may refer to different embodiments, even when the same reference numeral is used. Similarly, given reference numerals are used to refer to verbs, nouns, and / or corresponding instances of each item, for example, processor 110 may process 110 instructions by executing the instructions.

[0312] As used herein, terms such as "a," "an," and "the" include one or more of the indicated items or steps. Specifically, in the claims, reference to an item generally implies the presence of at least one such item, and reference to a step implies at least one instance of performing the step. Similarly, when the context permits, "is" and other singular verb forms should be understood to encompass the possibility of "are" and other plural forms to avoid grammatical errors or misunderstandings.

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

[0314] All filed claims and the abstract are part of the specification. The abstract is provided for convenience and to comply with patent office requirements; it is not a substitute for the claims and does not affect the interpretation of the claims in the event of an apparent conflict with other parts of the specification. Similarly, the summary is provided for convenience and is not determinative in the event of any conflict with the claims or other parts of the specification. The claims should be interpreted in conjunction with the description as understood by one skilled in the art; an innovator is not required to detail every nuance within the claims themselves as if no other disclosure were provided herein.

[0315] To the extent that any term used herein implies or otherwise refers to an industry standard, and to the extent applicable law requires identification of a specific version of such a standard, this disclosure should be understood to refer to the most recent version of that standard (the final version taking precedence, if later), which was published in draft form as of at least the earliest priority date of this disclosure under applicable patent law.

[0316] Although exemplary embodiments are shown in the drawings and described above, it will be apparent to one of ordinary skill in the art that multiple modifications may be made without departing from the principles and concepts set forth in the claims, and that such modifications need not encompass the entire abstract concept. Although the subject matter is described in language specific to structural features and / or process actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific technical features or actions described in the claims. Every means or aspect or technical effect identified in a given definition or example does not necessarily need to be present or utilized in every embodiment. Instead, the specific features and actions and effects described are disclosed for purposes of example as examples to be considered in implementing the claims.

[0317] To the maximum extent permitted by law, all changes that do not encompass the entire abstract concept but come within the meaning and range of equivalency of the claims are intended to be embraced within the scope of the claims.

Claims

1. A computing system (202) configured to adjust (206) a thread composition (134) of a garbage collector (210) during execution of a process (124) using managed memory (112), the managed memory being at least partially managed by the garbage collector, the computing system comprising: digital storage (112), said digital storage (112) comprising said managed memory (112); a processor assembly (110) comprising at least one processor (110) 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, when executed by the set of processors, adjust (206) the thread composition during the execution of the process by making an adjustment (206) to change the thread composition from a previous 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): process throughput (502), garbage collector pause time (504), managed memory size (506), allocation thread count (602), allocation thread support count (612), garbage collector thread count (610), memory allocation rate (532), garbage collector thread work level (524), composition controller interface routine results (526), ​​processor core count (530), or reinforcement learning results (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) configured to perform reinforcement learning (212), the reinforcement learning (212) producing 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 one of claims 1 to 3, further comprising a component controller interface (318), the component controller interface (318) comprising at least one of the following: a routine (320) configured to, when executed by the set of processors, specify (804) an optimization goal (312) to the component controller during execution of the process; a routine (320) configured to specify (804) a processor core count (530) constraint (820) to the component controller during execution of the process when executed by the set of processors; a routine (320) configured to, when executed by the set of processors, specify (804) a minimum permitted number (402) for any adjustment in a plurality of garbage collector threads during execution of the process; a routine (320) configured to, when executed by the set of processors, specify (804) a maximum permitted number (402) for any adjustment in a plurality of garbage collector threads during execution of the process; a routine (320) configured to, when executed by the set of processors, specify (804) a minimum permissible wait (408) between any adjustments in a plurality of garbage collector threads during execution of the process; or A routine (320) configured to, when executed by the set of processors, specify (804) a maximum permissible wait (408) between any adjustments in a plurality of garbage collector threads during execution of the process.

5. A method (800) performed by a computing system (202) having managed memory to adjust (206) thread composition (134) of a garbage collector (210) during execution of a process (124) using the managed memory, the managed memory being at least partially managed by the garbage collector, the method comprising: obtaining (304) at least one of the following tuning inputs (306): process throughput (502), garbage collector pause time (504), managed memory size (506), allocation thread count (602), allocation thread support count (612), garbage collector thread count (610), memory allocation rate (532), garbage collector thread work level (524), composition controller interface routine results (526), ​​processor core count (530), or reinforcement learning results (534); as well as During the execution of the process, an adjustment (206) is made to change the thread composition (134) from a previous 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 according to claim 5, wherein: The obtaining (304) includes obtaining (304) the process throughput (502) adjustment input as an optimization target (312); and The adjusting includes increasing (810) the allocation thread support count (612).

7. The method according to claim 5 or claim 6, wherein: The obtaining (304) includes obtaining (304) the garbage collector pause time (504) as an optimization target (312); The obtaining (304) includes obtaining (304) the garbage collector thread count (610) and the garbage collector thread work level (524); The method also includes determining (812) that the garbage collector thread count is above a threshold value (406) associated with the garbage collector thread work level; and The adjusting includes decreasing (810) the garbage collector thread count.

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

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

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

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

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

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

14. The method according to any one of claims 5 to 13, wherein the method is repeated in a plurality of instances (412) of the method, and the instances are characterized by satisfying (816) at least one of the following dynamic characteristics (818): During said execution of said process, said instances collectively make (308) at least three thread composition adjustments (206); During the execution of the process (124), the instances collectively make (308) an average of at least one thread composition adjustment (206) per minute, and the execution continues for at least two minutes.

15. The method of any one of claims 5 to 14, wherein the method further comprises accessing (808) the garbage collector thread composition controller interface (318) by at least one of: 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) having data (118) and instructions (116) configured thereon, which, when executed by a processor (110), cause a computing system (202) to perform a method (800) for adjusting (206) a thread composition (134) of a garbage collector (210) during execution of a process (124) using managed memory (112), the method comprising: obtaining (304) at least one of the following tuning inputs (306): process throughput (502), garbage collector pause time (504), managed memory size (506), allocation thread count (602), allocation thread support count (612), garbage collector thread count (610), memory allocation rate (532), garbage collector thread work level (524), composition controller interface (318) routine results (526), ​​processor core count (530), or reinforcement learning results (534); as well as During the execution of the process, an adjustment is made (308) to change the thread composition (134) from a previous thread composition to an adjusted thread composition (206), 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 adjusting (206) is based at least in part on the obtained at least two adjustment inputs.

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

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

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