Dynamically adjusting memory pools using time series data
By dynamically adjusting the allocation of the memory pool using a machine learning model, the problem of the memory pool size being unable to adapt to the execution of different applications is solved, memory utilization efficiency is improved, resource waste is reduced, and program development is simplified.
Patent Information
- Application Number
- CN202480045557.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-21
- Filing Date
- 2024-06-24
- Publication Date
- 2026-01-30
AI Technical Summary
In existing technologies, the fixed configuration of memory pool size cannot adapt to the execution of different applications every time, resulting in performance problems and resource waste, requiring manual adjustment, which is inefficient.
Machine learning models are used to predict the number and size of allocation requests for the memory pool. The size of the memory pool is dynamically adjusted by the hardware processor. Combined with rule and clustering methods, memory usage is optimized and waste is reduced.
It improves memory utilization efficiency, reduces waste, lowers program execution costs, and simplifies the program development process.
Smart Images

Figure CN121444079A_ABST
Abstract
Description
Background Technology
[0001] This disclosure relates to memory systems and dynamic memory management, and more specifically to systems and methods for real-time dynamic memory allocation, particularly dynamic memory allocation of memory pools with fixed and variable-sized blocks, and systems and methods for dynamically adjusting memory pools.
[0002] Over the past few years, many users have encountered performance issues caused by providing inappropriate memory pool sizes. A significant challenge for users is the considerable effort required to manually adjust the memory pool size for their applications. Even if the application programmer / system programmer supplies a fixed memory pool unit size, it cannot adapt to every execution of the same application.
[0003] Memory pool tuning refers to the process of optimizing the allocation and management of a memory pool, which is a storage area reserved for a specific purpose. The goal of memory pool tuning is to improve program performance and efficiency by minimizing the amount of time spent allocating and releasing memory.
[0004] In the context of the z / OS operating system, a heap pool refers to a dynamic storage area used for dynamically allocating and dealing memory during program execution. A heap pool is a pool of memory that is a specific area of main memory reserved for a particular purpose. Heap memory areas are where memory is allocated or deallocated without any order, for example, in response to the creation of objects using, for example, the "new" operator (in the C++ programming language) or something similar.
[0005] The heap memory pool is created when the program is loaded into memory and is used to dynamically allocate memory as needed during program execution. The size of the heap pool can be configured based on the program's requirements. Summary of the Invention
[0006] A system and method for dynamically optimizing the size of memory allocations in a memory pool to ensure proper use of memory pool storage areas and for monitoring memory pool storage area usage to ensure efficient use.
[0007] Systems and methods for automatically and dynamically provisioning and managing memory pool cell sizes, which lead to improved application performance by increasing the efficiency of memory usage and reducing wasteful allocation of memory, reduce program costs by dynamically adjusting the memory pool size allocated to applications, and reduce manual work for adjusting memory pools for large-scale applications.
[0008] Systems and methods for automatically and dynamically providing memory pool cell sizes that adapt to the execution of various programs (even for the same application) across a variety of applications.
[0009] In one aspect, a system is provided for allocating memory in a memory storage area of a computer system. The system includes: a hardware processor associated with memory storing program instructions in the computer system, the hardware processor executing the program instructions, the program instructions configuring the processor to: detect one or more applications running on the computer system, the computer system memory including a memory pool storage area dedicated to the applications; and for each detected application: running a first machine learning model trained to predict, using time-series data obtained from past memory of the detected application, the number of allocation requests for memory units in the memory pool storage area for the detected application; running a second machine learning model trained to predict, using the obtained time-series data obtained from past memory of the detected application, the size of memory units to be allocated in the memory pool storage area for each detected application; and for each detected application running on the computer system, dynamically allocating a corresponding reserved memory pool storage area of a certain size based on the predicted number of allocations and the predicted size of the memory units.
[0010] In another aspect, a method for allocating memory in a memory storage region of a computer system is provided. The method includes: detecting one or more applications running on the computer system at a hardware processor associated with memory in the computer system, the computer system memory including a memory pool storage region dedicated to the applications; and for each detected application: running a first machine learning model at the hardware processor, the first machine learning model being trained to predict the number of allocation requests for memory cells in the memory pool storage region for the detected application using obtained time-series data from past memory of the detected application; running a second machine learning model at the hardware processor, the second machine learning model being trained to predict the size of memory cells to be allocated in the memory pool storage region for each detected application using the obtained time-series data from past memory of the detected application; and dynamically allocating a corresponding reserved memory pool storage region of a certain size by the hardware processor for each detected application running on the computer system, based on the predicted number of allocations for the detected application and the predicted size of the memory cells.
[0011] A computer-readable storage medium may also be provided, which stores a program of instructions that can be executed by a machine to perform one or more methods described herein.
[0012] Further features, structures, and operations of various embodiments are described in detail below with reference to the accompanying drawings. In the drawings, the same reference numerals denote the same or functionally similar elements. Attached Figure Description
[0013] Figure 1 A general block diagram is described for a simple computer memory pool storage area for an application, wherein the system and method of the present invention are invoked to dynamically allocate the size of the memory pool storage area;
[0014] Figure 2 The embodiments are conceptually described, such as Figure 1 The system shown is for dynamically adjusting the memory pool;
[0015] Figure 3 The system implementation of using a simulator to create a training dataset in the embodiments is described in more detail. The training dataset includes generated adjustment parameter values “P” labeled to label real-time and / or historical data vectors for training a regression model.
[0016] Figure 4 It shows Figure 3 Another implementation of the system describes a computer-based approach that includes the operation of both a time series forecasting model and a rule-based method to predict the overall size of the memory pool cells.
[0017] Figure 5 A method for processing received historical data according to an embodiment is described, particularly a method for compressing historical time-series data to obtain profile features of an application instance;
[0018] Figure 6A A computer-based system is shown, which includes the execution of a time series forecasting model and a rule-based method to predict the memory pool cell size of a currently running application;
[0019] Figure 6B Described Figure 6A An alternative embodiment of the computer-based system further includes the operation of a further memory cell size clustering technique;
[0020] Figure 7 Described in Figure 1 A method for dynamically adjusting a memory pool using time-series data, implemented in a computer system;
[0021] Figure 8 Described in Figure 1 A method for training a regression model implemented on a computer system, which is used to generate or predict adjustment parameters used in refining memory pool size allocation using time series data;
[0022] Figure 9 Depicting in Figure 1 A method 800 for generating ground truth labels used in training a regression model, implemented on a simulator running on a computer system; and
[0023] Figure 10 An example computing environment comprising an environment for performing at least some of the computer code involved in performing the methods of the present invention, according to embodiments thereof, is described. Detailed Implementation
[0024] The following description is for illustrative purposes only and is not intended to limit the inventive concepts claimed herein. In the following detailed description, numerous details are set forth to provide an understanding of computer systems, computer architectures, processors, processor architectures, processor instruction execution pipelines, execution units and methods of operation thereof, memory, heap memory and stack memory systems, memory pools, etc. However, those skilled in the art will understand that various and numerous embodiments and methods of operation of computer systems, computer architectures, processor architectures, processor instruction execution pipelines, execution units, memory, heap memory and stack memory systems, memory pools, etc., can be practiced without those specific details, and the claims and invention should not be limited to the systems, assemblies, subassemblies, embodiments, functional units, features, circuits, processes, methods, aspects, and / or details specifically described and shown herein. Furthermore, specific features described herein may be used in various possible combinations and permutations with other described features.
[0025] Unless otherwise expressly defined herein, all terms shall be given their broadest possible interpretation, including the meaning implied in the specification and the meaning as understood by those skilled in the art and / or as defined in dictionaries, papers, etc. It must also be noted that, as used in the specification and appended claims, unless otherwise stated, the singular forms “a,” “an,” and “the” include plural referents, and the terms “comprising” and / or “including” specify the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more features, integrals, steps, operations, elements, components, and / or groups thereof.
[0026] The following discussion omits or only briefly describes the conventional features of information processing systems, including processors and microprocessor systems, processor architectures, memories and memory management system architectures, which will be apparent to those skilled in the art. It is assumed that those skilled in the art are familiar with the general architecture of processors, and especially with processors having execution pipelines utilizing various memory units, such as stacks, heaps, caches, and other memory systems. It will be noted that numbered elements are numbered according to the accompanying drawings in which they are introduced, and are generally, but not always, referred to by that number in subsequent drawings.
[0027] According to one aspect of the invention, a system for allocating memory in a memory storage region of a computer system is provided. The system includes a hardware processor associated with memory for stored program instructions in the computer system, the hardware processor executing a program of instructions to configure the processor to: detect one or more applications running on the computer system, the computer system memory including a memory pool storage region dedicated to the applications. For each detected application: the hardware processor runs a first machine learning model trained to predict the number of memory unit allocation requests in the memory pool storage region for the detected application using time-series data obtained from past memory usage of the detected application, and runs a second machine learning model trained to predict the size of memory units to be allocated in the memory pool storage region for each detected application using time-series data obtained from past memory usage of the detected application. The hardware process then dynamically allocates a corresponding reserved memory pool storage region of a certain size for each detected application running on the computer system based on the predicted number of allocations and the predicted size of the memory units. By dynamically allocating the size of the memory pool storage area assigned to the application and managing the size of the memory pool cells, memory usage efficiency is improved, and the number of wasted memory pool memory cells allocated is reduced, thereby lowering the cost of program execution. Dynamically allocating the size of the memory pool storage area can further simplify program development and improve application performance by reducing the overhead of manual memory management, as allocating too much memory to the application in the memory pool can lead to waste, while allocating too little memory can cause performance problems.
[0028] According to an embodiment of the system, the first machine learning model is a time-series prediction model trained using historical data associated with memory pool storage areas from detected application instances that have previously run on the computer system. This historical data includes time-series data comprising multiple allocations and deallocations of memory in the memory pool storage areas for each detected application that has run in the past. Training the model using time-series data including multiple allocations and deallocations of memory in the memory pool storage areas for each detected application that has run in the past results in a waste of memory pool memory and application processing resources during application execution.
[0029] In a further embodiment of the system, the second machine learning model is a time-series prediction model trained with historical data associated with memory pool storage areas from previously detected application instances. This historical data includes time-series data comprising the size of memory units allocated in the memory pool storage area for each previously run detected application. Training the model using time-series data including the size of memory units allocated in the memory pool storage area for each previously run detected application results in a waste of memory pool memory and application processing resources during application execution.
[0030] According to an embodiment of the system, prior to the dynamic allocation, the hardware processor is further configured to apply rules or policies to determine whether to continue dynamically allocating the corresponding reserved memory size in the memory pool storage region based on the predicted number of allocations and the predicted size of memory cells for the detected application. If the memory allocation is deemed unapproved based on the predicted number of allocations and the predicted size of memory cells for the detected application, the rule or policy application ensures efficient use of the memory pool size allocation by avoiding memory allocation in a first instance. This further leads to a reduction in wasted memory pool memory and application processing resources during application execution.
[0031] According to an embodiment of the system, the hardware processor is further configured to apply rules or policies to determine, based on the predicted number of allocations and the predicted size of memory cells, whether to increase or decrease the amount of memory allocated in the memory pool storage area for the detected application. The application of rules or policies ensures efficient use of the memory pool size allocated for the detected application based on the predicted number of allocations and the predicted size of memory cells, resulting in reduced waste of memory pool memory and application processing resources during application execution.
[0032] According to an embodiment of the system, in order to dynamically allocate memory pool storage areas for use by the detected application, the hardware processor is further configured to apply a clustering method to the time-series data obtained from the application's past memory usage to predict the distribution of memory pool storage area size values associated with the detected application. The applied clustering method rules or strategies ensure efficient use of the memory pool size allocated based on the predicted number of allocations and the predicted size of memory cells for the detected application, resulting in reduced waste of memory pool memory and application processing resources during application execution.
[0033] According to an embodiment of the system, the hardware processor is further configured to run a third machine learning model trained to generate adjustment parameters for refining the size of a corresponding reserved memory pool storage region dynamically allocated for the detected application, based on one or more current application profile features associated with the detected application and a predicted cell size for the application; and to dynamically modify the size of the memory pool storage region allocated to the detected application in response to the generated adjustment parameters. The third machine learning model, trained to generate adjustment parameters for refining the size of a corresponding reserved memory pool storage region dynamically allocated for the detected application, and to dynamically modify the size of the memory pool storage region allocated to the detected application in response to the generated adjustment parameters, further leads to a waste of memory pool memory and application processing resources during application execution.
[0034] Figure 1A general block diagram of a simple computer system 10 is depicted, the computer system having a control processor or control processing unit (CPU) 11 for running user applications and including a communication data and address bus 14 for communicating with a top-level memory system 12, the top-level memory system including a memory "heap" or memory pool storage region 15, which is a region of reserved address space dedicated to the running application. In embodiments herein, systems and methods are invoked to dynamically allocate the size of the memory pool storage device region 15 for the requesting application during application runtime. In a computer system implementation, the top-level memory system 12 may include registers, cache memory, main memory (e.g., random access memory or RAM or dynamic random access memory or DRAM), electronic disks or optical disks, and other storage device memory (not shown). Figure 1 One type of memory shown is a "heap" memory 15 (hereinafter referred to as a "memory pool" or "memory pool storage area"), which is a region of memory that is reserved address space memory that can be used by applications running on computer system 10, for example, permitted in the event of a memory allocation request from an operating system (not shown) running on the computer system. This memory pool 15 consists of multiple fixed-size memory cells or blocks 20 that are designed to cooperate and respond to the memory manager and other executable application function calls to libraries that use allocation mechanisms, such as "malloc" and "free" in C, or the operators "new" and "delete" in C++. Within this storage area 15, computer system 10 can create one or more memory "pools" or "heaps" 15 that can be reused and accessed by the corresponding requesting application instances to reduce the time it takes for programs to allocate / use / deallocate memory.
[0035] In one aspect, memory pools can belong to pool classes that specify strategies for how they manage memory. Some memory pools are manually managed by heap management functions (e.g., by explicitly returning memory to the memory pool), while others are managed automatically (e.g., using a "garbage collector" mechanism designed to work with multiple pools to automatically reclaim unreachable memory blocks in different pools). In computer system 10, multiple detected application instances running on computer system 10 can invoke heap management functions, such as requesting the memory management system to allocate, access, and deallocate or release certain reserved fixed-size memory pool blocks or cells 20 in memory pool storage areas. These reserved memory pool cells are represented by "handles" or references or object identifiers or "pointers," which contain the address of the stored memory block or cell it references at runtime. When an application requests memory allocation from the memory management system, the system reserves a corresponding memory pool storage area for the application based on the number of allocations and the size of the memory cells. Similarly, the deallocation or release of memory cells is also managed by the memory management system, thereby ensuring efficient utilization of memory pool storage areas. The size of the memory block or unit 20 used by the requesting application is configurable, for example, 1 megabyte (or 1 MB), 20 MB, 100 MB, etc. Therefore, the total size of the corresponding reserved memory pool storage area allocated to the requesting application is configurable.
[0036] In one aspect of this disclosure, a system and method are provided for dynamically allocating and adjusting reserved memory pool storage areas with sizes determined using time-series data to improve performance and reduce costs.
[0037] Figure 2 A computer-implemented system 100 is described for dynamically allocating and fine-tuning the size of a corresponding reserved memory pool storage area 15 so as to be detected as currently in Figure 1 The application running on the computer system 10 shown (hereinafter referred to as the "detected application") is used. Figure 2As shown, multiple computer system application programs 120 are described as running on the CPU. In one embodiment, time-series data of each currently running application program over a period of time is acquired and stored for dynamic memory adjustment of the corresponding memory pool storage area allocated to the application. In one aspect, memory pool storage area usage attributes related to the amount allocated, deallocated, and the size of each reserved memory cell allocated to each memory pool storage area requested by the detected application 121 are collected from each application as time-series memory usage data over time periods such as 7 days, 6 months, 1 year, or longer, etc., for use in offline processing to train several time-series prediction models implemented for dynamic memory pool adjustment. This time-series memory usage data is referred to as the past memory usage of the detected application.
[0038] like Figure 2 As shown, based on the detected application 121 running on the system, for each detected application, time-series memory pool usage data associated with the data of each detected application is collected over time. This data includes: historical time-series data 125 representing past memory usage, such as the number of requested memory pool allocations commensurate with the number of application instances running on the computer system (e.g., running the application 10 times could result in a memory pool allocation of 10); and historical time-series data 126 representing past memory usage, such as the size of allocated / deallocated memory pool reserved storage areas, e.g., memory pool unit size requests of 20 megabytes, 100 megabytes, etc., requested by each instance of the application. The historical time-series data 125 can be extracted as a vector obtained from Figure 128, which includes information about the number of memory allocation requests, i.e., the historical number of past allocations and deallocations (which occurred over time during the execution of past application instances) (e.g., on the X-axis) and the size of each memory pool allocation request in megabytes (e.g., on the Y-axis). Historical time-series data 125, including information about the number of memory allocation requests from the historical usage of application 121, is input as a data vector into a first machine learning time-series-based prediction model 130 (e.g., a neural network model), which is trained to predict the number of allocation values 135 for the currently detected application 122 running on the computer system. Specifically, the first machine learning time-series-based prediction model 130 is trained to detect memory usage patterns over time, and based on any detected memory usage patterns, the prediction model 130 can predict the number of allocations that might be requested at runtime, for dynamically adjusting and predicting the allocation value 135 for the currently detected running application(s).
[0039] Similarly, historical time-series data 126 includes information about the size of memory units (“memory unit size”) requested by applications running on the computing system over past time periods. In embodiments, the size of memory units allocated in a memory pool is typically a fixed byte length; however, the size of the fixed memory units is adjusted according to the methods of this disclosure. Historical time-series data 126 can be extracted from Figure 129, which includes information about the number of memory allocation requests (i.e., the historical number of past allocations and deallocations that occurred over time during the execution of past application instances (e.g., on the X-axis)) and the size of the memory units for each past memory pool allocation request (e.g., in Mbytes), and formed as a data vector. The historical time-series data 126, representing the size of memory units allocated by past memory pool units requested by application instances over past time periods, is input as a data vector into a second machine learning time-series prediction model 140, which is trained to predict the memory unit size value 142 of the current application 122 running on the computer system. The second machine learning time series memory cell allocation prediction model 140 is trained to detect memory usage patterns, and based on any detected memory usage patterns, the second machine learning time series prediction model 140 predicts a memory pool size 142 for dynamically adjusting and predicting the allocation size (memory pool size) of the currently detected running application.
[0040] On the other hand, such as Figure 2As shown, in a further implementation, the output 142 of the second machine learning time series prediction model 140, which predicts the size values of the allocations, is input to a clustering module 150, which, for example, generates a distribution 131 of the predicted allocation sizes 132, 133 for each currently detected running application. That is, the clustering-based module 150 runs on the computer system to predict the size 145 of one or more allocated memory units for currently running applications. Using a k-means clustering method applied to the size output 142 of the prediction model allocations, the clustering module 150 determines a distribution 131 of the sizes of memory units allocated by past application instances, for example, 10 MB, 50 MB, and 100 MB allocations. For example, the clustering module 150 determines the size predictions of memory allocations for the first memory unit size 132 (e.g., 10 MB) and the second memory unit size 133 (e.g., 100 MB) based on previous memory request allocations made by applications running on the system. In one embodiment, the distribution 131 of the predicted clusters 132, 133 of different memory cell sizes can be determined based on memory usage patterns detected as a result of past historical memory allocation requests for each application instance running on the computer system.
[0041] Then, in Figure 2 In the process, based on the combined predicted allocation quantity value 135 and the predicted allocated memory cell size value 145, at 155, a rule-based adjustment method 155 is applied to determine whether to dynamically allocate or not allocate memory cells corresponding to the reserved memory pool of the memory pool storage region memory cell size value 160 predicted in the first instance, based on one or more of the following: the predicted allocation quantity, the predicted cell size of the clustered distribution of the predicted memory allocation size, and the allocation value, job priority, and estimated job duration. The rule-based adjustment method applies rules or strategies to determine whether to allocate memory cells based on one or more factors such as the predicted allocation quantity, the predicted cell size of the clustered distribution of the predicted memory allocation size, and the allocation value, job priority, and estimated job duration. If the decision is made to continue, the same or another rule or strategy may additionally determine whether to increase or decrease the size of the corresponding predicted memory pool allocation memory cells based on one or more of the following: 160 the predicted number of allocations, the cluster distribution of the predicted memory cell size of the predicted memory allocation, and the allocation value, job priority and estimated job duration, and, for example, the presence or occurrence of events or circumstances guaranteeing an increase or decrease in the size of the applied reserved memory pool storage area allocation due to special promotions, geography, or special customs during the year. Figure 2In the example embodiment shown, the predicted memory pool allocation memory unit size 160 is output as a data vector {10, 50, 100}, where each of the three values corresponds to the distribution 131 of the allocation unit sizes determined by the clustering module 150.
[0042] like Figure 2 As further shown, the output of the rule-based adjustment method for determining the memory pool allocation unit size value 160 can be further input into a regression model 175 to improve the dynamically recommended memory pool allocation size, thereby improving memory utilization efficiency by more accurately pre-allocating memory unit sizes for direct use by the requesting application. In one embodiment, the computer system further collects application-related data for the application instance to generate a profile of the running application. The application profile features include, but are not limited to, the following: dataset reference count, average count of requested allocations over past time periods (e.g., last week); maximum dataset size; average size of the last allocated data over past time periods (e.g., week); duration of the previous batch of jobs; and average memory allocation duration over past time periods (e.g., last week). Such application profile features can be input into the regression model 175, which is trained to predict program performance or adjust the parameter "P," which is used to fine-tune the predicted memory pool size.
[0043] In particular, consider Figure 2 Based on the inputs, including the memory pool allocation size 160 as real-time data associated with the currently detected running application and the application profile features associated with the current application, a time-series-based model prediction is performed. A trained regression model 175 is run to provide an adjusted parameter output value “P” 190, which is used to modify (refine or fine-tune) the predicted memory pool size 160 and generate a final memory pool allocation size value 195.
[0044] like Figure 2As shown, the use of regression model 175 illustrates the characteristics of the current application running on the computer system, since the current memory usage attributed to the current application instance can vary depending on the workload of any given day. Therefore, regression model 175 is trained to additionally consider the currently detected running application profile features to refine the cell size of the memory pool storage region. In an embodiment, the combined predicted allocation size value output 160 and the currently received real-time profile data of the currently detected running application are input to regression model 175 to fine-tune or refine (one or more) the predicted memory size allocation value 160. In an embodiment, the trained regression model 175 receives the currently predicted memory pool allocation size value output 160 generated by the application using a rule-based approach, and additionally receives a real-time data vector 170 comprising a sequence of real-time application profile feature data 165 of the application currently running on the system, including actual data of selected features from the most recently sampled time slot. Based on these inputs 160 and 170, the regression model generates an adjustment parameter output value “P” 190 to modify (refine or fine-tune) the predicted memory pool size 160, and this value indicates whether to increase or decrease the predicted memory pool size to produce the final memory pool allocation size value 195.
[0045] In a non-limiting embodiment, regression model 175 is, for example, a neural network model, a decision tree network, or a random forest decision tree network, and is trained offline using time-series data associated with the application to generate an adjustment parameter value "P" for refining the unit size. The application-associated data includes a set of application profile features, including but not limited to: dataset citation count, average dataset citation count from the previous week, maximum dataset size, average dataset citation count from the previous week, duration of the previous batch of jobs, and average duration of the previous batch of jobs from the previous week. The current application profile feature dataset is input into regression model 175 to predict the fine-tuning parameter "P" 190.
[0046] In operation, for each currently detected running application 122, system 100 generates a corresponding real-time data vector 165, which includes current memory pool usage attributes, such as the number of currently allocated memory pools and the size of current memory cells in the real-time over the past day or several hours. For multiple running applications, multiple data vectors 166 are obtained. These multiple vectors are input into simulator system 180 to obtain optimal corresponding tuning parameters 225. A regression model 175 is then trained using a data vector 170 consisting of the real-time data vectors 165 of the currently running applications labeled with ground truth tuning parameter "P" values 225 determined from the simulator. The tuning parameter "P" values 225 determined from the simulator are used as ground truth labels obtained from application features associated with previously running applications. These inputs are then used to train the regression model 175, such as a neural network, decision tree, or random forest decision tree.
[0047] like Figure 2 As further described, system 100 is therefore configured for offline training of regression model 175 to generate or predict adjustment parameters “P” 190 for adjusting the final memory pool allocation size value 195. The operating system can then dynamically reconfigure or allocate the final memory pool allocation size value 195 for each running application. Figure 2 As shown, for the detected currently running application, a corresponding data vector set 166 is generated, representing the current real-time application memory usage at the computer system. An example real-time data vector 166 is depicted as follows: { 3; 200; 40; ...} { 4; 500; 70; ...} { 3; 350; 63; ...}
[0048] Then, using a simulator, each vector in the data vector set 166 can be labeled with a corresponding tuning parameter value "P" 225 obtained from running simulator 180 to simulate application instances, with different candidate tuning parameter values used for each run. The determined candidate tuning parameter "P" values are determined by simulator system 180 to run the application, and the performance or efficiency of the application is characterized after running multiple simulations on simulator 180 and obtaining multiple simulation results. That is, for each currently running application 122, the corresponding current real-time data value in data vector 165 includes the current memory pool usage, which includes the currently allocated amount and the size of the allocated memory units for the currently running application. The method then runs each of the multiple data vectors in data vector set 166 in simulator 180, which is used to generate the training dataset for training regression model 175.
[0049] In particular, Figure 3 In the view of the regression model training system 500, historical time-series data 502 associated with the operation of each application 121 on the computer system is collected. Based on the data 502 collected over previous durations or periods, such as a week or a month, memory pool usage feature data 510 (“application profile features”) extracted or generated from the collected data 502 is generated. In an example embodiment, a set of “N” memory pool usage features 510 associated with the application are extracted or generated. These memory pool usage feature data 510 form the input to the simulator system for configuring the application to be simulated at the simulation system 180. These application profile feature data 510 are input to the simulator system to simulate the operation of the application under appropriate operating and workload conditions to obtain simulation performance results. Memory pool usage features 510 include, but are not limited to: dataset reference counts (e.g., feature 1), average counts from the previous week (e.g., feature 2), maximum dataset size (e.g., feature 3); average dataset size from the previous week (e.g., feature 4); duration of the previous batch of jobs (e.g., feature 5); and average job duration from the previous week (e.g., feature 6).
[0050] The collected profile feature data 510 is used as input 510 to a simulator application running on a simulator computer system 180, which simulates the application's execution to generate an adjustment parameter "P" output. Specifically, the feature set data 510 is input to the simulator 180, which is programmed offline to run a simulated application instance and generate corresponding performance output measurements or values to serve as the true label for supervised regression model machine learning. That is, the simulator system 180 receives the application profile data features 510 as input and runs simulations of the application under different feature set combinations, obtaining the optimal performance measurement or value for the input memory usage feature set 510 for this application. This optimal performance measurement or value is used as the true label 520 for supervised training of the regression model 175 to generate the memory size allocation adjustment parameter "P".
[0051] As further shown, Figure 3The method describes in more detail the use of simulator 180 to create a training dataset that includes generated labels representing the adjusted parameter value "P", which is used to label a set of real-time and / or historical data vectors 166 used to train regression model 175. While collecting historical application profile features 510, the simulator simulates the application's execution based on these feature set values to generate true labels 520 for use in the supervised regression model learning of the associated parameter "P". Simulator 180 runs a method to determine a range of values for "P". This may include sampling at regular intervals within that range to obtain a set of "P" values. Feature vectors are combined with different "P" values to obtain a set of test samples. The method then executes (simulates) the test samples to select the best "P" value for that feature dataset (vector). In one embodiment, the method selects "P" sample candidates to associate with the feature vector dataset (e.g., selects 10 candidates), and each instance of the application with these features is run (e.g., run 10 times), each time with a different "P" value. Here, each adjustment parameter "P" value represents a performance difference or metric between past simulation performance results when run based on the average of the past application's historical profile features and the current application instance's current application profile features (including the number of currently predicted allocations and the size of the corresponding memory units of the current application instance running on the computer system). Finally, the "P" values are validated using 180 results generated by simulator 180 (including performance and runtime results for each program run), and the best "P" value associated with the most efficient run (e.g., depending on the expected runtime) is selected as the true label "P" 520 for association with the feature set of this application instance. Then, as shown in Figure 3, each feature set 510 of the simulated application is labeled using the selected "best" adjustment parameter (label) P value 225 obtained from the application run on simulator system 180. Each feature set 510 and the determined adjustment parameter "P" label 225 are then input as training data 530 into regression model 175 for training.
[0052] An exemplary vector with six (6) application profile features used in the System 180 emulator is shown as follows: {10, 10, 500, 200, 35, 20, P = 1.5} {10,11,200,200,21,20, P=1} {7,10,200,200,15,20, P=0.8} {10,6,1000,200,55,20, P=3}
[0053] Once trained with this historical time series data, the regression model 175 can generate adjusted parameter values “P” 190 based on any current application profile feature dataset input.
[0054] return Figure 2 The method then includes labeling each corresponding real-time data vector 165 in set 166 for each application vector with the obtained best truth label 225, to obtain a correspondingly labeled vector set 176, which is input into regression model 175 to generate a current adjustment parameter "P" value 190 based on the profile feature set data associated with the currently running application. Simulator 180 generates a number of data points for labeling the training data input to the regression model. For example, the current memory uses vector 166, and each corresponding data vector in set 176 is labeled with the adjustment parameter "P" label 225. Figure 2 The vector shown in the figure is: {3; 200; 40; …}[P(0.5)] {4; 500; 70; …}[P(0.7)] {3; 350; 63; …}[P(1.1)]
[0055] Figure 4 Described Figure 3 Another implementation of the 500 system is the 550. For example... Figure 4 As further shown in system 550, after the method collects current application time-series memory usage data 502, the data is processed, such as by compression or averaging, to obtain a currently associated application profile feature data vector 560 corresponding to the currently running application. This currently associated application profile feature dataset 560 is input to a trained regression model 175 to generate a predicted adjusted parameter value “P” 190 for the current application instance at 570. The regression model 175 is trained to generate an adjusted parameter “P” output 190 representing a measure of difference (e.g., performance difference between the currently running application instance (features of existing jobs) and historical features of these same application instances (historical averages of feature sets)). For example, if the regression model generates an adjustment parameter value "P" < 1, this indicates that the currently predicted allocated memory unit size does not need to be modified or may be reduced (the workload and data of the currently running application instance are less than the historical average usage of the application); however, for example, if the regression model generates an adjustment parameter value "P" > 1, this indicates that it is necessary to modify the currently predicted allocated memory unit size (the current workload and data of the currently running application instance are greater than the historical average usage of the application instance). Therefore, in Figure 4In the example, given a predicted adjustment parameter value of 575 with P = 1.2 predicted by regression model 175, this can indicate an increase in the predicted memory pool allocation size at 590. Therefore, for example, given the predicted memory pool cell size output vector {10, 50, 100}, a value greater than 1 for P = 1.2 will result in an increase in the final cell size of the memory pool storage region used for the application to {12M, 60M, 120M}, such that at 590, this means that three heap pools will be allocated: the first heap pool cell size: 12M; the second heap pool cell size: 60M; and the third heap pool cell size: 120M.
[0056] Figure 5 A method for processing received historical time-series data according to one embodiment is described, specifically, a method 200 for compressing historical time-series data to obtain profile characteristics of an application instance. For example... Figure 5 As shown, the method of obtaining application profiles or application "features" used in the refinement or adjustment of the memory pool is used to analyze each collection of historical time series data 125, 126 obtained from the corresponding graphs 128, 129. The historical time period from which historical time series data is extracted from previously detected application instances can include data from the previous "N" times of the historical data, where the historical data from each previous time of the historical time series data includes, but is not limited to: the size of the cells in the allocated memory pool 202; the corresponding job duration 204; the number of allocations 206; and the value 208 of the total allocation size. For each time series historical data obtained (from the N historical data), the system runs a compression method 200 (e.g., LZ encoding, Huffman encoding, arithmetic encoding, etc.) to compress the time series historical data to obtain data and information 210, including but not limited to: the average data of the previous day's duration 212; the average data of the previous week's duration 214; the average data of the previous month's duration 216; and the average data of the previous quarter's duration 218. In one embodiment, the compression model 200 further determines other parameter data values 220, including but not limited to: the maximum data of the previous day; the maximum data of the previous week; the maximum data during the previous month; and the maximum data of the previous extreme period. The time period used in data averaging is not limited to daily or weekly durations, but may include monthly, quarterly, or any other time period duration.
[0057] Figure 6A The entire computer-based system 400 is also shown, which includes the operation of both first and second machine learning time series prediction models 130 and 140, and a rule-based method 155 to predict the memory pool unit size of a currently running application. Figure 6AIn this embodiment, the historical time-series data includes time-series data that includes the number 402 of allocations associated with memory pool allocations requested by applications running on the computer system, and the size 405 of the corresponding unit allocation for each memory allocation request, i.e., the size in bytes of memory units or memory blocks, or the size of objects being created by the application. This data can be implemented by... Figure 5 A general data compression technology, model 200, compresses data to obtain compressed time-series data 412 of the number of allocations and compressed state 415 of the allocation size. The compressed time-series data 412 of the number of allocations is input into a first machine learning time-series prediction model 130, and the compressed time-series data 415 of the allocation size is input into a second machine learning time-series prediction model 140. Both time-series prediction models can be conventional recurrent neural networks (RNNs) or long short-term memory (LSTMs). The first machine learning time-series prediction model 130 processes the time-series data 412 of the number of allocations and generates a corresponding prediction: the predicted number of allocations 422. The second machine learning time-series prediction model 140 processes the time-series data 415 of the number of allocations and generates a corresponding prediction: the predicted size of the allocations 425. Both the predicted number of allocations 422 and the predicted size of the allocations 425 are input into a rule-based method 155, which implements a rule or strategy to calculate a mathematical expectation or determine the total heap pool unit size 160 of the application.
[0058] As an example, based on a comparison of the application or predicted allocation value and the predicted allocation size with a rule or policy, the computer generates rule-based adjustment method output data 160 in response. This output data represents a rule-based result determination that indicates which memory pool(s) size should be dynamically allocated or not allocated for each currently running application. The rule-based adjustment method output data 160 may indicate heap memory or memory pool unit sizes (e.g., 10 MB, 50 MB, 100 MB) to dynamically allocate, for example, a 100 MB memory pool allocation corresponding to cluster 132 of predicted allocation sizes and a 50 MB allocation corresponding to cluster 133 of predicted allocation sizes in a first instance. For example, rule-based adjustment method 155 analyzes and applies a combination of the predicted allocation quantity value 135 and the corresponding predicted cluster allocation size 145, along with other criteria characterizing the application for the rule or policy. Example criteria may include application or job priority or expected job duration representing the expected runtime of the application. In embodiments, rules or policies may specify memory cell size allocations for certain higher-priority or more important jobs or applications, or for specific short- or long-duration jobs, or alternatively, may avoid allocating dynamic memory pools for lower-priority jobs or specified long- or short-duration jobs. These rules / policies may specify or prescribe the most efficient combination of application instances and their corresponding size allocations, priorities, and / or expected durations to determine, if any, what memory pool size should be allocated to the currently running application in the first instance as output 160. As an example, if a rule-based policy requires allocating a memory pool of 10 MB cell size for 10 application instances, a prediction 135 of the number of instances requesting 10 MB allocations based on such a rule or policy, specifying a threshold for the number of allocations, might result in no memory pool allocation; however, if a rule-based policy specifies system capacity to accommodate 10 instances of an application each requesting 10 MB, a prediction of 16 instances requesting 10 MB might result in generating a rule-based adjustment output threshold 160, which indicates a recommendation to increase memory pool allocations for the currently running application based on that rule or policy. In one example, if the application runs only once or a few times, below a threshold from a defined rule, no memory pool will be allocated.
[0059] Figure 6B An alternative computer-based method 450 is also shown, which includes running first and second machine learning time series prediction models 130, 140 and a rule-based method 155 to predict the heap pool cell size. Figure 6BIn one embodiment, the historical time-series data includes a time-series allocation quantity 402 representing the number of heap memory objects requested by the application and a corresponding size 405 for each memory allocation, i.e., the size in bytes of a memory block or the size of an object being created by the application. This data can be compressed by a data compression model 200 to obtain compressed time-series data 412 of the allocation quantity and a compressed state 415 of the allocation size. The compressed allocation quantity time-series data 412 is shown as input to a first machine learning time-series-based prediction model 130, and the compressed allocation size time-series data 415 is shown as input to a second machine learning time-series prediction model 140. The first machine learning time-series-based prediction model 130 processes the allocation quantity time-series data 412 and generates a corresponding prediction: the predicted allocation quantity 422. The second machine learning time-series prediction model 140 processes the allocation quantity time-series data 415 and generates a corresponding prediction: the predicted allocation size 425. In this alternative embodiment, the predicted allocation size 425 based on historical time-series data is input to a clustering-based module 150, which implements a k-means or similar clustering algorithm for processing, thereby determining a cluster distribution, for example, based on a set 450 of requested allocation size values from the requesting application. In one embodiment, the clustering-based module 150 may apply a k-means clustering method to obtain a set or distribution 131 of allocation size values based on past memory allocation requests. One or more of the set of allocation size values 132, 133, along with the allocation quantity 422, may be input to a rule-based method (regression model) 175 to generate the predicted heap pool cell size 160.
[0060] The predicted number of allocations 422 and the predicted size of allocations 425 are both input into a rule-based method 155, which calculates the mathematical expectation of the size 160 of the memory cell in the memory pool storage region.
[0061] Figure 6B The system can be used as an example time series to process historical data to predict memory pool size. Here, the example time series data represents a custom batch processing application that will process daily credit card transactions. The application's memory usage varies from day to day. In this example, the time series of historical data is used to predict the distribution of the size of the job's allocation.
[0062] Figure 7 Described in Figure 1Method 600, implemented at a computer system, is used to dynamically adjust a memory pool using time-series data. A first step 602 includes detecting applications running at the computer system that will utilize memory allocated in the memory pool storage area at the computer system. Then, at 605, the method extracts current time-series data and / or past (historical) time-series data based on the memory usage of the memory pool for each currently running application. In embodiments, current real-time memory usage data is not required for either of the prediction models; only historical data is needed. As a non-limiting example, the time-series data may be in vector form: { 3; 200; 40; ...} This includes, for the application, the number of memory allocation requests (e.g., 3) and the size of each allocation request (e.g., 200 MB, 40 MB, etc.).
[0063] Then, in Figure 7 At 611, in response to the received time-series data vector of the currently running application, the method runs a first trained time-series prediction model to predict, based on historical time-series data, the number of allocation values to be requested by the requesting application running on the computer system. Then, at 615, the method runs a second trained time-series prediction model to predict, based on historical time-series data, the size of the memory allocation to be allocated in the memory pool storage area for each requesting application. Then, in Figure 7 620, this method applies rules or strategies to determine whether to accept and / or modify the predicted size of the requested memory pool cell size. The applied rule-based method or strategy may consider one or more factors, such as: the current predicted amount of memory pool cell size and / or the predicted number of allocations, the application's specified priority, the expected job duration, and current events or conditions that could justify increasing or decreasing the size of the applied memory allocation. Continuing to... Figure 7 624, determines whether to modify the requested memory pool allocation based on one or more factors.
[0064] If the rule or policy applied in step 624 determines that modification of the predicted memory pool allocation size is permissible, the process proceeds to step 630, where a further trained time-series prediction model is run to predict adjustment parameters “P” used to refine the predicted allocation size based on the profile features of the currently requesting application. These current distribution features can be represented by a data vector, such as {feature 1, feature 2, feature 3, feature 4, feature 5, ..., feature N…}, where each value corresponds to a current application distribution feature. Based on the predicted adjustment parameter value, the method proceeds to step 636 to dynamically allocate the corresponding reserved memory in the memory pool for the requesting application based on the predicted allocation size and the adjustment parameter. The method then returns to step 602 for continuous processing at the computer system.
[0065] Therefore, in this embodiment, application-related data (e.g., profile data) is used to refine the cell size. In one embodiment, the method can be used to refine the size of the memory pool or heap allocation based on profile feature data associated with the actual application. For example, if a customer application has a promotional campaign, transaction volume and data volume will increase significantly, and it is not possible to accurately predict the memory size of the event solely through time-series data. In this embodiment, actual real-time application profile data can be used to refine the adjustment parameter "P".
[0066] Otherwise, the process returns to step 624. If it is determined that the modification of the predicted memory pool allocation size is not guaranteed by the applied rules or policies, the process proceeds to step 633, where the computer system dynamically allocates the corresponding reserved memory in the memory pool for the requesting application based on the predicted allocation size and the number of received requests. The method then returns to step 602 for continued processing at the computer system.
[0067] Figure 8 Described in Figure 1 Method 700, implemented at a computer system, is used to train a regression model for generating or predicting adjustment parameters used in refining memory pool size allocations using time-series data. The first step 702 includes detecting, at the computer system, an application that is running and will utilize memory allocated in the memory pool storage area.
[0068] Then, at 705, the method obtains data from historical time-series data regarding the detected application's past memory usage of the memory pool, which is correlated with the calculation of one or more application profile features. For example... Figure 5 As shown, historical application profile feature data can be time-series data compressed using data compression methods. Continue to... Figure 8708, the method forms an input data vector comprising computed application profile features for each past requesting application, based on historical time-series data associated with past assignment requests received from the requesting application. To run a regression model, in an embodiment, past profile features may be represented as a historical application profile feature data vector, such as {10, 10, 500, 200, 35, 20…}, where each value corresponds to a current application profile feature, such as dataset reference count (e.g., 10), average count from the previous week (e.g., 10), maximum dataset size (e.g., 50 MB); average size from the previous week (e.g., 200 MB); duration of the previous batch of jobs (e.g., 10); and average job duration from the previous week (e.g., 20), etc.
[0069] Continue to Figure 8 711, for each application instance, based on the historical profile features of each application, the method obtains the true label of each historical application profile feature data vector instance for use in supervised training of the regression model, and for use in adjusting parameters used to predict the predicted allocated memory size for refining the currently running application. Then, it continues to... Figure 8 714, each historical application profile feature data vector associated with the requesting application is labeled with an additional adjustment parameter value "P" obtained based on the historical time series data. For example, the application profile feature data vector can be represented as a historical application profile feature data vector, such as {10, 10, 500, 200, 35, 20, P = 1.5}. With each historical application profile feature data vector labeled with the additional obtained adjustment parameter value "P", the method can proceed to 717 to train a regression model using the application profile feature vector and the true adjustment parameter label "P" to predict the adjustment parameter, thereby determining how much of a given memory allocation in the memory pool for the currently running application should be modified based on the current profile features of the current application.
[0070] Figure 9 Depicting in Figure 1 A method 800 for generating true labels used in training a regression model is implemented on a simulator running on a computer system. The generated true labels are used to train the regression model to generate or predict adjustment parameters used in refining memory pool size allocations determined using historical time-series data related to the requesting application. The first step 802 includes determining the range of values for the application's adjustment parameter "P". Then, in Figure 8At 805, a set of "P" values is generated within the specified range at regular intervals to obtain a set of test application samples. Then at 808, a step is performed to combine a feature vector with the different "P" values of that set to obtain a set of test application samples. Then, at 811, the test application samples are run in a program simulator. Continuing to 814, the method determines the corresponding duration for running the test application samples in the simulator. Then, at 820, it is determined whether the current test application sample results in the minimum duration. If it is determined at 820 that the current test application sample does not result in the minimum duration, the process returns to 808 to label the feature vector with different "P" values, and the process from 811, 814, and 820 is repeated with the new labeled vector. At 820, once it is determined that the current test application sample and the new feature vector combined with the different "P" values of that set do indeed result in the minimum duration, the process proceeds to 824 to record the "P" value associated with the current minimum test application sample duration. Once all the “P” values in the range have been processed in the simulator, at 828, the “P” values are returned as true labels to be used to train the regression model using a combined feature vector of application profile features.
[0071] exist Figure 2 Implemented in System 100 Figure 7 , 8 The methods in 9 also include monitoring each application’s actual use of the allocated memory heap and providing actual usage as feedback to correct or adjust both the time series forecasting and regression models.
[0072] The system and method presented in this paper improve performance and reduce program costs by automatically provisioning and managing memory pool cell sizes. The described method significantly reduces the manual work required for memory pool tuning for a wide variety of applications. Furthermore, the method can automatically provide appropriate memory pool cell sizes tailored to various applications. Moreover, even for the same application, the method can automatically provide an appropriate memory pool cell size for each execution. This method is technically valuable to applications regardless of the platform / operating system on which they are deployed.
[0073] Various aspects of this disclosure are described by narrative text, flowcharts, block diagrams of computer systems, and / or block diagrams of machine logic included in embodiments of a computer program product (CPP). Regarding any flowchart, depending on the technology involved, operations may be performed in a different order than that shown in a given flowchart. For example, again according to the technology involved, two operations shown in consecutive flowchart blocks may be performed in reverse order, as a single integrated step, simultaneously, or in a manner that at least partially overlaps in time.
[0074] Computer Program Product Embodiment (“CPP Embodiment” or “CPP”) is a term used in this disclosure to describe any collection of one or more storage media (also referred to as “media”) collectively included in a collection of one or more storage devices, the collection of one or more storage devices collectively including machine-readable code corresponding to instructions and / or data for performing computer operations specified in a given CPP claim. A “storage device” is any tangible device capable of holding and storing instructions used by a computer processor. Without limitation, a computer-readable storage medium can be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these media include: magnetic disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanical encoding devices (such as punch cards or pits / platforms formed in the main surface of the disk), or any suitable combination of the foregoing. Computer-readable storage media, as used in this disclosure, should not be construed as storing transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides, optical pulses through fiber optic cables, electrical signals transmitted through wires, and / or other transmission media. As those skilled in the art will understand, data is typically moved at certain incidental points in time during the normal operation of the storage device, such as during access, defragmentation, or garbage collection; however, this does not make the storage device transient, because the data is not transient when it is stored.
[0075] like Figure 9 As shown, computing environment 900 includes an example of an environment for executing at least some of the computer code involved in performing the methods of the present invention, such as code 701 for dynamically allocating memory pool size, so as to, for example, according to Figure 7-9The method illustrated allocates memory across a pool of multiple applications running on a computer system. In addition to block 701, the computing environment 900 includes, for example, a computer 901, a wide area network (WAN) 902, an end-user equipment (EUD) 903, a remote server 904, a public cloud 905, and a private cloud 906. In this embodiment, the computer 901 includes a processor set 910 (including processing circuitry 920 and a cache 921), a communication infrastructure 911, volatile memory 912, persistent storage 913 (including the operating system 922 and block 701 as described above), a peripheral device set 914 (including a user interface (UI) device set 923, a storage device 924, and an Internet of Things (IoT) sensor set 925), and a network module 915. The remote server 904 includes a remote database 930. The public cloud 905 includes a gateway 940, a cloud coordination module 941, a host physical machine set 942, a virtual machine set 943, and a container set 944.
[0076] Computer 901 can take the form of a desktop computer, laptop computer, tablet computer, smartphone, smartwatch or other wearable computer, mainframe computer, quantum computer, or any other form of computer or mobile device now known or to be developed in the future capable of running programs, accessing networks, or querying databases such as remote database 930. As is well known in the field of computer technology, and depending on that technology, the performance of a computer-implemented method can be distributed across multiple computers and / or multiple locations. On the other hand, in this presentation of computing environment 900, the detailed discussion focuses on a single computer, specifically computer 901, to keep the presentation as simple as possible. Computer 901 can reside in the cloud, even... Figure 9 The document does not show that it is in the cloud; on the other hand, computer 901 does not need to be in the cloud unless to the extent that can be definitively indicated.
[0077] Processor assembly 910 includes one or more computer processors of any type now known or to be developed in the future. Processing circuitry 920 may be distributed across multiple packages, such as multiple cooperating integrated circuit chips. Processing circuitry 920 may implement multiple processor threads and / or multiple processor cores. Cache 921 is memory located within the processor chip package and is typically used for data or code that should be readily accessible by the threads or cores running on processor assembly 910. Cache memory is typically organized into multiple levels based on its relative proximity to the processing circuitry. Alternatively, some or all of the cache in the processor assembly may be located “off-chip.” In some computing environments, processor assembly 910 may be designed to work with qubits and perform quantum computing.
[0078] Computer-readable program instructions are typically loaded onto computer 901 to cause the processor set 910 of computer 901 to perform a series of operational steps to implement a computer-implemented method, such that the instructions thus executed instantiate the method specified in the flowchart and / or the description of the computer-implemented method included in this document (collectively, the “method of the invention”). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache 921 and other storage media discussed below. The program instructions and associated data are accessed by processor set 910 to control and direct the execution of the method of the invention. In computing environment 900, at least some of the instructions for performing the method of the invention may be stored in persistent storage device 913 in block 200.
[0079] The communication structure 911 is a signal transmission path that allows various components of the computer 901 to communicate with each other. Typically, this structure consists of switches and conductive paths, such as switches and conductive paths forming buses, bridges, physical input / output ports, etc. Other types of signal communication paths can be used, such as fiber optic communication paths and / or wireless communication paths.
[0080] Volatile memory 912 is any type of volatile memory now known or to be developed in the future. Examples include dynamic random access memory (RAM) or static RAM. Typically, volatile memory 912 is characterized by random access, but this is not necessary unless explicitly stated otherwise. In computer 901, volatile memory 912 is located in a single package and is internal to computer 901; however, alternatively or additionally, volatile memory may be distributed across multiple packages and / or located externally relative to computer 901.
[0081] The persistent storage device 913 is any form of non-volatile storage device for a computer, now known or to be developed in the future. The non-volatility of this memory means that the stored data is retained regardless of whether power is supplied to the computer 901 and / or directly to the persistent storage device 913. The persistent storage device 913 may be a read-only memory (ROM), but typically at least a portion of the persistent storage device allows data to be written, deleted, and rewritten. Some common forms of persistent storage include hard disks and solid-state storage devices. The operating system 922 may take several forms, such as various known proprietary operating systems or operating systems employing an open-source portable operating system interface type with a kernel. The code included in block 200 generally includes at least some of the computer code involved in performing the methods of the present invention.
[0082] Peripheral device set 914 includes a set of peripheral devices for computer 901. Data communication connections between peripheral devices and other components of computer 901 can be implemented in various ways, such as Bluetooth connections, near field communication (NFC) connections, connections made by cables (such as Universal Serial Bus (USB) type cables), plug-in connections (e.g., Secure Digital (SD) cards), connections made through local area communication networks, and even connections made through wide area networks such as the Internet. In various embodiments, UI device set 923 may include components such as a display screen, speakers, microphones, wearable devices (e.g., goggles and smartwatches), keyboards, mice, printers, touchpads, game controllers, and haptic devices. Storage device 924 is an external storage device, such as an external hard drive, or a pluggable memory, such as an SD card. Storage device 924 may be persistent and / or volatile. In some embodiments, storage device 924 may take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computer 901 requires substantial storage (e.g., where computer 901 locally stores and manages a large database), this storage device can be provided by a peripheral storage device designed to store very large amounts of data, such as a storage area network (SAN) shared by multiple geographically distributed computers. The IoT sensor set 925 consists of sensors that can be used in IoT applications. For example, one sensor could be a thermometer, while another could be a motion detector.
[0083] Network module 915 is a collection of computer software, hardware, and firmware that allows computer 901 to communicate with other computers via WAN 902. Network module 915 may include hardware such as a modem or Wi-Fi transceiver, software for packetizing and / or depacketizing data transmitted over the communication network, and / or web browser software for transmitting data over the Internet. In some embodiments, the network control and network forwarding functions of network module 915 are performed on the same physical hardware device. In other embodiments (e.g., embodiments utilizing software-defined networking (SDN), the control and forwarding functions of network module 915 are performed on physically separate devices, such that the control function manages several different network hardware devices. Computer-readable program instructions for performing the methods of the present invention can typically be downloaded to computer 901 from an external computer or external storage device via a network adapter card or a network interface included in network module 915.
[0084] A WAN 902 is any wide area network (e.g., the Internet) capable of transmitting computer data over non-local distances using any technology known now or developed in the future for transmitting computer data. In some embodiments, a WAN 902 may be replaced by and / or supplemented by a local area network (LAN) designed to transmit data between devices located in a local area such as a Wi-Fi network. WANs and / or LANs typically include computer hardware such as copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and edge servers.
[0085] End User Equipment (EUD) 903 is any computer system used and controlled by an end user (e.g., a customer of the enterprise operating computer 901) and can take any of the forms discussed above in conjunction with computer 901. EUD 903 typically receives useful and helpful data from the operation of computer 901. For example, assuming computer 901 is designed to provide recommendations to the end user, these recommendations are typically transmitted from network module 915 of computer 901 to EUD 903 via WAN 902. In this way, EUD 903 can display or otherwise present the recommendations to the end user. In some embodiments, EUD 903 can be a client device, such as a thin client, a heavy client, a mainframe computer, a desktop computer, etc.
[0086] Remote server 904 is any computer system that provides at least some data and / or functionality to computer 901. Remote server 904 can be controlled and used by the same entity operating computer 901. Remote server 904 represents a machine that collects and stores useful and useful data used by other computers such as computer 901. For example, if computer 901 is designed and programmed to provide recommendations based on historical data, that historical data can be provided to computer 901 from a remote database 930 of remote server 904.
[0087] Public cloud 905 is any computer system that can be used by multiple entities, providing on-demand availability of computer system resources and / or other computing capabilities (especially data storage (cloud storage) and computing power) without the need for direct, active management by users. Cloud computing typically leverages resource sharing to achieve scalability, consistency, and economy. Direct and active management of the computing resources of public cloud 905 is performed by the computer hardware and / or software of cloud coordination module 941. The computing resources provided by public cloud 905 are typically implemented by virtual computing environments running on various computers constituting the host physical machine set 942, which is the entire domain of physical computers in and / or available to public cloud 905. Virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set 943 and / or containers from container set 944. It should be understood that these VCEs can be stored as images and can be transferred between various physical machine hosts as images or after instantiation of VCEs. The cloud coordination module 941 manages the delivery and storage of images, deploys new instantiations of VCE, and manages the instantiation of VCE deployment activities. Gateway 940 is a collection of computer software, hardware, and firmware that allows the public cloud 905 to communicate via WAN 902.
[0088] Now, we will provide some further explanation of Virtualized Computing Environments (VCEs). A VCE can be stored as an "image." A new active instance of a VCE can be instantiated from this image. Two common types of VCEs are virtual machines and containers. A container is a VCE that uses operating system-level virtualization. This refers to an operating system feature where the kernel allows multiple isolated user-space instances, called containers, to exist. From the perspective of the programs running within them, these isolated user-space instances typically appear as actual computers. Computer programs running on a regular operating system can utilize all the resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running within a container can only use the contents of the container and the devices allocated to the container; this is a characteristic known as containerization.
[0089] Private cloud 906 is similar to public cloud 905, except that computing resources are available only to a single enterprise. While private cloud 906 is depicted as communicating with WAN 902, in other embodiments, private cloud can be completely disconnected from the internet and accessed only via a local / private network. Hybrid cloud is a combination of multiple clouds of different types (e.g., private, community, or public cloud types) typically implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardization or proprietary technology that enables coordination, management, and / or data / application portability across the multiple component clouds. In this embodiment, public cloud 905 and private cloud 906 are both part of a larger hybrid cloud.
[0090] The corresponding structures, materials, actions, and equivalents of all elements in the following claims are intended to include any structure, material, or action for performing functions in combination with other claimed elements of the specific claims. The invention has been described for purposes of illustration and description, but this description is not exhaustive or intended to limit the invention to the forms disclosed. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the invention. The embodiments and terminology were chosen and described in order to best explain the principles of the invention and its practical application, and to enable others skilled in the art to understand the various embodiments of the invention with various modifications suitable for the particular purpose contemplated.
Claims
1. A system for allocating memory in a memory storage area of a computer system, comprising: A hardware processor associated with a memory storing program instructions in a computer system, the hardware processor executing the program instructions, the program instructions configuring the processor to: Detect one or more applications running on the computer system, the computer system memory including a memory pool storage area dedicated to the applications; And for each application detected: Run a first machine learning model, which is trained to use the obtained time-series data from the past memory of the detected application to predict the number of allocation requests for memory cells in the memory pool storage region for the detected application. Run a second machine learning model, which is trained to use the obtained time-series data from the past memory of the detected applications to predict the size of the memory cells to be allocated in the memory pool storage area for each detected application. as well as For each detected application running on the computer system, a corresponding reserved memory pool storage area of a certain size is dynamically allocated based on the predicted number of allocations and the predicted size of memory cells.
2. The system according to claim 1, wherein, The first machine learning model is a time-series prediction model trained using historical data associated with memory pool storage areas from detected application instances that have run on the computer system in the past. The historical data includes time-series data, which includes the number of memory allocations and deallocations in the memory pool storage areas for each detected application that has run in the past. as well as The second machine learning model is a time-series prediction model trained using historical data associated with memory pool storage areas from previously detected application instances, the historical data including time-series data including the size of the memory cells to be allocated in the memory pool memory for each detected application that has run in the past.
3. The system according to claim 1, wherein, Prior to the dynamic allocation, the hardware processor is further configured to: Apply rules or policies to determine whether to continue dynamically allocating or not allocating memory of the corresponding reserved memory size in the memory pool storage area based on the predicted number of allocations and the predicted size of memory cells for the detected application.
4. The system according to claim 3, wherein, In order to dynamically allocate the corresponding reserved size of memory in the memory pool storage region for use by the detected application running on the computer system, the hardware processor is further configured to: Apply rules or strategies to determine, based on the predicted number of allocations and the predicted size of memory cells, whether to increase or decrease the amount of memory allocated in the memory pool storage area for the detected application.
5. The system according to claim 1, wherein, In order to dynamically allocate corresponding reserved memory pool storage areas for use by the detected application, the hardware processor is further configured to: Clustering methods are applied to the time-series data obtained from the application’s past memory usage to predict the distribution of memory pool storage region size values associated with the detected application.
6. The system according to claim 2, wherein, The hardware processor is further configured to: Run a third machine learning model, which is trained to generate adjustment parameters for refining the size of the corresponding reserved memory pool storage area dynamically allocated for the detected application, based on one or more current application profile features associated with the detected application and the predicted cell size for the application. as well as In response to the generated adjustment parameters, the size of the memory pool storage area allocated for the detected application is dynamically modified.
7. The system according to claim 6, wherein, The hardware processor is further configured to: Collect historical time-series data, which includes one or more application profile features associated with past memory pool storage areas used by detected application instances that ran on the computer system in the past. as well as The third machine learning model is trained using supervised machine learning, which uses model training data including one or more application profile feature data associated with the past memory pool storage regions of the detected application instances, and tuning parameter labels associated with the generated tuning parameters.
8. The system according to claim 7, wherein, The one or more profile features of each requesting application include one or more of the following: dataset reference count, average dataset reference count over a past time period; maximum dataset size, average dataset reference count over the past time period, duration of the previous batch of jobs, and average duration of the previous batch of jobs over the past time period.
9. The system according to claim 8, further comprising: A system for simulating the operation of each detected application using the application profile features of the requested application, the simulation system running samples of the application using different combinations of application profile features, and determining the adjustment parameter labels for training the third machine learning model based on performance differences between the sampled applications to generate the adjustment parameters for refining the predicted memory cell size values.
10. A method for allocating memory in a memory storage area of a computer system, comprising: Detect one or more applications running on the computer system at a hardware processor associated with memory in the computer system, the computer system memory including a memory pool storage area dedicated to the application; And for each application detected: A first machine learning model is run on the hardware processor. The first machine learning model is trained to use time-series data obtained from past memory of the detected application to predict the number of allocation requests for memory cells in the memory pool storage region for the detected application. A second machine learning model is run on the hardware processor. The second machine learning model is trained to use the obtained time series data from the past memory of the detected applications to predict the size of the memory cells to be allocated in the memory pool storage area for each detected application. as well as The hardware processor dynamically allocates a reserved memory pool storage area of a certain size for each detected application running on the computer system, based on the predicted number of allocations for the detected application and the predicted size of memory cells.
11. The method according to claim 10, wherein, The first machine learning model is a time series prediction model, and the method further includes: Using the hardware processor, the time-series prediction model is trained with historical data associated with memory pool storage areas from detected application instances that have previously run on the computer system. The historical data includes time-series data, comprising the amount of memory allocated and deallocated in the memory pool storage areas for each detected application that has run in the past. The second machine learning model is a time series prediction model, and the method further includes: Using the hardware processor, the time-series prediction model is trained with historical data associated with memory pool storage areas from previously detected application instances, the historical data including time-series data including the size of the memory cells to be allocated in the memory pool memory for each previously run detected application.
12. The method according to claim 11, wherein, Prior to the dynamic allocation, the method further includes: The hardware processor applies rules or policies to determine, firstly, whether to continue dynamically allocating or not allocating memory of the corresponding reserved memory size in the memory pool storage area based on the predicted number of allocations and the predicted memory cell size for the detected application.
13. The method according to claim 12, wherein, Dynamically allocating the amount of memory in the corresponding reserved memory pool storage area for use by the detected application includes: The hardware processor applies rules or policies to determine, based on the predicted number of allocations and the predicted size of memory cells, whether to increase or decrease the amount of memory allocated in the memory pool storage area for the detected application.
14. The method according to claim 12, wherein, Dynamically allocating a corresponding reserved memory pool size storage area for use by the detected application includes: The hardware processor applies a clustering method to the time-series data obtained from the application's past memory usage to predict the distribution of memory pool storage region size values associated with the detected application.
15. The method of claim 12, further comprising: The hardware processor runs a third machine learning model, which is trained to generate adjustment parameters for refining the size of the memory pool storage region dynamically allocated for the detected application, based on one or more current application profile features associated with the detected application and the predicted cell size for the application. as well as In response to the generated adjustment parameters, the hardware processor dynamically modifies the size of the memory pool storage region allocated for the detected application.
16. The method of claim 15, further comprising: The hardware processor collects time-series data, which includes one or more application profile features associated with past memory pool storage areas of detected application instances that have run on the computer system in the past. as well as The third machine learning model is trained using supervised machine learning, which uses model training data including one or more application profile feature data associated with the past memory pool storage regions of the detected application instances, and tuning parameter labels associated with the generated tuning parameters.
17. The method according to claim 16, wherein, The one or more profile features of each requesting application include one or more of the following: dataset application count, average dataset reference count over a past time period, maximum dataset size, average dataset reference count over the past time period, duration of the previous batch of jobs, and average duration of the previous batch of jobs over the past time period.
18. The method of claim 17, further comprising: At the program simulator, the execution of each detected application is simulated using the application profile features of the requested application. The simulation system runs samples of the application using different combinations of one or more application profile features. Based on the performance differences between the sampled applications, the adjustment parameter labels are determined when training the third machine learning model to generate the adjustment parameters used to refine the predicted memory cell size values.
19. A computer program product for allocating memory in a memory storage area of a computer system, the computer program product comprising: One or more computer-readable storage media, and program instructions commonly stored on the one or more computer-readable storage media, the program instructions comprising: Program instructions for detecting one or more applications running on a computer system, the computer system memory including a memory pool storage area dedicated to the application; and for each detected application; Program instructions for running a first machine learning model, the first machine learning model being trained to predict the number of allocation requests for memory cells in the memory pool storage region for the detected application using obtained time-series data from past memory of the detected application. Program instructions for running a second machine learning model, the second machine learning model being trained to use the obtained time-series data from the past memory of the detected applications to predict the size of memory cells to be allocated in the memory pool storage region for each detected application; and Program instructions for dynamically allocating a corresponding reserved memory pool storage area of a certain size for each detected application running on the computer system, based on the predicted number of allocations and the predicted size of memory cells.
20. The computer program product according to claim 19, wherein, Prior to the dynamic allocation, the program instructions further include: Program instructions used to apply rules or policies to determine whether to continue dynamically allocating or not allocating memory of the size predicted in the memory pool storage area based on the predicted number of allocations and the predicted size of memory cells for the detected application.