A method and device for configuring memory
By predicting the memory requirements of the software under different numbers of concurrent users and accurately configuring the cloud device, the problem of insufficient or excessive memory configuration on the cloud server is solved, and the normal operation of the software and resource optimization are achieved.
Patent Information
- Application Number
- CN201910734565.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-09
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-08-09
AI Technical Summary
On cloud servers, the memory requirements of software vary greatly in different running states. As a result, the memory size configured in the existing general template cannot meet the needs, which may cause the software to run slowly or waste resources.
By obtaining the memory requirements of the software to be installed under different numbers of concurrent users, predicting the resource requirements, and configuring the memory of the cloud device according to actual needs, to avoid the problem of too large or too small memory configuration.
Ensure that the software runs normally with sufficient memory, while avoiding waste of memory resources and achieving accurate matching of memory configurations.
Smart Images

Figure CN112346850B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a memory method and device. Background Art
[0002] Elastic Compute Service (ECS) is a simple, efficient, secure, reliable, and elastically scalable computing service. With ECS, users can quickly create or release any number of cloud servers without purchasing hardware. Therefore, ECS has gradually replaced traditional servers created by physical machines and become the mainstream development target of servers.
[0003] At present, when installing stand-alone software on a cloud server, the memory of the cloud server is generally configured according to a general template. In order to have enough memory to ensure the normal operation of the software and not waste memory resources, the memory size in the general template is usually set to a moderate value. However, due to the differences in the operating characteristics of each software and the number of concurrent users, the software's memory requirements in different operating states vary greatly. For software that requires more memory, if the cloud server's memory is configured according to a general template, the memory size cannot meet the software's memory requirements, and then there may be problems such as slow software running speed, no response, and other problems that cannot be verified to run normally. For software that requires less memory, if the cloud server's memory size is configured according to a general template, the configured memory will be much larger than the software's memory requirements, resulting in a waste of resources. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and apparatus for configuring memory, which are used to ensure that there is enough memory to ensure normal operation of software while avoiding wasting memory resources.
[0005] In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a method for configuring a memory, comprising:
[0007] Get the memory resources required by the software to be installed under different numbers of concurrent users;
[0008] Obtaining the number of concurrent users of the software to be installed;
[0009] Predicting the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users;
[0010] The memory of the cloud device where the software to be installed is installed is configured according to the memory resources required by the software to be installed.
[0011] As an optional implementation of the embodiment of the present invention, before obtaining the memory resources required by the software to be installed under different numbers of concurrent users, the method further includes:
[0012] Determine, according to the running characteristics of the software to be installed, whether the memory resources required by the software to be installed are greater than a threshold value when the number of concurrent users is a first preset value;
[0013] If the number of concurrent users is the first preset value, and the memory resources required by the software to be installed are less than or equal to the threshold, the size of the memory of the cloud device on which the software to be installed is installed is configured to be the second preset value.
[0014] As an optional implementation of the embodiment of the present invention, the obtaining of memory resources required by the software to be installed under different numbers of concurrent users includes:
[0015] Obtaining the running information of the software to be installed after installation to form a big data resource pool;
[0016] The memory resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.
[0017] As an optional implementation of the embodiment of the present invention, the obtaining of memory resources required by the software to be installed under different numbers of concurrent users includes:
[0018] Obtaining the running information of the software to be installed in the test environment to form a big data resource pool;
[0019] The memory resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.
[0020] As an optional implementation of the embodiment of the present invention, the obtaining of memory resources required by the software to be installed under different numbers of concurrent users includes:
[0021] Obtaining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment;
[0022] Combining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment, forming a big data resource pool;
[0023] The memory resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.
[0024] As an optional implementation of the embodiment of the present invention, obtaining the number of concurrent users of the software to be installed includes:
[0025] The number of concurrent users of the software to be installed is predicted according to the number of users of the software to be installed and the running stage of the software to be installed, so as to obtain the number of concurrent users of the software to be installed.
[0026] In a second aspect, an embodiment of the present invention provides a device for configuring a memory, comprising:
[0027] A demand acquisition unit, used to acquire the memory resources required by the software to be installed under different numbers of concurrent users;
[0028] A quantity acquisition unit, used to acquire the number of concurrent users of the software to be installed;
[0029] A prediction unit, configured to predict the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users;
[0030] The configuration unit is used to configure the memory of the cloud device where the software to be installed is installed according to the memory resources required by the software to be installed.
[0031] As an optional implementation of the embodiment of the present invention, the device further includes:
[0032] a determination unit, configured to determine, according to the running characteristics of the software to be installed, whether the memory resources required by the software to be installed are greater than a threshold value when the number of concurrent users is a first preset value;
[0033] The configuration unit is further configured to configure the memory size of the cloud device on which the software to be installed is installed to a second preset value when the concurrent users are the first preset value and the memory resources required by the software to be installed are less than or equal to the threshold.
[0034] As an optional implementation of the present invention, the demand acquisition unit is specifically used to obtain the running information of the software to be installed after installation to form a big data resource pool; and obtain the memory resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.
[0035] As an optional implementation of the present invention, the demand acquisition unit is specifically used to obtain the running information of the software to be installed in the test environment to form a big data resource pool; and obtain the memory resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.
[0036] As an optional implementation of an embodiment of the present invention, the demand acquisition unit is specifically used to obtain the running information of the software to be installed after installation and the running information of the software to be installed in a test environment; combine the running information of the software to be installed after installation and the running information of the software to be installed in the test environment to form a big data resource pool; obtain the memory resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.
[0037] As an optional implementation of the embodiment of the present invention, the quantity acquisition unit is specifically used to predict the number of concurrent users of the software to be installed according to the number of users of the software to be installed and the running stage of the software to be installed, and acquire the number of concurrent users of the software to be installed.
[0038] In a third aspect, an embodiment of the present invention provides a device for configuring memory, comprising: a memory and a processor, the memory being used to store a computer program; the processor being used to execute the method for configuring memory described in the first aspect or any one of the embodiments of the first aspect when calling the computer program.
[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for configuring memory described in the first aspect or any embodiment of the first aspect.
[0040] The method for configuring memory provided in the embodiment of the present invention first obtains the memory resources required by the software to be installed under different numbers of concurrent users and the number of concurrent users of the software to be installed, then predicts the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users, and finally configures the memory of the cloud device where the software to be installed is installed according to the memory resources required by the software to be installed. Since the method for configuring memory provided in the embodiment of the present invention can predict the memory resources actually required by the software to be installed and configure the memory of the cloud device where the software to be installed is installed based on the memory resources actually required by the software to be installed, the memory configured for the cloud device can be adapted to the memory requirement of the software to be installed, and the problem of too large or too small memory configured for the cloud device will not occur. Therefore, the method for configuring memory provided in the embodiment of the present invention can avoid wasting memory resources while ensuring that there is enough memory to ensure the normal operation of the software. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 One of the flowcharts of the method for configuring memory provided by an embodiment of the present invention;
[0042] Figure 2A second flowchart of a method for configuring memory provided in an embodiment of the present invention;
[0043] Figure 3 One of the structural schematic diagrams of the device for configuring memory provided by an embodiment of the present invention;
[0044] Figure 4 A second structural diagram of a device for configuring memory provided in an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the hardware structure of a device for configuring memory provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in a formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. If not specified, "multiple" in this article refers to two or more.
[0048] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish between the same items or similar items with basically the same functions or effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order.
[0049] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the embodiments of the present invention, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0050] The execution subject of the method for configuring memory provided in the embodiment of the present invention may be a device for configuring memory. The specific device for configuring memory may be a terminal device such as a mobile phone, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a smart watch, a smart bracelet, etc., or the device for configuring memory may also be other types of electronic devices, which is not limited in the embodiments of the present application.
[0051] The embodiment of the present invention provides a method for configuring memory. Specifically, refer to Figure 1 As shown, the method for configuring memory may include the following steps:
[0052] S11. Obtain memory resources required by the software to be installed under different numbers of concurrent users.
[0053] Specifically, the number of concurrent users in the embodiment of the present invention refers to the number of users who interact with the software to be installed at the same time.
[0054] As an optional implementation of the embodiment of the present invention, the implementation of the above step S11 (obtaining the memory resources required by the software to be installed under different numbers of concurrent users) may include the following steps a and b.
[0055] Step a: obtaining the running information of the software to be installed after installation to form a big data resource pool.
[0056] Step b: obtaining the memory resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool.
[0057] Specifically, the running information of the software to be installed after installation includes: the number of concurrent users and the memory resources occupied when the software to be installed is running; based on multiple running information of multiple software to be installed, the corresponding relationship between different numbers of concurrent users of the software to be installed and the required memory resources can be determined, and then the corresponding relationship between different numbers of concurrent users of the software to be installed and the required memory resources can be combined into a big data resource pool.
[0058] As an optional implementation of the embodiment of the present invention, the implementation of the above step S11 (obtaining the memory resources required by the software to be installed under different numbers of concurrent users) may include the following steps I and II.
[0059] Step I: Obtain the running information of the software to be installed in the test environment to form a big data resource pool.
[0060] Specifically, in a test environment, the number of concurrent users can be set arbitrarily to read the memory resources occupied by the software to be installed under different concurrent users. For example, the number of concurrent users can be set to 10, 50, 100, 150 to obtain the memory resources occupied by the software to be installed when the number of concurrent users is 10, 50, 100, 150.
[0061] Step II: Obtain the memory resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool.
[0062] Similarly, the running information of the software to be installed in the test environment includes: the number of concurrent users and the memory resources occupied when the software to be installed is running; by obtaining the running information in multiple test environments, the correspondence between the different numbers of concurrent users of the software to be installed and the required memory resources can be determined, and then the correspondence between the different numbers of concurrent users of the software to be installed and the required memory resources can be combined into a big data resource pool.
[0063] As an optional implementation of the embodiment of the present invention, the implementation of the above step S11 (obtaining the memory resources required by the software to be installed under different numbers of concurrent users) may include the following steps 1) and 4).
[0064] 1) Obtaining the running information of the software to be installed after installation.
[0065] 2) Obtaining the running information of the software to be installed in the test environment.
[0066] 3) Combining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment, a big data resource pool is formed.
[0067] Specifically, a big data resource pool is formed by combining the running information of the software to be installed after installation and the running information of the software to be installed in a test environment, including the following situations:
[0068] 1. The operation information after installation does not include the memory resources required by the software to be installed when the number of concurrent users is x; in the test environment, when the number of concurrent users is x, the memory resources occupied by the software to be installed are M, then the memory resources required by the software to be installed in the big data resource pool when the number of concurrent users is x is M.
[0069] 2. The operation information after installation includes that the memory resources occupied by the software to be installed when the number of concurrent users is y is N; the operation information in the test environment does not include the memory resources occupied by the software to be installed when the number of concurrent users is y, so the memory resources required by the software to be installed in the big data resource pool when the number of concurrent users is y is N.
[0070] 3. The running information of the software to be installed after installation includes that the memory resources occupied by the software to be installed when the number of concurrent users is z is P; in a test environment, when the number of concurrent users is z, the memory resources occupied by the software to be installed is Q, then the memory resources required when the number of concurrent users of the software to be installed in the big data resource pool is y can be (P+Q) / 2, or a*P+b*Q; wherein a and b are constants greater than 0 and less than 1, and a+b=1.
[0071] 4) Obtaining memory resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.
[0072] S12: Obtain the number of concurrent users of the software to be installed.
[0073] That is, obtain the number of users who interact with the software to be installed at the same time.
[0074] As an optional implementation mode of the embodiment of the present invention, the above step S12 (obtaining the number of concurrent users of the software to be installed) may include:
[0075] The number of concurrent users of the software to be installed is predicted according to the number of users of the software to be installed and the running stage of the software to be installed, so as to obtain the number of concurrent users of the software to be installed.
[0076] Specifically, the number of users of the software to be installed can be provided by the enterprise or unit that will use the software to be installed. For example, if the user of the software to be installed is a certain unit, the number of employees of the unit is 300, and all employees of the unit will use the software to be installed, then the number of users of the software to be installed can be determined to be 300. Of course, the number of users of the software to be installed can also be predicted and obtained based on the applicable population of the software to be installed, etc., and the implementation method for obtaining the number of users of the software to be installed is not limited in the embodiment of the present invention.
[0077] Furthermore, the number of concurrent users may change at different stages of software operation. Therefore, when predicting the concurrent users of the software, taking the software operation stage as a reference factor can more accurately predict the number of concurrent users of the software.
[0078] It should be noted that, in some cases, the number of users of the software to be installed in the embodiments of the present invention is not equal to the number of concurrent users of the software to be installed. For example, the number of users of the software to be installed is determined to be 300 based on the number of employees in the unit who use the software to be installed. However, the unit implements a two-shift system with 150 employees in each shift. At this time, the number of concurrent users of the software to be installed should be predicted based on 150 people, which is not equal to the number of users of the software to be installed, 300.
[0079] S13: predicting the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users.
[0080] For example, the memory resources required by the software to be installed in step S11 under different numbers of concurrent users are shown in Table 1 below:
[0081] Table 1
[0082] Number of concurrent users Memory requirements 10 1 50 4 100 8 150 16 200 16 300 32 1000 64
[0083] The number of concurrent users of the software to be installed obtained in step S12 is 100, and the memory resources required by the software to be installed are predicted to be 8 units of memory resources.
[0084] S14: configuring the memory of the cloud device where the software to be installed is installed according to the memory resources required by the software to be installed.
[0085] It should be noted that the memory of the cloud device on which the software to be installed is installed is configured according to the memory resources required by the software to be installed. The size of the memory of the cloud device on which the software to be installed is configured to be equal to the memory resources required by the software to be installed, or the difference between the size of the memory of the cloud device on which the software to be installed is configured and the memory resources required by the software to be installed is within a certain range.
[0086] The method for configuring memory provided in the embodiment of the present invention first obtains the memory resources required by the software to be installed under different numbers of concurrent users and the number of concurrent users of the software to be installed, then predicts the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users, and finally configures the memory of the cloud device where the software to be installed is installed according to the memory resources required by the software to be installed. Since the method for configuring memory provided in the embodiment of the present invention can predict the memory resources actually required by the software to be installed and configure the memory of the cloud device where the software to be installed is installed based on the memory resources actually required by the software to be installed, the memory configured for the cloud device can be adapted to the memory requirement of the software to be installed, and the problem of too large or too small memory configured for the cloud device will not occur. Therefore, the method for configuring memory provided in the embodiment of the present invention can avoid wasting memory resources while ensuring that there is enough memory to ensure the normal operation of the software.
[0087] As an optional implementation of the embodiment of the present invention, refer to Figure 2As shown, before the above step S11 (obtaining the memory resources required by the software to be installed under different numbers of concurrent users), the method for configuring memory provided by the embodiment of the present invention further includes:
[0088] S21. Determine, according to the running characteristics of the software to be installed, whether the memory resources required by the software to be installed is greater than a threshold when the number of concurrent users is a first preset value.
[0089] Exemplarily, the first preset value may be 1.
[0090] Specifically, the running characteristics of the software to be installed may include: the software's requirements for response speed, the software's computing volume, the number of parallel processes, etc. For example, if the software to be installed requires a fast response speed and a large amount of computing volume during operation, it can be determined that the memory resources required by the software to be installed are less than a threshold; for another example, if the software to be installed requires a low response speed and a small amount of computing volume during operation, it can be determined that the memory resources required by the software to be installed are less than a threshold.
[0091] Exemplarily, the threshold value may be set to one thousandth or one ten-thousandth of the memory resources of one unit of memory.
[0092] In the above step S21, if the memory resources required by the software to be installed are less than or equal to the threshold when the concurrent users are the first preset value, execute the following step S22; if the memory resources required by the software to be installed are greater than the threshold when the concurrent users are the first preset value, execute the above steps S11 to S14.
[0093] S22: configuring the memory size of the cloud device on which the software to be installed is installed to be a second preset value.
[0094] Specifically, the threshold and preset value in the embodiment of the present invention can be set according to the estimated number of concurrent users and the memory resources contained in 1 unit of memory when the CPU is configured. For example: if the estimated number of concurrent users is 500 and the memory resources contained in 1 unit of memory are 1024, the threshold can be set to 10 and the second preset value can be set to 1024; for another example: if the estimated number of concurrent users is 3500 and the memory resources contained in 1 unit of memory are 2048, the threshold can be set to 5 and the second preset value can be set to 2048. That is, if 1 unit of memory can meet the memory requirements of the software to be installed when there are the most concurrent users, the memory of the software to be installed can be directly configured as 1 unit of memory.
[0095] In the above embodiment, it is first determined whether the memory resources required by the software to be installed when the number of concurrent users is a first preset value is greater than a threshold value based on the running characteristics of the software to be installed; if the memory resources required by the software to be installed when the number of concurrent users is the first preset value is less than or equal to the threshold value, the memory size of the cloud device on which the software to be installed is installed is directly configured to a second preset value; if the memory resources required by the software to be installed when the number of concurrent users is the first preset value is less than or equal to the threshold value, a small amount of memory resources can meet the memory demand of the software to be installed when the number of concurrent users is the largest. At this time, the memory size of the cloud device of the software to be installed is directly configured to the second preset value, which can avoid executing steps such as obtaining the memory resources required by the software to be installed when the number of concurrent users is different and obtaining the number of concurrent users of the software to be installed, while ensuring the running speed of the software and not wasting a lot of memory resources, thereby simplifying the method flow of configuring memory.
[0096] The embodiment of the present application can divide the functional modules of the terminal device etc. according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0097] In the case of integrated units, Figure 3 A possible structural diagram of a device for configuring memory involved in the above embodiment is shown, and the device for configuring memory 300 includes:
[0098] A demand acquisition unit 31 is used to acquire the memory resources required by the software to be installed under different numbers of concurrent users;
[0099] A quantity acquisition unit 32 is used to acquire the number of concurrent users of the software to be installed;
[0100] A prediction unit 33, configured to predict the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users;
[0101] The configuration unit 34 is used to configure the memory of the cloud device where the software to be installed is installed according to the memory resources required by the software to be installed.
[0102] As an optional embodiment of the present invention, refer to Figure 4 As shown, the memory configuration device 300 further includes:
[0103] A determination unit 35, configured to determine, according to the running characteristics of the software to be installed, whether the memory resources required by the software to be installed are greater than a threshold value when the number of concurrent users is a first preset value;
[0104] The configuration unit 34 is further configured to configure the memory size of the cloud device on which the software to be installed is installed to a second preset value when the concurrent users are the first preset value and the memory resources required by the software to be installed are less than or equal to the threshold.
[0105] As an optional implementation method of the embodiment of the present invention, the demand acquisition unit 31 is specifically used to obtain the running information of the software to be installed after installation to form a big data resource pool; and obtain the memory resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.
[0106] As an optional implementation method of the embodiment of the present invention, the demand acquisition unit 31 is specifically used to obtain the operation information of the software to be installed in the test environment to form a big data resource pool; and obtain the memory resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.
[0107] As an optional implementation method of the embodiment of the present invention, the demand acquisition unit 31 is specifically used to obtain the running information of the software to be installed after installation and the running information of the software to be installed in a test environment; combine the running information of the software to be installed after installation and the running information of the software to be installed in the test environment to form a big data resource pool; obtain the memory resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.
[0108] As an optional implementation mode of the embodiment of the present invention, the quantity acquisition unit 32 is specifically used to predict the number of concurrent users of the software to be installed according to the number of users of the software to be installed and the running stage of the software to be installed, and obtain the number of concurrent users of the software to be installed.
[0109] The device for configuring memory provided in the embodiment of the present invention includes: a demand acquisition unit, a quantity acquisition unit, a prediction unit and a configuration unit; wherein the demand acquisition unit can obtain the memory resources required by the software to be installed under different numbers of concurrent users, the quantity acquisition unit can obtain the number of concurrent users of the software to be installed, the prediction unit can predict the memory resources required by the software to be installed based on the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users, and the configuration unit can configure the memory of the cloud device where the software to be installed is installed based on the memory resources required by the software to be installed. Since the device for configuring memory provided in the embodiment of the present invention can predict the memory resources actually required by the software to be installed, and configure the memory of the cloud device where the software to be installed is installed based on the memory resources actually required by the software to be installed, the memory configured for the cloud device can be adapted to the memory demand of the software to be installed, and the problem of too large or too small memory configured for the cloud device will not occur. Therefore, the device for configuring memory provided in the embodiment of the present invention can have enough memory to ensure the normal operation of the software while avoiding wasting memory resources.
[0110] Based on the same inventive concept, an embodiment of the present invention further provides a device for configuring memory. Figure 5 A schematic diagram of the structure of a device for configuring memory provided by an embodiment of the present invention, such as Figure 5 As shown, the device for configuring memory provided in this embodiment includes: a memory 51 and a processor 52, the memory 51 is used to store computer programs; the processor 52 is used to execute the method for configuring memory described in the above method embodiment when calling the computer program.
[0111] The device for configuring memory provided in this embodiment can execute the method for configuring memory provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0112] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for configuring memory described in the above method embodiment is implemented.
[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0114] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0115] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile disk, such as read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0116] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, memory storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for configuring memory, characterized in that: include: Get the memory resources required by the software to be installed under different numbers of concurrent users; Obtaining the number of concurrent users of the software to be installed; Predicting the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users; The memory of the cloud device where the software to be installed is installed is configured according to the memory resources required by the software to be installed; wherein, The step of obtaining the memory resources required by the software to be installed under different numbers of concurrent users includes: Obtaining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment; Combining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment, forming a big data resource pool; Obtaining memory resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool; The obtaining the number of concurrent users of the software to be installed includes: The number of concurrent users of the software to be installed is predicted according to the number of users of the software to be installed and the running stage of the software to be installed, so as to obtain the number of concurrent users of the software to be installed.
2. The method according to claim 1, characterized in that Before obtaining the memory resources required by the software to be installed under different numbers of concurrent users, the method further includes: Determining, according to the running characteristics of the software to be installed, whether the memory resources required by the software to be installed is greater than a threshold when the number of concurrent users is a first preset value; If the memory resources required by the software to be installed are less than or equal to the threshold when the number of concurrent users is the first preset value, the size of the memory of the cloud device on which the software to be installed is installed is configured to be the second preset value.
3. The method according to claim 1, characterized in that The step of obtaining the memory resources required by the software to be installed under different numbers of concurrent users includes: Obtaining the running information of the software to be installed after installation to form a big data resource pool; The memory resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.
4. The method according to claim 1, characterized in that: The step of obtaining the memory resources required by the software to be installed under different numbers of concurrent users includes: Obtaining the running information of the software to be installed in the test environment to form a big data resource pool; The memory resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.
5. A device for configuring memory, characterized in that: include: A demand acquisition unit, used to acquire the memory resources required by the software to be installed under different numbers of concurrent users; A quantity acquisition unit, used to acquire the number of concurrent users of the software to be installed; A prediction unit, configured to predict the memory resources required by the software to be installed according to the number of concurrent users of the software to be installed and the memory resources required by the software to be installed under different numbers of concurrent users; A configuration unit is used to configure the memory of the cloud device where the software to be installed is installed according to the memory resources required by the software to be installed; wherein, The demand acquisition unit is specifically used to acquire the running information of the software to be installed after installation and the running information of the software to be installed in the test environment; combine the running information of the software to be installed after installation and the running information of the software to be installed in the test environment to form a big data resource pool; acquire the memory resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool; The quantity acquisition unit is specifically used to predict the number of concurrent users of the software to be installed according to the number of users of the software to be installed and the running stage of the software to be installed, and acquire the number of concurrent users of the software to be installed.
6. The device according to claim 5, characterized in that The device also includes: a determining unit, configured to determine, according to the running characteristics of the software to be installed, whether the memory resources required by the software to be installed are greater than a threshold value when the number of concurrent users is a first preset value; The configuration unit is further configured to configure the memory size of the cloud device on which the software to be installed is installed to a second preset value when the concurrent users are the first preset value and the memory resources required by the software to be installed are less than or equal to the threshold.
7. A device for configuring memory, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; The processor is used to execute the method for configuring memory as described in any one of claims 1 to 4 when calling the computer program.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for configuring memory as described in any one of claims 1 to 4 is implemented.
