Configuration information acquisition method and device, storage medium and electronic device
By obtaining the configuration parameters and memory amount of the target node, the memory configuration of the component is automatically determined, which solves the problem of long component configuration and high labor consumption, improves the configuration efficiency and simplifies the process.
Patent Information
- Application Number
- CN202011025512.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2040-09-25
AI Technical Summary
In the prior art, the component configuration method has problems such as long configuration and high human resources consumption.
By obtaining the target node configuration parameters of the target node, the first available memory amount of the target node is determined, and the memory configuration information of the component is determined based on the memory amount.
It reduces configuration time and human resource consumption, improves the efficiency of memory configuration, and simplifies the complexity of memory configuration.
Smart Images

Figure CN112181651B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of the Internet, and in particular to a method and device for acquiring configuration information, a storage medium, and an electronic device. Background Art
[0002] Currently, components can be installed based on the big data platform, and a component can be installed on multiple nodes of the big data platform. For example, a component needs to be deployed on five nodes of the big data platform, and the configuration on each node is the same, that is, the same memory is occupied.
[0003] The configuration of nodes that make up the cluster is becoming more and more diverse, for example, high-performance computing nodes that focus on computing, and large-capacity storage nodes that focus on storage. The differences in these node configurations and the differences in node memory for different components make Ambari memory configuration complicated. Ambari memory configuration refers to: the amount of memory that the configuration component occupies on each node in the node cluster or node group. If the memory configuration is too low, it may lead to low component execution efficiency or even component startup failure; if the memory configuration is too high, it may lead to competition between resources or even cause the system to freeze.
[0004] There are generally two ways to configure and use resources of different nodes in related technologies:
[0005] Method 1: Through a large number of benchmark tests, we can find the reasonable configuration of a certain model of node (the amount of memory occupied by the configuration components on the node) to maximize the computing performance of the cluster.
[0006] Method 2: During use, continuously optimize the cluster configuration (the amount of memory occupied by the configuration components on the nodes in the cluster) based on experience, thereby gradually improving the performance of the cluster.
[0007] For method 1, benchmark testing requires a lot of time and manpower to obtain the optimal configuration of a model node. For the configuration of each new model node, corresponding benchmark testing is required to obtain a reasonable configuration.
[0008] For the second method, experienced personnel are required to configure the cluster, and it requires long-term optimization. Once the cluster configuration is unreasonable, it is easy to cause a component of the cluster, or even the entire cluster to operate abnormally, thus affecting existing business.
[0009] Therefore, the component configuration method in the related art has the problem of long configuration time and high consumption of human resources. Summary of the invention
[0010] The present application provides a method and device for obtaining configuration information, a storage medium and an electronic device, so as to at least solve the problem of long configuration time and high human resource consumption in the component configuration method in the related art.
[0011] According to one aspect of an embodiment of the present application, a method for obtaining configuration information is provided, including: obtaining target node configuration parameters of a target node, wherein the target node configuration parameters include a first configuration parameter for determining a first amount of available memory of the target node; determining the first amount of available memory of the target node according to the target node configuration parameters; determining first memory configuration information of a first component according to the first amount of available memory, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
[0012] Optionally, obtaining the node configuration parameters of the target node includes: using a target node identifier of the target node to match the target node configuration parameters corresponding to the target node identifier from a target database, wherein the target database is used to store the correspondence between node identifiers and node configuration parameters.
[0013] Optionally, determining the first available memory amount of the target node based on the target node configuration parameters includes: using the target node identifier to match the target reserved memory amount corresponding to the target node identifier from a reserved memory comparison table when the first configuration parameter is used to indicate the target memory amount of the target node, wherein the reserved memory comparison table is used to represent the correspondence between the node identifier and the reserved memory amount; and determining the first available memory amount of the target node based on the target memory amount and the target reserved memory amount.
[0014] Optionally, determining the first memory configuration information of the first component based on the first available memory amount includes: when the target node includes multiple virtual processors, determining a second number of available containers on the target node based on a first number of the multiple virtual processors, wherein the second number is less than the first number, and each of the available containers corresponds to one virtual processor; determining a second amount of available memory on each of the available containers based on the first available memory amount and the second number; and determining the first memory configuration information of the first component based on the second amount of available memory.
[0015] Optionally, determining the first memory configuration information of the first component based on the second available memory amount includes: determining the first memory configuration information of the first component according to the correspondence between the memory usage of the first component on the target node and the second available memory amount.
[0016] Optionally, according to the correspondence between the memory usage of the first component on the target node and the second available memory, determining the first memory configuration information of the first component includes at least one of the following: determining the first sub-memory configuration information of the first sub-component, wherein the first sub-component is a component for performing a task expansion operation, and the first sub-memory configuration information is used to indicate the first memory usage of the first sub-component, and the first memory usage is the product of the second available memory and a first coefficient; determining the second sub-memory configuration information of the second sub-component, wherein the second sub-component is a component for performing a task result aggregation operation, and the second sub-memory configuration information is used to indicate the second memory usage of the second sub-component, and the second memory The occupancy is the product of the second available memory amount and the second coefficient; determining the third sub-memory configuration information of the third sub-component, wherein the third sub-component is a component used to split the task expansion operation and / or the task result aggregation operation, and the third sub-memory configuration information is used to indicate the third memory occupancy of the third sub-component, and the third memory occupancy is the product of the first memory occupancy and the third coefficient; determining the fourth sub-memory configuration information of the fourth sub-component, wherein the fourth sub-component is a component used to perform application control operations, and the fourth sub-memory configuration information is used to indicate the fourth memory occupancy of the fourth sub-component, and the fourth memory occupancy is the product of the maximum value of the first memory occupancy and the second memory occupancy and the first coefficient.
[0017] Optionally, after determining the first memory configuration information of the first component based on the first available memory amount, the method further includes: obtaining second memory configuration information of a second component, wherein the second component is a component other than the first component among the target components deployed on the target node, and the second memory configuration information is default configuration information of the second component; merging the first memory configuration information and the second memory configuration information to obtain target memory configuration information of a target node cluster to which the target node belongs, wherein the target node cluster includes multiple nodes, and the memory configuration information of each of the multiple nodes is the target memory configuration information.
[0018] According to another aspect of an embodiment of the present application, a configuration information acquisition device is also provided, including: a first acquisition unit, used to acquire target node configuration parameters of a target node, wherein the target node configuration parameters include a first configuration parameter for determining a first available memory amount of the target node; a first determination unit, used to determine the first available memory amount of the target node based on the target node configuration parameters; a second determination unit, used to determine first memory configuration information of a first component based on the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory occupancy of the first component on the target node.
[0019] Optionally, the first acquisition unit includes: a first matching module, used to use the target node identifier of the target node to match the target node configuration parameters corresponding to the target node identifier from a target database, wherein the target database is used to store the correspondence between the node identifier and the node configuration parameters.
[0020] Optionally, the first determination unit includes: a second matching module, used to use the target node identifier to match the target reserved memory amount corresponding to the target node identifier from a reserved memory comparison table when the first configuration parameter is used to indicate the target memory amount of the target node, wherein the reserved memory comparison table is used to represent the correspondence between the node identifier and the reserved memory amount; and a first determination module, used to determine the first available memory amount of the target node based on the target memory amount and the target reserved memory amount.
[0021] Optionally, the second determination unit includes: a second determination module, used to determine a second number of available containers on the target node according to a first number of the multiple virtual processors when the target node includes multiple virtual processors, wherein the second number is less than the first number, and each of the available containers corresponds to one virtual processor; a third determination module, used to determine a second amount of available memory on each of the available containers according to the first amount of available memory and the second amount; and a fourth determination module, used to determine the first memory configuration information of the first component according to the second amount of available memory.
[0022] Optionally, the fourth determination module includes: a determination submodule, used to determine the first memory configuration information of the first component according to the correspondence between the memory usage of the first component on the target node and the second available memory amount.
[0023] Optionally, the determination submodule includes at least one of the following: a first determination subunit, used to determine first sub-memory configuration information of a first subcomponent, wherein the first subcomponent is a component for performing a task expansion operation, and the first sub-memory configuration information is used to indicate a first memory occupancy of the first subcomponent, and the first memory occupancy is the product of the second available memory amount and a first coefficient; a second determination subunit, used to determine second sub-memory configuration information of a second subcomponent, wherein the second subcomponent is a component for performing a task result aggregation operation, and the second sub-memory configuration information is used to indicate a second memory occupancy of the second subcomponent, and the second memory occupancy is the product of the second available memory amount and a second coefficient; a third determination subunit, used to determine first sub-memory configuration information of a second subcomponent, wherein the second subcomponent is a component for performing a task result aggregation operation, and the second sub-memory configuration information is used to indicate a second memory occupancy of the second subcomponent, and the second memory occupancy is the product of the second available memory amount and a second coefficient. A unit is used to determine third sub-memory configuration information of a third sub-component, wherein the third sub-component is a component used to split the task expansion operation and / or the task result aggregation operation, and the third sub-memory configuration information is used to indicate a third memory occupancy of the third sub-component, and the third memory occupancy is the product of the first memory occupancy and a third coefficient; a fourth determination sub-unit is used to determine fourth sub-memory configuration information of a fourth sub-component, wherein the fourth sub-component is a component used to perform application control operations, and the fourth sub-memory configuration information is used to indicate a fourth memory occupancy of the fourth sub-component, and the fourth memory occupancy is the product of the maximum value of the first memory occupancy and the second memory occupancy and the first coefficient.
[0024] Optionally, the device also includes: a second acquisition unit, used to acquire second memory configuration information of a second component after determining the first memory configuration information of the first component based on the first available memory amount, wherein the second component is a component other than the first component among the target components deployed on the target node, and the second memory configuration information is default configuration information of the second component; a merging unit, used to merge the first memory configuration information and the second memory configuration information to obtain target memory configuration information of a target node cluster to which the target node belongs, wherein the target node cluster includes multiple nodes, and the memory configuration information of each of the multiple nodes is the target memory configuration information.
[0025] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0026] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0027] In an embodiment of the present application, a method of determining the memory configuration of a component according to the configuration information of a node is adopted to obtain the target node configuration parameters of the target node, wherein the target node configuration parameters include a first configuration parameter for determining a first amount of available memory of the target node; determining a first amount of available memory of the target node according to the target node configuration parameters; determining first memory configuration information of a first component according to the first amount of available memory, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node. Since the memory usage of the component is determined according to the configuration parameters of the node and the memory configuration information of the component is obtained, the user does not need to perform a large number of benchmark tests to obtain the memory configuration of the component, thereby simplifying the complexity of the memory configuration, achieving the technical effect of reducing configuration time and human resource consumption and improving the efficiency of memory configuration, and further solving the problems of long configuration time and high human resource consumption in the component configuration method in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] 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.
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0030] Figure 1 is a schematic diagram of a hardware environment of a method for obtaining configuration information according to an embodiment of the present application;
[0031] Figure 2 is a flowchart of an optional method for obtaining configuration information according to an embodiment of the present application;
[0032] Figure 3 is a schematic diagram of an optional method for obtaining configuration information according to an embodiment of the present application;
[0033] Figure 4 is a flowchart of another optional method for obtaining configuration information according to an embodiment of the present application;
[0034] Figure 5 is a flowchart of another optional method for obtaining configuration information according to an embodiment of the present application;
[0035] Figure 6 is a structural block diagram of an optional device for acquiring configuration information according to an embodiment of the present application;
[0036] Figure 7 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] According to one aspect of an embodiment of the present application, a method for obtaining configuration information is provided. Optionally, in this embodiment, the method for obtaining configuration information can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of the terminal 102 and the server 104, the hardware environment may be a big data platform, for example, a scalable big data computing platform. Figure 1 As shown, the server 104 is connected to the terminal 102 through a network, and can be used to provide services (such as game services, application services, etc.) for the terminal or the client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104, and can also be used to process cloud services. The above network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 102 is not limited to a PC, a mobile phone, a tablet computer, etc. The method for obtaining the configuration information of the embodiment of the present application can be executed by the server 104, or by the terminal 102, or by the server 104 and the terminal 102. Among them, the terminal 102 executes the method for obtaining the configuration information of the embodiment of the present application, and it can also be executed by the client installed thereon.
[0040] Taking the method for obtaining configuration information in this embodiment executed by the server of the data platform as an example, Figure 2 is a flowchart of an optional method for obtaining configuration information according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0041] Step S202, obtaining a target node configuration parameter of the target node, wherein the target node configuration parameter includes a first configuration parameter for determining a first available memory amount of the target node;
[0042] Step S204, determining a first available memory amount of the target node according to the target node configuration parameters;
[0043] Step S206: Determine first memory configuration information of the first component based on the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
[0044] Through the above steps S202 to S206, the target node configuration parameters of the target node are obtained by determining the memory configuration of the component according to the configuration information of the node, wherein the target node configuration parameters include a first configuration parameter for determining a first available memory amount of the target node; according to the target node configuration parameters, the first available memory amount of the target node is determined; according to the first available memory amount, first memory configuration information of the first component is determined, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node, which solves the problems of long configuration time and high human resource consumption in the component configuration method in the related art, reduces configuration time and human resource consumption, and improves the efficiency of memory configuration.
[0045] In the technical solution provided in step S202, target node configuration parameters of the target node are obtained, wherein the target node configuration parameters include a first configuration parameter for determining a first available memory amount of the target node.
[0046] The method for obtaining configuration information in this embodiment can be applied to a scenario where memory is configured for components of a data platform on a node of the data platform. The data platform may be a big data platform, for example, a scalable big data computing platform. The method for obtaining configuration information in this embodiment is also applicable to other platforms that need to configure memory for components of the platform. In this embodiment, the method for obtaining configuration information is described by taking the target data platform as an example.
[0047] Each target data platform cluster contains several nodes, and memory configuration can be performed for components in the target data platform on multiple nodes. In the same node cluster, the memory configuration of components can be the same. Therefore, based on the memory configuration of a component in a node in the node cluster, the memory configuration of components in all nodes (or some nodes) in the entire node cluster can be obtained.
[0048] For example, a component is to be deployed on five nodes, and the configuration on each node is the same, that is, the memory configuration is the same.
[0049] The relevant personnel of the target data platform (target object, for example, users of cloud services) can use Ambari to deploy relevant components through their terminal devices. Ambari is a web-based tool that can be used to deploy relevant components. Optionally, other tools, nodes, etc. that can be used to deploy components can be used in this embodiment.
[0050] Cloud service providers or other third parties can conduct a large number of benchmark tests based on a variety of machine model configurations to obtain configuration parameters of nodes of different machine models. The configuration parameters of the nodes may include but are not limited to at least one of the following: VCPU (Virtual Central Processing Unit), memory, disk, etc., and provide them to users of the target data platform.
[0051] The component deployment node (a node in the target data platform used for component deployment) can obtain the target node configuration parameters of the target node, which include a first configuration parameter for determining a first available memory amount of the target node, and the first configuration parameter can be memory.
[0052] In the technical solution provided in step S204, a first available memory amount of the target node is determined according to the configuration parameters of the target node.
[0053] After obtaining the target node configuration parameters, the component deployment node can determine the first available memory of the target node according to the target node configuration parameters. The first available memory can be the memory on the target node except the reserved memory, and the reserved memory can be used by the system and some components (such as hbase, etc.).
[0054] The target node configuration parameter may be used to indicate the first available memory amount of the target node, in which case the component deployment node may directly determine the first available memory amount according to the target node configuration parameter. The target node configuration parameter may also be available memory reference information related to the first available memory amount of the target node, in which case the component deployment node may determine the first available memory amount according to the available memory reference information.
[0055] In the technical solution provided in step S206, first memory configuration information of the first component is determined based on the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
[0056] The first available memory amount of the target node is determined to determine the memory usage of the first component configured on the node. The first component is a component deployed on the target node, which may be all components of the target data platform or some components of the target data platform.
[0057] After determining the first available memory amount of the target node, the component deployment node may determine first memory configuration information of the first component based on the first available memory amount, where the first memory configuration information is used to indicate the memory usage of the first component on the target node.
[0058] There may be multiple ways to determine the first memory configuration information of the first component. For example, the memory usage of the first component on the target node may be determined based on the ratio of the memory usage of the first component on the target node to the first available memory (for example, the largest ratio). For another example, the memory usage of the first component on the target node may be determined based on the available memory interval in which the first available memory is located, and different available memory intervals correspond to one or more memory usages.
[0059] In the related art, the user of the target data platform needs to perform a large number of benchmark tests to obtain the memory configuration of the component on the node. In this embodiment, the node configuration parameters of the node are provided by the cloud service provider or other third-party nodes, and the user of the target data platform can directly determine the memory configuration of the component on the node based on the node configuration parameters, without the need for the user to perform a large number of benchmark tests, which can reduce the time and manpower required for the memory configuration of the component, thereby solving the above-mentioned problems existing in the related art.
[0060] As an optional embodiment, obtaining the node configuration parameters of the target node includes:
[0061] S11, using the target node identifier of the target node, matching the target node configuration parameters corresponding to the target node identifier from a target database, wherein the target database is used to store the correspondence between the node identifier and the node configuration parameters.
[0062] The node configuration (e.g., VCPU, memory, disk, etc.) of a node can be represented by the correspondence between the node identifier and the node configuration parameters. The node configuration of a node can be saved in the target database (taking the nova database as an example). The same configuration (e.g., VCPU, memory, disk) will maintain a unique record in the target database and generate a unique node identifier (e.g., flavor_id) to identify a record configuration.
[0063] The component deployment node may use the target node identifier of the target node to match the target node configuration parameters corresponding to the target node identifier from the target database.
[0064] For example, Figure 3 As shown in the figure, the node cluster in the target data platform contains several nodes. The node configuration will be stored in the nova library. According to the node configuration information (a flavor_id) recorded in nova, the corresponding configuration of the nodes in the cluster can be obtained.
[0065] Through this embodiment, the correspondence between the node identifier and the node configuration parameter is saved in the target database, which can improve the efficiency of obtaining the node configuration parameter and facilitate recording the node configuration parameter.
[0066] As an optional embodiment, determining the first available memory amount of the target node according to the target node configuration parameter includes:
[0067] S21, when the first configuration parameter is used to indicate a target memory amount of a target node, using the target node identifier, matching a target reserved memory amount corresponding to the target node identifier from a reserved memory comparison table, wherein the reserved memory comparison table is used to indicate a correspondence between a node identifier and a reserved memory amount;
[0068] S22: Determine a first available memory amount of the target node according to the target memory amount and the target reserved memory amount.
[0069] If the first configuration parameter is used to indicate the target memory amount of the target node, the reserved memory of the target node may be calculated first. The reserved memory amount of the target node may be indicated by configuration information, and the configuration information may be a reserved memory comparison table.
[0070] The reserved memory can be obtained according to the reserved memory comparison table. There can be multiple memory comparison tables corresponding to different components. The reserved memory comparison table can be configured according to actual needs. The target reserved memory amount can be the sum of the reserved memory required by all components. Table 1 is an example of a reserved memory reference table (comparison table).
[0071] Table 1
[0072] Node memory / GB Reserved Memory <4 1 4 2 8 2 16 2 24 4 ... ...
[0073] After obtaining the target reserved memory amount, the component deployment node can determine the first available memory amount of the target node according to the target memory amount and the target reserved memory amount. For example, the available memory on each node can be calculated by formula (1):
[0074] useable_mem=memory-reserved_mem (1)
[0075] Among them, memory is the total memory and reserved_mem is the reserved memory.
[0076] Through this embodiment, the reserved memory of the node is determined through the reserved memory comparison table, and then the available memory of the node is determined, so that the reserved memory can be flexibly configured, thereby improving the flexibility of component memory configuration.
[0077] As an optional embodiment, determining the first memory configuration information of the first component according to the first available memory amount includes:
[0078] S31, when the target node includes multiple virtual processors, determining a second number of available containers on the target node according to a first number of the multiple virtual processors, wherein the second number is less than the first number, and each available container corresponds to one virtual processor;
[0079] S32, determining a second available memory amount on each available container according to the first available memory amount and the second amount;
[0080] S33: Determine first memory configuration information of the first component according to the second available memory amount.
[0081] If the target node includes multiple CPUs, for example, VCPUs, the memory configuration information of the component can be considered for the multiple CPUs as a whole. The manner in which the memory configuration information of the component is determined for the multiple CPUs is the same or similar to that for a single CPU.
[0082] In order to adapt to the memory configuration of components in multiple CPU scenarios and improve the rationality of the memory configuration of components, the component deployment node can determine the second number of available containers on the target node based on the first number of multiple processors, each available container corresponds to a processor, and the number of available containers is less than the number of CPUs.
[0083] For example, the number of available containers can be calculated based on VCPU (CPU core number). For the sake of system stability, a portion of the CPU can be reserved for use by other additional processes. Therefore, the number of available containers is multiplied by a coefficient based on the VCPU. For example, as shown in formula (2), the number of available containers can be calculated according to a certain coefficient:
[0084] containers = α*VCPU (2)
[0085] Here, α is a number less than 1, for example, 0.5.
[0086] According to the first available memory amount and the second amount, the component deployment node can determine the second available memory amount on each available container, and then determine the first memory configuration information of the first component according to the second available memory amount.
[0087] For example, the available memory size of each container can be calculated based on the total available memory (first available memory) and the total number of containers (second number), and the calculation formula can be shown as formula (3):
[0088] container_mem=abs|useable_mem / containers| (3)
[0089] Among them, useable_mem is the total available memory, and containers is the total number of containers.
[0090] Through this embodiment, the memory configuration information of the component is determined according to the available memory size of each container, which can improve the rationality of the memory configuration and improve the stability of the system operation.
[0091] As an optional embodiment, determining the first memory configuration information of the first component according to the second available memory amount includes:
[0092] S41, determining first memory configuration information of the first component according to the correspondence between the memory usage of the first component on the target node and the second available memory amount.
[0093] Before determining the memory configuration of the component, the correspondence between the memory usage of the first component on the target node and the second available memory amount can be pre-configured, for example, the ratio between the memory usage of the first component on the target node and the second available memory amount, which can be configured by means of a reference coefficient.
[0094] The component deployment node can determine the first memory configuration information of the first component according to the correspondence between the memory usage of the first component on the target node and the second available memory amount. For example, based on the correspondence between the memory usage of the first component on the target node and the second available memory amount, and the second available memory amount, the memory usage of the first component on the target node is determined, and then the first memory configuration information of the first component is obtained.
[0095] Through this embodiment, by configuring the correspondence between the memory usage of the first component on the target node and the second available memory amount, the efficiency of the component memory configuration can be improved. This configuration may not be the optimal configuration, but it also has higher performance.
[0096] As an optional embodiment, according to the correspondence between the memory usage of the first component on the target node and the second available memory amount, determining the first memory configuration information of the first component includes at least one of the following:
[0097] S51, determining first sub-memory configuration information of a first sub-component, wherein the first sub-component is a component used to perform a task expansion operation, and the first sub-memory configuration information is used to indicate a first memory occupancy of the first sub-component, where the first memory occupancy is a product of a second available memory amount and a first coefficient;
[0098] S52, determining second sub-memory configuration information of a second sub-component, wherein the second sub-component is a component for performing a task result aggregation operation, and the second sub-memory configuration information is used to indicate a second memory occupancy of the second sub-component, where the second memory occupancy is a product of a second available memory amount and a second coefficient;
[0099] S53, determining third sub-memory configuration information of a third sub-component, wherein the third sub-component is a component used for splitting task expansion operations and / or task result aggregation operations, and the third sub-memory configuration information is used to indicate a third memory occupancy of the third sub-component, where the third memory occupancy is the product of the first memory occupancy and the third coefficient;
[0100] S54, determine the fourth sub-memory configuration information of the fourth sub-component, wherein the fourth sub-component is a component for performing application control operations, and the fourth sub-memory configuration information is used to indicate the fourth memory occupancy of the fourth sub-component, and the fourth memory occupancy is the product of the maximum value of the first memory occupancy and the second memory occupancy and the first coefficient.
[0101] Multiple components can be deployed on the target data platform or target node, and the first component can be all or part of the multiple components, for example, a key component in HDFS. The memory configuration of the component can refer to the memory configuration of mapred-site and / or yarn-site, and can include but is not limited to at least one of the following: the first subcomponent; the second subcomponent; the third subcomponent; the fourth subcomponent.
[0102] As an optional implementation, the component deployment node may determine first sub-memory configuration information of the first sub-component, where the first sub-memory configuration information is used to indicate a first memory occupancy of the first sub-component, where the first memory occupancy is the product of the second available memory amount and the first coefficient.
[0103] The first subcomponent may be used to perform a task expansion operation, and the first memory usage map_memory (map_mem) may be determined by a calculation method such as formula (4):
[0104] map_mem=container_mem*β (4)
[0105] Here, container_mem is the memory size of each available container, and the value of β is a number less than 1, for example, 0.8.
[0106] As another optional implementation, the component deployment node may determine second sub-memory configuration information of the second sub-component, where the second sub-memory configuration information is used to indicate a second memory occupancy of the second sub-component, where the second memory occupancy is the product of the second available memory amount and the second coefficient.
[0107] The second subcomponent can be used to perform task result aggregation operations, and the second memory usage reduce_memory (reduce_mem) can be determined by the calculation method of formula (5):
[0108] reduce_mem=λ*container_mem (5)
[0109] If container_mem is less than θ, the value of λ (the second coefficient) may be 2; if container_mem is greater than or equal to θ, the value of λ may be 1.
[0110] As another optional implementation, the component deployment node may determine third sub-memory configuration information of the third sub-component, where the third sub-memory configuration information is used to indicate a third memory occupancy of the third sub-component, where the third memory occupancy is the product of the first memory occupancy and a third coefficient.
[0111] The third subcomponent may be used for splitting task expansion operations and / or task result aggregation operations, and the third memory usage tez_memory (tez_mem) may be determined by the calculation method of formula (6):
[0112] tez_mem=map_mem*α (6)
[0113] The value of α is a number less than 1, for example, 0.5.
[0114] As another optional implementation, the component deployment node may determine fourth sub-memory configuration information of a fourth sub-component, where the fourth sub-memory configuration information is used to indicate a fourth memory occupancy of the fourth sub-component, where the fourth memory occupancy is the product of a maximum value between the first memory occupancy and the second memory occupancy and the first coefficient.
[0115] The fourth subcomponent may be a component for executing application control operations, and the fourth memory usage am_memory (am_mem) may be determined by using a calculation method such as formula (7):
[0116] am_mem=max(map_mem,reduce_mem)*β (7)
[0117] Through this embodiment, memory configuration of different components is performed through different coefficients, which can be applicable to different components and improve the rationality of memory configuration.
[0118] As an optional embodiment, after determining the first memory configuration information of the first component according to the first available memory amount, the method further includes:
[0119] S61, obtaining second memory configuration information of a second component, wherein the second component is a component other than the first component among target components deployed on the target node, and the second memory configuration information is default configuration information of the second component;
[0120] S62, merging the first memory configuration information and the second memory configuration information to obtain target memory configuration information of a target node cluster to which the target node belongs, wherein the target node cluster includes multiple nodes, and the memory configuration information of each of the multiple nodes is the target memory configuration information.
[0121] The component deployment node can obtain the first memory configuration information of the first component and the second memory configuration information of the second component respectively. The first node and the second node both belong to the target components deployed on the target node. The first memory configuration information is a dynamically configured memory configuration, and the second memory configuration information is a statically configured memory configuration. By merging the first memory configuration information and the second memory configuration information, the target memory configuration information of the target node cluster to which the target node belongs can be obtained.
[0122] For the target node cluster to which the target node belongs, the target memory configuration information of the target node may be used as the memory configuration information of the entire target node cluster, that is, the memory configuration information of each node in the target node cluster belongs to the target node cluster.
[0123] For example, the parameters of Ambari can be divided into two types: dynamic configuration parameters and default configuration parameters. The dynamic configuration parameters are the memory configuration parameters of the first component in this embodiment, and the default configuration parameters are the memory configuration parameters of the second component, which are default values. The dynamic configuration parameters can be dynamically generated according to the above configuration information acquisition method. Part of the dynamic configuration content can be shown in Table 2.
[0124] Table 2
[0125] Configuration Name Configuration size mapreduce.map.memory.mb map_mem mapreduce.reduce.memory.mb reduce_mem mapreduce.task.io.sort.mb tez_mem yarn.nodemanager.resource.memory-mb containers*container_mem yarn.nodemanager.resource.cpu-vcores vcpus
[0126] The default configuration and dynamic configuration can be merged and registered in Ambari as the complete Ambari configuration parameters of the cluster.
[0127] Through this embodiment, by splitting the memory configuration into two configurations, namely, a default configuration and a common configuration (dynamic configuration), the efficiency of the memory configuration can be improved while providing a high-performance memory configuration solution.
[0128] The following is an explanation of the configuration information acquisition method in the embodiment of the present application in conjunction with an optional example. The configuration information acquisition method can be executed by a component deployment node.
[0129] In this example, the memory is dynamically calculated according to the configuration parameters of different nodes, so as to obtain reasonable values of some important memory configurations of Ambari (for example, the memory configurations of MapReduce and Yarn).
[0130] like Figure 3 As shown, the dynamic memory configuration module can be called to dynamically calculate and generate the corresponding Ambari memory configuration information and register it in Ambari.
[0131] Combination Figure 4 and Figure 5 , the corresponding calculation process of the dynamic memory configuration module may include the following steps:
[0132] Step S502, obtaining the dynamic configuration and default configuration of Ambari.
[0133] First, you can get the node configuration according to the flavor_id. For example, you can get the corresponding configuration of the nodes in the cluster through the nova database according to the node flavor_id recorded in the cluster, including memory and CPU core number VCPU.
[0134] Then, the reserved memory reserved_memory is calculated according to the reserved memory comparison table, and the available memory useable_memory is calculated.
[0135] Then, calculate the number of available containers and the amount of memory available for each container.
[0136] Next, the dynamic configuration parameters of Ambari are calculated, which may include at least one of the following: memory configurations of map_memory, reduce_memory, tez_memory, and am_memory, so as to obtain the dynamic configuration of Ambari.
[0137] Finally, get the default configuration parameters of Ambari, that is, the default values.
[0138] Step S504, obtaining the final configuration of Ambari.
[0139] After the default configuration parameters and dynamic configuration parameters are merged, they can be registered in Ambari as the final Ambari configuration parameters of the cluster.
[0140] Through this embodiment, some reasonable and effective memory parameter configurations are obtained through a large number of benchmark tests, and the Ambari configuration is split into two configurations: the default configuration and the common configuration, thereby realizing a set of reasonable and fast Ambari configuration solutions, which can simplify the complexity of Ambari memory configuration. Only the cluster node configuration needs to be provided, which lowers the usage threshold of Ambari configuration, effectively improves the computing performance of the cluster, ensures the rationality of the cluster configuration, and at the same time, the configuration provided can ensure the stability of the cluster, which can ensure the stability of the cluster during use.
[0141] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0143] According to another aspect of an embodiment of the present application, a device for acquiring configuration information for implementing the above-mentioned method for acquiring configuration information is also provided. Figure 6 is a structural block diagram of an optional device for acquiring configuration information according to an embodiment of the present application, such as Figure 6 As shown, the device may include:
[0144] (1) a first acquisition unit 602, configured to acquire a target node configuration parameter of a target node, wherein the target node configuration parameter includes a first configuration parameter for determining a first available memory amount of the target node;
[0145] (2) a first determining unit 604, connected to the first obtaining unit 602, configured to determine a first available memory amount of the target node according to the configuration parameters of the target node;
[0146] (3) A second determination unit 606, connected to the first determination unit 604, is used to determine first memory configuration information of the first component based on the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
[0147] It should be noted that the first acquisition unit 602 in this embodiment can be used to execute the above step S202, the first determination unit 604 in this embodiment can be used to execute the above step S204, and the second determination unit 606 in this embodiment can be used to execute the above step S206.
[0148] Through the above-mentioned module, a method of determining the memory configuration of the component according to the configuration information of the node is adopted to obtain the target node configuration parameters of the target node, wherein the target node configuration parameters include a first configuration parameter for determining a first available memory amount of the target node; according to the target node configuration parameters, the first available memory amount of the target node is determined; according to the first available memory amount, first memory configuration information of the first component is determined, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node, which solves the problems of long configuration time and high human resource consumption in the component configuration method in the related art, reduces configuration time and human resource consumption, and improves the efficiency of memory configuration.
[0149] As an optional embodiment, the first acquiring unit 602 includes:
[0150] The first matching module is used to use the target node identifier of the target node to match the target node configuration parameters corresponding to the target node identifier from the target database, wherein the target database is used to store the correspondence between the node identifier and the node configuration parameters.
[0151] As an optional embodiment, the first determining unit 604 includes:
[0152] A second matching module is used to match the target reserved memory amount corresponding to the target node identifier from the reserved memory comparison table using the target node identifier when the first configuration parameter is used to indicate the target memory amount of the target node, wherein the reserved memory comparison table is used to indicate the correspondence between the node identifier and the reserved memory amount;
[0153] The first determination module is used to determine a first available memory amount of the target node according to the target memory amount and the target reserved memory amount.
[0154] As an optional embodiment, the second determining unit 606 includes:
[0155] A second determination module is used to determine a second number of available containers on the target node according to a first number of the multiple virtual processors when the target node includes multiple virtual processors, wherein the second number is less than the first number, and each available container corresponds to one virtual processor;
[0156] A third determination module, configured to determine a second amount of available memory on each available container according to the first amount of available memory and the second amount;
[0157] The fourth determination module is used to determine the first memory configuration information of the first component according to the second available memory amount.
[0158] As an optional embodiment, the fourth determining module includes:
[0159] The determination submodule is used to determine the first memory configuration information of the first component according to the corresponding relationship between the memory usage of the first component on the target node and the second available memory amount.
[0160] As an optional embodiment, the determining submodule includes at least one of the following:
[0161] A first determining subunit is used to determine first sub-memory configuration information of a first sub-component, wherein the first sub-component is a component used to perform a task expansion operation, and the first sub-memory configuration information is used to indicate a first memory occupancy of the first sub-component, where the first memory occupancy is a product of a second available memory amount and a first coefficient;
[0162] A second determining subunit is used to determine second sub-memory configuration information of a second sub-component, wherein the second sub-component is a component used to perform a task result aggregation operation, and the second sub-memory configuration information is used to indicate a second memory occupancy of the second sub-component, where the second memory occupancy is a product of a second available memory amount and a second coefficient;
[0163] A third determination subunit is used to determine third sub-memory configuration information of a third sub-component, wherein the third sub-component is a component used for splitting task expansion operations and / or task result aggregation operations, and the third sub-memory configuration information is used to indicate a third memory occupancy of the third sub-component, and the third memory occupancy is the product of the first memory occupancy and the third coefficient;
[0164] The fourth determination sub-unit is used to determine the fourth sub-memory configuration information of the fourth sub-component, wherein the fourth sub-component is a component used to perform application control operations, and the fourth sub-memory configuration information is used to indicate the fourth memory occupancy of the fourth sub-component, and the fourth memory occupancy is the product of the maximum value of the first memory occupancy and the second memory occupancy and the first coefficient.
[0165] As an optional embodiment, the above device also includes:
[0166] a second acquisition unit, configured to acquire second memory configuration information of a second component after determining the first memory configuration information of the first component according to the first available memory amount, wherein the second component is a component other than the first component in the target components deployed on the target node, and the second memory configuration information is default configuration information of the second component;
[0167] A merging unit is used to merge the first memory configuration information and the second memory configuration information to obtain target memory configuration information of a target node cluster to which the target node belongs, wherein the target node cluster includes multiple nodes, and the memory configuration information of each of the multiple nodes is the target memory configuration information.
[0168] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0169] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned method for acquiring configuration information is also provided. The electronic device may be a server, a terminal device, or a combination thereof.
[0170] Figure 7 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps in any of the above method embodiments through the computer program.
[0171] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0172] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0173] S1, obtaining a target node configuration parameter of a target node, wherein the target node configuration parameter includes a first configuration parameter for determining a first available memory amount of the target node;
[0174] S2, determining a first available memory amount of the target node according to the configuration parameters of the target node;
[0175] S3. Determine first memory configuration information of the first component according to the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
[0176] Among them, the memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for obtaining configuration information in the embodiment of the present invention. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, the method for obtaining the above-mentioned configuration information is realized. The memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include a memory remotely arranged relative to the processor 704, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0177] As an example, Figure 7 As shown, the memory 702 may include but is not limited to the first acquisition unit 602, the first determination unit 604 and the second determination unit 606 in the configuration information acquisition device. In addition, other module units in the configuration information acquisition device may also be included but are not limited to, which will not be repeated in this example.
[0178] Optionally, the transmission device 706 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 706 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 706 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0179] In addition, the electronic device further comprises: a connection bus 708 for connecting various module components in the electronic device.
[0180] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0181] It can be understood by those skilled in the art that Figure 7 The structure shown is for illustration only. The device for implementing the above configuration information acquisition method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 7It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 7 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 7 Different configurations are shown.
[0182] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0183] According to another aspect of the embodiment of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of the method for obtaining configuration information.
[0184] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0185] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0186] S1, obtaining a target node configuration parameter of a target node, wherein the target node configuration parameter includes a first configuration parameter for determining a first available memory amount of the target node;
[0187] S2, determining a first available memory amount of the target node according to the configuration parameters of the target node;
[0188] S3. Determine first memory configuration information of the first component according to the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
[0189] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0190] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0191] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0192] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0193] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0194] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0195] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0196] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0197] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for obtaining configuration information, characterized in that: include: Acquire a target node configuration parameter of a target node, wherein the target node configuration parameter includes a first configuration parameter for determining a first available memory amount of the target node; Determining the first available memory amount of the target node according to the target node configuration parameter includes: when the first configuration parameter is used to indicate the target memory amount of the target node, using the target node identifier of the target node, matching the target reserved memory amount corresponding to the target node identifier from a reserved memory comparison table, the reserved memory comparison table being used to indicate the correspondence between the node identifier and the reserved memory amount; determining the first available memory amount of the target node according to the target memory amount and the target reserved memory amount; Determine first memory configuration information of a first component based on the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
2. The method according to claim 1, characterized in that Acquiring the node configuration parameters of the target node includes: The target node identifier of the target node is used to match the target node configuration parameter corresponding to the target node identifier from a target database, wherein the target database is used to store the correspondence between the node identifier and the node configuration parameter.
3. The method according to claim 1, characterized in that: Determining the first memory configuration information of the first component according to the first available memory includes: In the case where the target node includes multiple virtual processors, determining a second number of available containers on the target node according to a first number of the multiple virtual processors, wherein the second number is less than the first number, and each of the available containers corresponds to one of the virtual processors; Determine a second amount of available memory on each of the available containers according to the first amount of available memory and the second amount; The first memory configuration information of the first component is determined according to the second available memory amount.
4. The method according to claim 3, characterized in that Determining the first memory configuration information of the first component according to the second available memory includes: The first memory configuration information of the first component is determined according to the correspondence between the memory usage of the first component on the target node and the second available memory amount.
5. The method according to claim 4, characterized in that According to the correspondence between the memory usage of the first component on the target node and the second available memory amount, determining that the first memory configuration information of the first component includes at least one of the following: Determine first sub-memory configuration information of a first sub-component, wherein the first sub-component is a component used to perform a task expansion operation, and the first sub-memory configuration information is used to indicate a first memory occupancy of the first sub-component, where the first memory occupancy is a product of the second available memory amount and a first coefficient; Determine second sub-memory configuration information of a second sub-component, wherein the second sub-component is a component used to perform a task result aggregation operation, and the second sub-memory configuration information is used to indicate a second memory occupancy of the second sub-component, where the second memory occupancy is the product of the second available memory amount and a second coefficient; Determine third sub-memory configuration information of a third sub-component, wherein the third sub-component is a component used to split the task expansion operation and / or the task result aggregation operation, and the third sub-memory configuration information is used to indicate a third memory occupancy of the third sub-component, and the third memory occupancy is the product of the first memory occupancy and a third coefficient; Determine fourth sub-memory configuration information of a fourth sub-component, wherein the fourth sub-component is a component for performing application control operations, and the fourth sub-memory configuration information is used to indicate a fourth memory occupancy of the fourth sub-component, and the fourth memory occupancy is a product of a maximum value of the first memory occupancy and the second memory occupancy and the first coefficient.
6. The method according to any one of claims 1 to 5, characterized in that After determining the first memory configuration information of the first component according to the first available memory amount, the method further includes: Acquire second memory configuration information of a second component, wherein the second component is a component other than the first component among the target components deployed on the target node, and the second memory configuration information is default configuration information of the second component; The first memory configuration information and the second memory configuration information are combined to obtain target memory configuration information of a target node cluster to which the target node belongs, wherein the target node cluster includes multiple nodes, and the memory configuration information of each of the multiple nodes is the target memory configuration information.
7. A device for acquiring configuration information, characterized in that: include: A first acquisition unit, configured to acquire a target node configuration parameter of a target node, wherein the target node configuration parameter includes a first configuration parameter for determining a first available memory amount of the target node; A first determining unit is configured to determine the first available memory amount of the target node according to the target node configuration parameter: when the first configuration parameter is used to indicate a target memory amount of the target node, use a target node identifier of the target node to match a target reserved memory amount corresponding to the target node identifier from a reserved memory comparison table, the reserved memory comparison table being used to indicate a correspondence between a node identifier and a reserved memory amount; determine the first available memory amount of the target node according to the target memory amount and the target reserved memory amount; A second determination unit is used to determine first memory configuration information of a first component based on the first available memory amount, wherein the first component is a component deployed on the target node, and the first memory configuration information is used to indicate the memory usage of the first component on the target node.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
Citation Information
Patent Citations
Method for adjusting node configuration in cluster system and server
CN110933178A