CN112882824A - Memory resource allocation method, device and equipment - Google Patents

Memory resource allocation method, device and equipment Download PDF

Info

Publication number
CN112882824A
CN112882824A CN201911206680.1A CN201911206680A CN112882824A CN 112882824 A CN112882824 A CN 112882824A CN 201911206680 A CN201911206680 A CN 201911206680A CN 112882824 A CN112882824 A CN 112882824A
Authority
CN
China
Prior art keywords
software
cluster software
cluster
concurrent users
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911206680.1A
Other languages
Chinese (zh)
Inventor
张希成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201911206680.1A priority Critical patent/CN112882824A/en
Publication of CN112882824A publication Critical patent/CN112882824A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a memory resource allocation method, a device and equipment, comprising the following steps: acquiring a big data resource pool; acquiring the software type and the number of concurrent users of cluster software to be installed; determining a first distribution mode corresponding to the software type and the number of concurrent users of the cluster software to be installed by using the big data resource pool; and allocating memory resources on a first node to the cluster software to be installed according to the first allocation mode, wherein the first node is a node for running the cluster software to be installed. According to the method and the device, the demands of the cluster software on the number of nodes and the memory resources are predicted from the aspects of software types and the number of concurrent users according to the large data resource pool, the memory resources required by the cluster software to be installed are reasonably distributed, and the contradiction between the running speed of the cluster software and the waste of the memory resources is balanced.

Description

Memory resource allocation method, device and equipment
Technical Field
The present application relates to the field of computer software technologies, and in particular, to a method, an apparatus, and a device for allocating memory resources.
Background
With the development of the internet and the continuous increase of the demand for big data processing, the application of big data clusters is increasingly widespread. A large data cluster may be deployed with multiple services, and the multiple services may run in nodes included in the large data cluster. Since the service needs to occupy resources in a large data cluster when running, resource allocation needs to be performed on the service.
At present, the requirement of the installation of cluster software on the number of machine nodes and the memory of each node is basically a universal template, but because resources occupied by services in the operation process are not fixed, the problem of too slow operation or resource waste exists after part of the cluster software is installed, and the requirement of the cluster software on the memory is not predicted from the aspects of the software and the number of concurrent users.
Disclosure of Invention
In order to solve the technical problem that after cluster software is installed, the cluster software runs too slowly or resources are wasted due to unreasonable memory resource allocation, the application provides a memory resource allocation method, device and equipment.
A method for allocating memory resources comprises the following steps:
acquiring a big data resource pool, wherein the big data resource pool stores a corresponding relation between a software type of cluster software, the number of concurrent users and a resource allocation mode of the cluster software, and the resource allocation mode is used for indicating allocation of memory resources on a node running the cluster software;
acquiring the software type and the number of concurrent users of cluster software to be installed;
determining a first distribution mode corresponding to the software type and the number of concurrent users of the cluster software to be installed by using the big data resource pool;
and allocating memory resources on a first node to the cluster software to be installed according to the first allocation mode, wherein the first node is a node for running the cluster software to be installed.
Optionally, the step of determining, by using the big data resource pool, a first allocation manner corresponding to the software type and the number of concurrent users of the cluster software to be installed includes:
determining the same cluster software in the big data resource pool, wherein the same cluster software is the same as the cluster software to be installed in the big data resource pool in software type;
and determining the resource allocation mode corresponding to the condition that the number of the concurrent users of the similar cluster software is the number of the concurrent users of the cluster software to be installed as the first allocation mode according to the big data resource pool.
Optionally, the step of allocating the memory resource on the first node to the cluster software to be installed according to the first allocation manner includes:
determining the number of the first nodes according to the software type of the cluster software to be installed and the number of concurrent users;
and allocating the memory resource on each first node to the cluster software to be installed according to the first allocation mode.
Optionally, the step of obtaining the software type and the number of concurrent users of the cluster software to be installed includes:
and acquiring the total user number of the cluster software to be installed, and predicting the number of concurrent users using the cluster software to be installed in the current time period in all the users according to the total user number.
Optionally, after allocating the memory resource on the first node to the cluster software to be installed according to the first allocation formula, the method further includes:
acquiring the number of actual concurrent users and the actually occupied memory resources after the cluster software to be installed is installed;
and updating the number of concurrent users corresponding to the software type of the cluster software to be installed and the occupied memory resources in the big data resource pool according to the actual number of concurrent users corresponding to the software type of the cluster software to be installed and the actually occupied memory resources.
Optionally, before allocating the memory resource on the first node to the cluster software to be installed according to the first allocation formula, the method further includes:
and setting a plurality of standby nodes, and when the memory resource on the first node is abnormal in the running process of the cluster software to be installed, allocating the memory resource of the standby node to the cluster software to be installed.
In a second aspect, the present application provides an apparatus for allocating memory resources, including:
the system comprises a sample data acquisition module, a data processing module and a data processing module, wherein the sample data acquisition module is used for acquiring a big data resource pool, the big data resource pool stores the corresponding relation between the software type of cluster software, the quantity of concurrent users and the resource allocation mode of the cluster software, and the resource allocation mode is used for indicating the allocation of memory resources on nodes running the cluster software;
the target data acquisition module is used for acquiring the software type and the number of concurrent users of the cluster software to be installed;
the data processing module is used for determining a first distribution mode corresponding to the software type and the number of concurrent users of the cluster software to be installed by utilizing the big data resource pool;
and the resource allocation module is used for allocating memory resources on a first node to the cluster software to be installed according to the first allocation mode, wherein the first node is a node for operating the cluster software to be installed.
Optionally, the apparatus further comprises: and the data storage module is used for updating the number of concurrent users corresponding to the software type of the cluster software to be installed and the occupied memory resources according to the actual number of concurrent users corresponding to the software type of the cluster software to be installed and the actually occupied memory resources.
In another aspect, the present application provides an apparatus comprising: at least one processor, and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus;
the processor is used for calling the program instructions in the memory so as to execute the memory resource allocation method.
In another aspect, the present application provides a storage medium, on which a program is stored, and the program is loaded by a processor and executed to implement the method for allocating memory resources described above.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
according to the method and the device provided by the embodiment of the application, the memory requirement models of different node numbers under different concurrent user numbers are constructed, the cluster software is subjected to multiple simulation tests, the running information of the installed software and the software simulation test result are combined to form a big data resource pool, the cluster software is predicted for the node number and the memory resource requirement from the perspective of the software type and the concurrent user number according to the big data resource pool, the memory resource required by the cluster software to be installed is reasonably distributed, and the contradiction between the cluster software running speed and the memory resource waste is balanced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a method for allocating memory resources according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an apparatus for allocating memory resources according to an embodiment of the present disclosure;
fig. 3 is a schematic view of an internal structure of an apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of a method for allocating memory resources according to an embodiment of the present disclosure, and as shown in fig. 1, the method includes:
s11, obtaining a big data resource pool, wherein the big data resource pool stores the corresponding relation between the software type of the cluster software, the number of concurrent users and the resource allocation mode of the cluster software, and the resource allocation mode is used for indicating the allocation of the memory resources on the node running the cluster software.
Specifically, the number of concurrent users in the embodiment of the present invention refers to the number of users interacting with the cluster software at the same time.
In this embodiment, a memory resource demand model is first created, and the model can predict memory resources required by certain types of cluster software. Software is classified according to characteristics of sample cluster software, for example, the software can be classified into calculation type software, resource consumption type software, high response type software and the like, when the sample cluster software is high response type software, for example, drawing type software, the data transmitted during the software running is more, complex calculation needs to be carried out, and high input/output speed is required, so that more memory resources are required.
Then installing and operating the sample cluster software in a memory resource demand model, respectively testing the total resource demand of the memory under the condition of different concurrent user quantities, and then determining a corresponding resource allocation mode: determining the number of the required nodes according to the total memory resource demand and the numerical proportion of occupied resources when the memory on each node is in a normal working state, for example, the memory utilization rate is between 60% and 70%, and further predicting the memory resources allocated to each node. And storing the prediction result obtained by each test to form a big data resource pool, and referring to the test result of the same type of software in the big data resource pool when the memory resource requirement of certain cluster software to be installed needs to be acquired subsequently.
And S12, acquiring the software type and the number of concurrent users of the cluster software to be installed.
Specifically, in the embodiment of the present invention, the number of concurrent users of the cluster software to be installed may be predicted according to the number of users of the cluster software to be installed and different operation stages of the cluster software to be installed, so as to obtain the number of concurrent users of the cluster software to be installed. The number of users to install the cluster software may be provided by an enterprise or an entity that will use the cluster software to be installed, for example, the number of employees in the entity is 300, and all employees in the entity use the cluster software to be installed, and at this time, it may be determined that the number of users to install the cluster software is 300. Of course, the number of users of the cluster software to be installed may also be obtained by prediction according to the applicable population of the cluster software to be installed, and the implementation manner of obtaining the number of users of the cluster software to be installed is not limited in the embodiment of the present invention.
Further, the number of concurrent users of the software may change in different operation stages, so that when the concurrent users of the software are predicted, the number of concurrent users of the software can be predicted more accurately by using the operation stage of the software as one of the reference factors.
For example, in some cases, the number of users to install cluster software in the embodiment of the present invention is not necessarily equal to the number of concurrent users to install cluster software, for example: the number of the users of the cluster software to be installed is 300 according to the number of the employees of the unit using the cluster software to be installed, but the unit implements a two-shift system, namely the operation time periods of the cluster software to be installed are different, the number of the workers in the two shifts is 150 respectively, and the number of the concurrent users of the cluster software to be installed is predicted on the basis of 150 persons and is not equal to the total number of the users of the cluster software to be installed, which is 300.
Because the predicted number of concurrent users is very close to the actual number of concurrent users, the purpose of the prediction is to find the distribution mode corresponding to a group of data in the big data resource pool, where the number of concurrent users is the closest to the actual number of concurrent users, for example, the distribution modes corresponding to only three numbers of concurrent users, namely 100, 150, and 200, in the big data resource pool, and the predicted number of concurrent users is 140, at this time, the distribution mode corresponding to 150 people in the big data resource pool needs to be used.
After acquiring the software type and the number of concurrent users of cluster software to be installed, determining the operating characteristics of the cluster software to be installed according to the software type of the cluster software to be installed, then determining whether the memory resource required by the cluster software to be installed is greater than a preset value under the condition of one concurrent user according to the operating characteristics of the cluster software to be installed, and finally configuring the memory size of a first node for operating the cluster software to be installed as the preset value if the memory resource required by the cluster software to be installed is less than or equal to the preset value under the condition of one concurrent user.
Specifically, the preset memory usage rate may be set to 60%, and if it is found that the memory resource required by the cluster software to be installed is less than 60% under the condition of one concurrent user, it is indicated that the cluster software does not consume software with a large memory resource, it is determined according to the characteristics of the software that even if there are many concurrent users, the cluster software to be installed does not need many memory resources, and at this time, the size of the memory usage value of the node of the cluster software to be installed is directly configured to be 60% of the total amount of the memory resources, so that the software operation speed can be ensured, the memory resource waste is not greatly wasted, and the step of acquiring data information from a large data resource pool can be skipped.
And S13, determining a first distribution mode corresponding to the software type and the number of concurrent users of the cluster software to be installed by using the big data resource pool.
Specifically, the memory resource allocation manner related to the cluster software to be installed may be searched according to the big data resource pool in the above embodiment, for example, whether there is memory resource allocation prediction information of the cluster software to be installed may be first searched in the big data resource pool, if there is memory resource allocation prediction information of the cluster software to be installed, the prediction allocation manner is used to allocate memory resources according to the number of concurrent users of the cluster software to be installed, and then adjustment is performed according to an actual allocation result; if not, firstly determining the type of the cluster software to be installed, then determining the same cluster software with the same software type as the cluster software to be installed by using a big data resource pool, allocating memory resources in the big data resource pool by using an allocation mode corresponding to the number of the concurrent users of the same cluster software with the number of the concurrent users of the same cluster software, and then adjusting according to the actual allocation result.
A plurality of lists are stored in the big data resource pool, where rows of the lists represent the number of concurrent users, columns of the lists represent the number of nodes (only one memory is in a default node in the list), each list represents a different cluster software type, and the content filled in the rows and columns is a memory requirement, where the memory requirement in this embodiment may be a memory proportion occupied when the cluster software is run, for example, the lists of software types a and b are shown in tables 1 and 2, respectively:
TABLE 1
Figure BDA0002297080760000081
TABLE 2
Figure BDA0002297080760000082
Wherein "- - -" in table 1 and table 2 indicates that the memory usage is too high to be tested, and the numerical value in the table, for example, 80% in the second row in table 1 indicates that when there are 10 concurrent users running the software of type a at the same time, the memory of 2 nodes is used to run the software, the resource occupied by each memory in the node when running the software is 80% (that is, the memory usage rate is 80%), generally, the highest threshold value occupied by the memory resource is 80%, and when the threshold value is exceeded, the number of memories needs to be increased.
In this embodiment, each node may be provided with one memory, each memory may be provided with a different upper limit of capacity, the size of the upper limit is related to the processing efficiency of the processor, and it is determined according to actual needs that if the processing efficiency of the processor is too low, even if each node allocates a large memory, although the proportion of occupied memory is small, the operation speed is not high, and memory resources are wasted; if the processing efficiency of the processor is high, a larger upper limit of the memory capacity needs to be allocated to ensure higher efficiency. As shown in tables 1 and 2, each node is provided with one memory, and the optimal state is to configure memories with different upper capacity limits so that the occupied proportion of each working memory is maintained at 60% -70%. It is seen from the above two tables that the memory resources required by different types of software are also different, the memory resource required by the software type a is more than that required by the software type b, and the more concurrent users occupy the more memory resources under the condition that the number of nodes is not changed.
After obtaining the memory resource configuration of the same type of software in the large data resource pool, before allocating the memory resource to the cluster software to be installed, a plurality of standby nodes can be set, the memory resource with the same size as that of the working node is configured in the standby nodes, when the memory in the working node is abnormal, the standby nodes can be used for storing the memory data in the abnormal node, replacing the abnormal node, continuing the unfinished work, and preventing the efficiency from being reduced due to insufficient memory in the running process of the software to be installed.
And S14, allocating the memory resource on the first node to the cluster software to be installed according to the first allocation mode, wherein the first node is a node for operating the cluster software to be installed.
Specifically, the number of required nodes is determined according to the software type of the cluster software to be installed and the number of concurrent users, and then the memory resources on each node are allocated to the cluster software to be installed according to the allocation mode. For example, 290 people in the first company need to simultaneously run the related software of the software type a, according to the data in table 1, it can be determined that the first company needs 15 to 20 nodes to simultaneously run the cluster software to enable each memory to be in a normal working state only by selecting a distribution mode in which the number of concurrent users in table 1 is 300, at this time, 18 nodes can be set, then 290 people simultaneously run the software through 18 nodes to obtain the proportion of memory occupation of each node, the obtained actual proportion of memory occupation is 63%, the preset range of 60% to 70% is reached, and the prediction result is accurate.
If the obtained actual memory occupation ratio is not in the range, modifying the number of the nodes according to the actual condition, updating the parameters of the demand model according to the difference between the modified result and the predicted result to enable the model prediction to be more accurate, and finally storing the modified result into a big data pool updating table 1.
The method in the embodiment predicts the number of nodes and the demand of the cluster software on the memory resource from the perspective of the software type and the number of concurrent users according to the big data resource pool, reasonably distributes the memory resource required by the cluster software to be installed, and balances the contradiction between the running speed of the cluster software and the waste of the memory resource.
Fig. 2 is a schematic diagram of an apparatus for allocating memory resources according to an embodiment of the present disclosure. As shown in fig. 2, the apparatus includes:
a sample data obtaining module 21, configured to obtain a big data resource pool, where a corresponding relationship between a software type of cluster software, a number of concurrent users, and a resource allocation manner of the cluster software is stored in the big data resource pool, and the resource allocation manner is used to instruct allocation of memory resources on a node running the cluster software;
the target data acquisition module 22 is used for acquiring the software type and the number of concurrent users of the cluster software to be installed;
the data processing module 23 is configured to determine, by using the big data resource pool, a first allocation manner corresponding to the software type and the number of concurrent users of the cluster software to be installed;
and a resource allocation module 24, configured to allocate a memory resource on a first node to the cluster software to be installed according to the first allocation manner, where the first node is a node that runs the cluster software to be installed.
The above-mentioned device still includes: and the data storage module 25 is configured to update the number of concurrent users and the occupied memory resources corresponding to the software type of the cluster software to be installed in the big data resource pool according to the actual number of concurrent users and the actually occupied memory resources corresponding to the software type of the cluster software to be installed.
Fig. 3 is a schematic view of an internal structure of an apparatus according to an embodiment of the present application.
The device for allocating the memory resources comprises a processor and a memory, wherein the sample data acquisition module, the target data acquisition module, the data processing module, the resource allocation module and the like are stored in the memory as program modules, and the processor executes the program modules stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more than one kernel can be set, and the contradiction between the cluster software running speed and the memory resource waste is balanced by adjusting kernel parameters.
An embodiment of the present invention provides a storage medium, on which a program is stored, where the program, when executed by a processor, implements the method for allocating memory resources.
The embodiment of the invention provides a processor, which is used for running a program, wherein the memory resource allocation method is executed when the program runs.
As shown in fig. 3, an embodiment of the present invention provides a device 70, where the device 70 includes at least one processor 701, at least one memory 702 connected to the processor, and a bus 703; the processor 701 and the memory 702 complete mutual communication through a bus 703; the processor 701 is configured to call the program instructions in the storage 702 to execute the method for allocating memory resources described above. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: a method for allocating memory resources comprises the following steps:
acquiring a big data resource pool, wherein the big data resource pool stores a corresponding relation between a software type of cluster software, the number of concurrent users and a resource allocation mode of the cluster software, and the resource allocation mode is used for indicating allocation of memory resources on a node running the cluster software;
acquiring the software type and the number of concurrent users of cluster software to be installed;
determining a first distribution mode corresponding to the software type and the number of concurrent users of the cluster software to be installed by using the big data resource pool;
and allocating memory resources on a first node to the cluster software to be installed according to the first allocation mode, wherein the first node is a node for running the cluster software to be installed.
Optionally, the step of determining, by using the big data resource pool, a first allocation manner corresponding to the software type and the number of concurrent users of the cluster software to be installed includes:
determining the same cluster software in the big data resource pool, wherein the same cluster software is the same as the cluster software to be installed in the big data resource pool in software type;
and determining the resource allocation mode corresponding to the condition that the number of the concurrent users of the similar cluster software is the number of the concurrent users of the cluster software to be installed as the first allocation mode according to the big data resource pool.
Optionally, the step of allocating the memory resource on the first node to the cluster software to be installed according to the first allocation manner includes:
determining the number of the first nodes according to the software type of the cluster software to be installed and the number of concurrent users;
and allocating the memory resource on each first node to the cluster software to be installed according to the first allocation mode.
Optionally, the step of obtaining the software type and the number of concurrent users of the cluster software to be installed includes:
and acquiring the total user number of the cluster software to be installed, and predicting the number of concurrent users using the cluster software to be installed in the current time period in all the users according to the total user number.
Optionally, after allocating the memory resource on the first node to the cluster software to be installed according to the first allocation formula, the method further includes:
acquiring the number of actual concurrent users and the actually occupied memory resources after the cluster software to be installed is installed;
and updating the number of concurrent users corresponding to the software type of the cluster software to be installed and the occupied memory resources in the big data resource pool according to the actual number of concurrent users corresponding to the software type of the cluster software to be installed and the actually occupied memory resources.
Optionally, before allocating the memory resource on the first node to the cluster software to be installed according to the first allocation formula, the method further includes:
and setting a plurality of standby nodes, and allocating the memory resources of the standby nodes to the cluster software to be installed when the memory resources on the first node are abnormal in the running process of the cluster software to be installed.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for allocating memory resources, comprising:
acquiring a big data resource pool, wherein the big data resource pool stores a corresponding relation between a software type of cluster software, the number of concurrent users and a resource allocation mode of the cluster software, and the resource allocation mode is used for indicating allocation of memory resources on a node running the cluster software;
acquiring the software type and the number of concurrent users of cluster software to be installed;
determining a first distribution mode corresponding to the software type and the number of concurrent users of the cluster software to be installed by using the big data resource pool;
and allocating memory resources on a first node to the cluster software to be installed according to the first allocation mode, wherein the first node is a node for running the cluster software to be installed.
2. The method according to claim 1, wherein the step of determining a first allocation manner corresponding to the software type and the number of concurrent users of the cluster software to be installed by using the big data resource pool comprises:
determining the same cluster software in the big data resource pool, wherein the same cluster software is the same as the cluster software to be installed in the big data resource pool in software type;
and determining the resource allocation mode corresponding to the condition that the number of the concurrent users of the similar cluster software is the number of the concurrent users of the cluster software to be installed as the first allocation mode according to the big data resource pool.
3. The method according to claim 1, wherein the step of allocating the memory resource on the first node to the cluster software to be installed according to the first allocation manner comprises:
determining the number of the first nodes according to the software type of the cluster software to be installed and the number of concurrent users;
and allocating the memory resource on each first node to the cluster software to be installed according to the first allocation mode.
4. The method according to claim 1, wherein the step of obtaining the software type and the number of concurrent users of the cluster software to be installed comprises:
and acquiring the total user number of the cluster software to be installed, and predicting the number of concurrent users using the cluster software to be installed in the current time period in all the users according to the total user number.
5. The method of claim 1, wherein after allocating memory resources on the first node to the cluster software to be installed according to the first allocation formula, the method further comprises:
acquiring the number of actual concurrent users and the actually occupied memory resources after the cluster software to be installed is installed;
and updating the number of concurrent users corresponding to the software type of the cluster software to be installed and the occupied memory resources in the big data resource pool according to the actual number of concurrent users corresponding to the software type of the cluster software to be installed and the actually occupied memory resources.
6. The method of claim 1, wherein before allocating memory resources on the first node to the cluster software to be installed according to the first allocation formula, the method further comprises:
and setting a plurality of standby nodes, and when the memory resource on the first node is abnormal in the running process of the cluster software to be installed, allocating the memory resource of the standby node to the cluster software to be installed.
7. An apparatus for allocating memory resources, comprising:
the system comprises a sample data acquisition module, a data processing module and a data processing module, wherein the sample data acquisition module is used for acquiring a big data resource pool, the big data resource pool stores the corresponding relation between the software type of cluster software, the quantity of concurrent users and the resource allocation mode of the cluster software, and the resource allocation mode is used for indicating the allocation of memory resources on nodes running the cluster software;
the target data acquisition module is used for acquiring the software type and the number of concurrent users of the cluster software to be installed;
the data processing module is used for determining a first distribution mode corresponding to the software type and the number of concurrent users of the cluster software to be installed by utilizing the big data resource pool;
and the resource allocation module is used for allocating memory resources on a first node to the cluster software to be installed according to the first allocation mode, wherein the first node is a node for operating the cluster software to be installed.
8. The apparatus of claim 7, further comprising: and the data storage module is used for updating the number of concurrent users corresponding to the software type of the cluster software to be installed and the occupied memory resources according to the actual number of concurrent users corresponding to the software type of the cluster software to be installed and the actually occupied memory resources.
9. An apparatus, comprising: at least one processor, and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to call program instructions in the memory to perform the method of allocating memory resources of any one of claims 1 to 6.
10. A storage medium having a program stored thereon, wherein the program, when loaded and executed by a processor, implements the method of allocating memory resources of any one of claims 1-6.
CN201911206680.1A 2019-11-29 2019-11-29 Memory resource allocation method, device and equipment Pending CN112882824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911206680.1A CN112882824A (en) 2019-11-29 2019-11-29 Memory resource allocation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911206680.1A CN112882824A (en) 2019-11-29 2019-11-29 Memory resource allocation method, device and equipment

Publications (1)

Publication Number Publication Date
CN112882824A true CN112882824A (en) 2021-06-01

Family

ID=76039681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911206680.1A Pending CN112882824A (en) 2019-11-29 2019-11-29 Memory resource allocation method, device and equipment

Country Status (1)

Country Link
CN (1) CN112882824A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092699A (en) * 2013-01-10 2013-05-08 中国南方电网有限责任公司超高压输电公司 Cloud computing resource pre-distribution achievement method
CN104281496A (en) * 2014-10-27 2015-01-14 深圳中兴网信科技有限公司 Virtual resource distribution method and virtual resource distribution device
CN106487854A (en) * 2015-08-31 2017-03-08 株式会社日立制作所 Storage resource distribution method, device and system
WO2017133351A1 (en) * 2016-02-05 2017-08-10 华为技术有限公司 Resource allocation method and resource manager
US20190205173A1 (en) * 2018-01-02 2019-07-04 Jpmorgan Chase Bank, N.A. Systems and methods for resource management for multi-tenant applications in a hadoop cluster

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092699A (en) * 2013-01-10 2013-05-08 中国南方电网有限责任公司超高压输电公司 Cloud computing resource pre-distribution achievement method
CN104281496A (en) * 2014-10-27 2015-01-14 深圳中兴网信科技有限公司 Virtual resource distribution method and virtual resource distribution device
CN106487854A (en) * 2015-08-31 2017-03-08 株式会社日立制作所 Storage resource distribution method, device and system
WO2017133351A1 (en) * 2016-02-05 2017-08-10 华为技术有限公司 Resource allocation method and resource manager
US20190205173A1 (en) * 2018-01-02 2019-07-04 Jpmorgan Chase Bank, N.A. Systems and methods for resource management for multi-tenant applications in a hadoop cluster

Similar Documents

Publication Publication Date Title
CN107968810B (en) Resource scheduling method, device and system for server cluster
CN111078363B (en) NUMA node scheduling method, device, equipment and medium of virtual machine
CN107295090B (en) Resource scheduling method and device
CN107124472A (en) Load-balancing method and device, computer-readable recording medium
CN109739627B (en) Task scheduling method, electronic device and medium
CN109413147B (en) Service node management method, device, equipment and computer readable storage medium
CN111309440B (en) Method and equipment for managing and scheduling multiple types of GPUs
CN110928638A (en) Method and device for selecting host machine for virtual machine deployment
CN110737717B (en) Database migration method and device
CN114844791B (en) Cloud service automatic management and distribution method and system based on big data and storage medium
CN115421924A (en) Memory allocation method, device and equipment
CN107203256B (en) Energy-saving distribution method and device under network function virtualization scene
CN109788013B (en) Method, device and equipment for distributing operation resources in distributed system
CN117519929A (en) Example scheduling method and device, storage medium and electronic equipment
CN116820729A (en) Offline task scheduling method and device and electronic equipment
CN111400032A (en) Resource allocation method and device
CN112882824A (en) Memory resource allocation method, device and equipment
CN115994029A (en) Container resource scheduling method and device
CN112882821A (en) Method, device and equipment for allocating processor resources
CN115794305A (en) Virtual machine memory adjusting method and device, storage medium and electronic device
CN112882825A (en) Method, device and equipment for allocating storage resources
CN115328608A (en) Kubernetes container vertical expansion adjusting method and device
CN114253663A (en) Virtual machine resource scheduling method and device
CN115878303A (en) Resource scheduling method and device and electronic equipment
CN113568746A (en) Load balancing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination