A method, device, computer device and storage medium for multi-core startup configuration determination
By acquiring and updating the configuration table of a multi-core system, the target configuration table with the optimal overall performance is determined, thus solving the problem of resource waste during multi-core startup and achieving more efficient resource utilization.
Patent Information
- Application Number
- CN202210616454.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-06-01
AI Technical Summary
In existing technologies, there is a core idling phenomenon during multi-core startup, which leads to resource waste and low resource utilization.
By obtaining the initial configuration table of the target object, determining the initial radar map area based on performance parameter information, and updating the configuration table multiple times until the limiting conditions are met, the target configuration table with the best overall performance is selected for multi-core startup.
It improves the resource utilization of multi-core startup, and enhances the overall performance and resource allocation flexibility of multi-core systems.
Smart Images

Figure CN114995908B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, and in particular to a multi-core startup configuration determination method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the development of computers, cloud native architecture has been widely used. Multi-core processors in cloud native architecture are gradually replacing traditional single-core or multi-core processors due to their high performance and low power consumption.
[0003] In the prior art, multi-core startup uses a Pin-table method and a PSCI method. Starting multiple cores using the above two methods may cause idle running of cores, resulting in resource waste. SUMMARY
[0004] Therefore, it is necessary to provide a multi-core startup configuration determination method, system, computer equipment and computer readable storage medium to determine a target configuration table for starting multiple cores and improve resource utilization.
[0005] The present application provides a multi-core startup configuration determination method, which comprises:
[0006] An initial configuration table corresponding to a target object is obtained, and the initial configuration table is used as a current configuration table. The initial configuration table includes initial kernel parameters and initial memory parameters.
[0007] A master core and each slave core corresponding to the target object are started based on the current configuration table, performance parameter information of the started master core and each slave core is obtained, and an initial radar chart area corresponding to the current configuration table is determined based on the performance parameter information.
[0008] The current configuration table is updated to obtain an updated configuration table, the updated configuration table is used as the current configuration table, and the step of starting the master core and each slave core corresponding to the target object based on the current configuration table, obtaining performance parameter information of the started master core and each slave core, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information is executed until a defined condition is met, and an initial radar chart area corresponding to each configuration table is obtained.
[0009] A target radar chart area is determined from the initial radar chart areas corresponding to each configuration table based on the performance parameters.
[0010] A configuration table corresponding to the target radar chart area is used as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave core corresponding to the target object.
[0011] In one embodiment, starting the master core and the slave cores corresponding to the target object based on the current configuration table comprises:
[0012] sending the current configuration table to the master core, the master core starting based on the corresponding configuration information in the current configuration table;
[0013] the master core storing the current configuration table in a first storage area and notifying the corresponding number of slave cores in the current configuration table to start;
[0014] each slave core reading the corresponding configuration information in the current configuration table from the first storage area and starting based on the read configuration information.
[0015] In one embodiment, obtaining performance parameter information corresponding to the started master core and slave cores and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information comprises:
[0016] obtaining performance parameter information corresponding to each performance parameter in a preset performance parameter group of the master core and the slave cores;
[0017] based on the performance parameter information, calculating a reference radar chart area corresponding to each of the master core and the slave cores, respectively;
[0018] fusing the reference radar chart areas corresponding to the master core and the slave cores to obtain the initial radar chart area corresponding to the current configuration table.
[0019] In one embodiment, updating the current configuration table to obtain an updated configuration table comprises:
[0020] obtaining a total amount of core configuration and a total amount of memory configuration;
[0021] fusing a current memory parameter in the current configuration table with a preset value to obtain a reference memory parameter;
[0022] based on the reference memory parameter and a current core parameter in the current configuration table, determining a total memory to be allocated;
[0023] if the total memory is less than or equal to the total amount of memory configuration, updating the current memory parameter in the current configuration table with the reference memory parameter to obtain an updated configuration table;
[0024] if the total memory is greater than the total amount of memory configuration, updating the current core parameter in the current configuration table to a reference core parameter, and if the reference core parameter is less than or equal to the total amount of core configuration, updating the current memory parameter and the current core parameter in the current configuration table with an initial memory parameter and the reference core parameter, respectively, to obtain an updated configuration table.
[0025] In one embodiment, the acquiring the total kernel quantity and the total memory quantity comprises:
[0026] If the Docker does not perform resource configuration, the kernel quantity and the memory of the host are acquired as the total kernel quantity and the total memory quantity respectively;
[0027] If the Docker performs resource configuration, the kernel quantity and the memory in the resource configuration are acquired as the total kernel quantity and the total memory quantity respectively.
[0028] In one embodiment, the determining the target radar chart area from the initial radar chart areas corresponding to the respective configuration tables based on the performance parameters comprises:
[0029] The initial radar chart areas corresponding to the respective configuration tables are compared;
[0030] If the performance parameters in the performance parameter group are positive parameters, the largest initial radar chart area is determined as the target radar chart area;
[0031] If the performance parameters in the performance parameter group are negative parameters, the smallest initial radar chart area is determined as the target radar chart area.
[0032] In one embodiment, the method for starting multiple cores comprises:
[0033] The target configuration table corresponding to the target object is acquired, the target configuration table being determined from a plurality of configuration tables, and the target configuration table being determined based on the plurality of configuration tables to successively start the master core and the respective slave cores corresponding to the target object, based on performance parameter information to obtain initial radar chart areas corresponding to the respective configuration tables, and based on performance parameters to determine a target radar chart area from the initial radar chart areas corresponding to the respective configuration tables, the target radar chart area corresponding to the configuration table being the target configuration table;
[0034] The master core corresponding to the target object is informed to start based on the corresponding configuration information in the target configuration table;
[0035] The corresponding number of slave cores in the target configuration table are informed by the master core to start based on the corresponding configuration information in the target configuration table.
[0036] The application further provides a device for determining a multi-core starting configuration, the device comprising:
[0037] An acquiring module is configured to acquire an initial configuration table corresponding to a target object, and to take the initial configuration table as a current configuration table, wherein the initial configuration table comprises initial kernel parameters and initial memory parameters;
[0038] The starting module is configured to start the master core and the slave cores corresponding to the target object based on the current configuration table, obtain performance parameter information corresponding to the started master core and the slave cores, and determine an initial radar chart area corresponding to the current configuration table based on the performance parameter information.
[0039] The loop module is configured to update the current configuration table to obtain an updated configuration table, take the updated configuration table as the current configuration table, and return to the step of starting the master core and the slave cores corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and the slave cores, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information, until a defined condition is met, to obtain an initial radar chart area corresponding to each configuration table.
[0040] The comparison module is configured to determine a target radar chart area from the initial radar chart areas corresponding to the configuration tables based on the performance parameters.
[0041] The determination module is configured to take a configuration table corresponding to the target radar chart area as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave cores corresponding to the target object.
[0042] The application further provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0043] An initial configuration table corresponding to a target object is obtained, and the initial configuration table is taken as a current configuration table; the initial configuration table comprises initial kernel parameters and initial memory parameters.
[0044] The master core and the slave cores corresponding to the target object are started based on the current configuration table, performance parameter information corresponding to the started master core and the slave cores is obtained, and an initial radar chart area corresponding to the current configuration table is determined based on the performance parameter information.
[0045] The current configuration table is updated to obtain an updated configuration table, the updated configuration table is taken as the current configuration table, and the step of starting the master core and the slave cores corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and the slave cores, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information is executed until a defined condition is met, to obtain an initial radar chart area corresponding to each configuration table.
[0046] A target radar chart area is determined from the initial radar chart areas corresponding to the configuration tables based on the performance parameters.
[0047] The configuration table corresponding to the target radar chart area is taken as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave cores corresponding to the target object.
[0048] The application further provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the following steps:
[0049] An initial configuration table corresponding to a target object is acquired, and the initial configuration table is taken as a current configuration table; the initial configuration table comprises initial core parameters and initial memory parameters;
[0050] The master core and the slave cores corresponding to the target object are started based on the current configuration table, performance parameter information corresponding to the started master core and slave cores is acquired, and an initial radar chart area corresponding to the current configuration table is determined based on the performance parameter information;
[0051] The current configuration table is updated to obtain an updated configuration table, the updated configuration table is taken as the current configuration table, and the steps of starting the master core and the slave cores corresponding to the target object based on the current configuration table, acquiring the performance parameter information corresponding to the started master core and slave cores, and determining the initial radar chart area corresponding to the current configuration table based on the performance parameter information are executed until a limited condition is met, so that the initial radar chart areas corresponding to the configuration tables are obtained;
[0052] A target radar chart area is determined based on the performance parameters from the initial radar chart areas corresponding to the configuration tables;
[0053] The configuration table corresponding to the target radar chart area is taken as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave cores corresponding to the target object.
[0054] The method, device, computer equipment and storage medium for determining the multi-core startup configuration, by obtaining an initial configuration table corresponding to a target object, taking the initial configuration table as a current configuration table, starting a master core and each slave core corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and each slave core, determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information, updating the current configuration table to obtain an updated configuration table, taking the updated configuration table as the current configuration table, returning to the step of starting the master core and each slave core corresponding to the target object based on the current configuration table, obtaining the performance parameter information corresponding to the started master core and each slave core, and determining the initial radar chart area corresponding to the current configuration table based on the performance parameter information until a limited condition is met, obtaining an initial radar chart area corresponding to each configuration table, determining a target radar chart area based on the performance parameter from the initial radar chart areas corresponding to each configuration table, and taking a configuration table corresponding to the target radar chart area as a target configuration table corresponding to the target object, the target configuration table being used to start the master core and the slave core corresponding to the target object. The multi-core is started using the determined target configuration table, and the resource utilization rate is improved. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 An application environment diagram of the method for determining the multi-core startup configuration in an embodiment;
[0056] Figure 2 A flowchart of the method for determining the multi-core startup configuration in an embodiment;
[0057] Figure 3 A flowchart of the multi-core startup step in an embodiment;
[0058] Figure 4 A flowchart of determining the initial radar chart area in an embodiment;
[0059] Figure 5 A flowchart of updating the configuration table in an embodiment;
[0060] Figure 6 A flowchart of starting the multi-core using the target configuration table in an embodiment;
[0061] Figure 7 A structure diagram of a container in an embodiment;
[0062] Figure 8 A structure diagram of a multi-core in an embodiment;
[0063] Figure 9 A flowchart of the multi-core startup configuration determination and operation in an embodiment;
[0064] Figure 10A structural block diagram of a multi-core start configuration determination device in an embodiment;
[0065] Figure 11 A structural block diagram of a multi-core start device in an embodiment;
[0066] Figure 12 An internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0067] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0068] The multi-core start configuration determination method provided by the embodiment of the present application can be applied in an application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The terminal 102 obtains an initial configuration table corresponding to a target object, and sends the initial configuration table to a corresponding master core on the server 104. After the corresponding master core on the server 104 is started, the corresponding slave core in the initial configuration table is notified to start. After the master core and each slave core are started, an application program is run, performance parameter information corresponding to the master core and each slave core is obtained, and an initial radar chart area corresponding to the current configuration table is determined based on the performance parameter information. The current memory parameter and the current core parameter in the current configuration table are updated multiple times to obtain an updated current configuration table. The above steps of starting the master core and the slave core are repeated to obtain a radar chart area corresponding to each current configuration table. A target radar chart area is determined based on the nature of the performance parameter, and a configuration table corresponding to the target radar chart area is a target configuration table. The terminal 102 obtains the target configuration table corresponding to the target object, and sends the target configuration table to a master core corresponding to the target object in the server 104. The master core and the slave core corresponding to the target object in the server 104 are started. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0069] In an embodiment, as Figure 2As shown, a method for multi-core startup configuration determination is provided, and the embodiment is exemplified by the method applied to a terminal. The method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction of the terminal and the server. In the embodiment, the method includes the following steps:
[0070] In step 202, an initial configuration table corresponding to the target object is obtained, and the initial configuration table is taken as a current configuration table. The initial configuration table includes initial kernel parameters and initial memory parameters.
[0071] The configuration table refers to a file carrying relevant configuration information. The initial configuration table refers to a file carrying relevant initial configuration information. For example, the configuration table includes, but is not limited to, the matching of containers and kernels, memory parameters, I / O allocation parameters, and other configuration parameters. The kernel parameter refers to a parameter for configuring the number of kernels, which can be set in a manner of limiting the number of kernels or specifying specific kernels. For example, the kernel parameter is set to allocate 4 kernels, or the allocated kernels are core1, core2, core3, and core4. Whether the kernel is occupied can be determined by monitoring the state of each kernel, and the unused kernels are respectively determined. The memory parameter refers to a parameter for configuring memory information, which can be set in a manner of limiting the memory of each kernel or limiting the total memory. For example, the memory parameter is set to allocate 1G of memory for each core, or to allocate 4G of memory for 4 cores.
[0072] Specifically, the terminal 102 obtains the initial configuration table from the target object.
[0073] In one embodiment, the target object is an application program, and the computer device obtains the initial configuration table from the application program.
[0074] In one embodiment, the target object is a container for running an application program, and the computer device obtains the initial configuration table from the corresponding container. The container refers to a lightweight independent executable software package, which packages code and all its dependencies, including code, runtime, system tools, system libraries, and configurations required to run an application program, so that the application program can be reliably and quickly run from one computing environment to another computing environment.
[0075] In step 204, the master core and the slave cores corresponding to the target object are started based on the current configuration table, the performance parameter information corresponding to the started master core and slave cores is obtained, and the initial radar chart area corresponding to the current configuration table is determined based on the performance parameter information.
[0076] The core refers to the core of the operating system, provides the most basic functions of the operating system, is the basis of the operating system, and is responsible for managing the processes, memory, device drivers, files and network systems of the system, and determines the performance and stability of the system. The main core refers to the core that has the functions of communicating with the outside world, controlling the slave core and the like. The slave core refers to the core that only has the most basic functions of the operating system. The performance parameter information refers to the index reflecting the performance of the core during operation. The radar chart refers to a chart for representing multi-dimensional data, mapping the data of multiple dimensions to the coordinate axes, and each dimension of data corresponds to a coordinate axis. The radar chart area refers to the area of the two-dimensional image formed by the data of multiple dimensions.
[0077] Specifically, the terminal 102 sends the current configuration table to each main core, the main core starts according to the corresponding configuration information in the current configuration table after obtaining the current configuration table, the main core notifies the corresponding slave core according to the initial core parameter in the current configuration table, each slave core reads the corresponding configuration information in the current configuration table, and starts according to the corresponding configuration information. When the main core and the slave core are started, the application program deployed in the container is started, the performance parameter information of the performance parameters related to the main core and each slave core is obtained, the radar chart is made according to the obtained performance parameter information, and the radar chart area corresponding to the current configuration table is calculated.
[0078] In one embodiment, the container has multiple cores, including one main core and multiple slave cores, and the multiple cores adopt one of the SMP (symmetric multi-processing) architecture, the BMP (hybrid multi-processing) architecture and the AMP (non-heap multi-processing) architecture. For example, the container has four cores, core0 is the main core, and core1, core2 and core3 are the slave cores.
[0079] Step 206, updating the current configuration table to obtain an updated configuration table, taking the updated configuration table as the current configuration table, returning to the step of starting the main core and each slave core corresponding to the target object based on the current configuration table, obtaining the performance parameter information corresponding to the started main core and each slave core, and determining the initial radar chart area corresponding to the current configuration table based on the performance parameter information, until the defined condition is met, to obtain the initial radar chart area corresponding to each configuration table.
[0080] The update refers to changing one or more parameters in the current configuration table. The defined condition refers to a condition for ending the loop set in advance.
[0081] Specifically, the server 104 updates the parameters in the current configuration table according to the set rule to obtain an updated configuration table, and sends the updated configuration table as the current configuration to the master core corresponding to the target object. The master core starts the corresponding slave core according to the corresponding configuration in the current configuration table. The corresponding slave core reads the corresponding configuration information in the current configuration table and starts. After the master core and the slave cores start, the application program deployed in the container is started, the performance parameter information of the related performance parameters of the master core and the slave cores is obtained, the radar chart is made according to the obtained performance parameter information, and the area of the radar chart corresponding to the current configuration table is calculated. The master core and the slave cores are closed, the parameters in the current configuration table are updated according to the set rule to obtain an updated configuration table, the above steps are repeated with the updated configuration table as the current configuration table, and the initial radar chart area corresponding to each current configuration table is obtained until the updated configuration table meets the pre-set limit condition.
[0082] In one embodiment, the change of the current core parameter can be the change of the number of cores, and the change of the current memory parameter can be the change of the allocated memory. For example, the number of cores is increased or decreased.
[0083] In one embodiment, the change of the current core parameter can be the change of the core identifier, for example, the core allocated by the current core parameter is core0, core1, core2, and core3, and after the change, the core allocated by the current core parameter is core0, core1, core5, and core7. The change of the current memory parameter can be the change of the specific location of the memory allocated by each core. For example, the memory allocated by the current memory parameter is 1G of memory in server 1, and after the change, the memory allocated by the current memory parameter is 1G of memory in server 2.
[0084] Step 208, determining a target radar chart area based on the performance parameters from the initial radar chart areas corresponding to the configuration tables.
[0085] Specifically, the initial radar chart areas corresponding to the configuration tables are compared, and the minimum initial radar chart area or the maximum initial radar chart area is determined as the target radar chart area according to the nature of the selected performance parameters.
[0086] Step 210, taking the configuration table corresponding to the target radar chart area as the target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave core corresponding to the target object.
[0087] Specifically, the configuration table corresponding to the target radar chart area is taken as the target configuration table corresponding to the target object, and when the master core and the slave core corresponding to the target object start, the start is performed according to the configuration in the target configuration table.
[0088] The method for determining the multi-core starting configuration, by starting the multi-core through the initial configuration table, running the application program to obtain the initial radar chart area corresponding to the initial configuration table, the initial radar chart area comprehensively reflects the performance of the multi-core when the application program runs; by updating the current configuration table multiple times to obtain multiple current configuration tables, starting the multi-core multiple times by using the multiple current configuration tables to obtain multiple initial radar chart areas corresponding to the multiple current configuration tables, more reference sample quantities are provided for determining the target configuration table, and the accuracy of the target configuration table is improved; the target radar chart is determined from the multiple initial radar chart areas according to the properties of the performance parameters, the target configuration table expected by the user is obtained according to the performance parameters that the user cares about and values, and the flexibility of the target configuration table is improved; the comprehensive performance of the determined target configuration table is optimal, and the resource utilization is improved by starting the multi-core by using the target configuration table.
[0089] In one embodiment, as shown in FIG. 3, the method for determining the multi-core starting configuration based on the current configuration table includes: Figure 3
[0090] In step 302, the current configuration table is sent to the master core, and the master core starts based on the configuration information corresponding to the current configuration table.
[0091] The configuration information refers to the allocated resource information, which can be one or more of the allocated memory resource, I / O resource, disk resource, etc.
[0092] Specifically, the terminal 102 sends the current configuration table to the master core, the master core reads the configuration information of the master core in the current configuration table, and starts after obtaining the allocated resources.
[0093] In step 304, the master core stores the current configuration table in the first storage area and notifies the corresponding number of slave cores in the current configuration table to start.
[0094] The first storage area refers to a storage area shared by the multi-core.
[0095] Specifically, the master core stores the current configuration table in the first storage area and notifies the corresponding slave cores in the current configuration table to start through the inter-core interrupt. The inter-core interrupt refers to the interrupt of the multi-core multi-thread processor controlled by the PIC (Programmable Interrupt Controller), and the PIC allows one hardware thread to interrupt other hardware threads.
[0096] In step 306, each slave core reads the corresponding configuration information in the current configuration table from the first storage area and starts based on the read configuration information.
[0097] Specifically, after receiving the inter-core interrupt sent by the master core, each slave core reads the corresponding configuration information from the first storage area, obtains the allocated resources, and starts.
[0098] In the embodiment, the master core is started based on the current configuration table, the master core stores the current configuration table in the shared first storage area, and the corresponding slave cores are started based on the corresponding configuration information in the current configuration table through the inter-core interrupt, so that waste of CPU threads is avoided.
[0099] In one embodiment, as shown in Figure 4 Performance parameter information corresponding to the master core and the slave cores is obtained, and an initial radar chart area corresponding to the current configuration table is determined based on the performance parameter information.
[0100] In step 402, performance parameter information corresponding to each performance parameter in a preset performance parameter group of the master core and the slave cores is obtained.
[0101] The preset performance parameter group refers to a set of performance parameters that are preset. The performance parameters in the preset performance parameter group have the same property and can be positive parameters or negative parameters.
[0102] Specifically, the server 104 obtains performance parameter information corresponding to each performance parameter in a preset performance parameter group of the master core and the slave cores running the application program.
[0103] In one embodiment, the performance parameters in the preset performance parameter group are negative performance parameters, and include multiple performance parameters such as CPU occupancy, memory occupancy, Numa (Non-Uniform Memory Access) delay, Cache miss (cache miss rate), TDP (Thermal Design Power), and the like.
[0104] In one embodiment, the performance parameters in the preset performance parameter group are positive performance parameters, and include multiple performance parameters such as Cache hit (cache hit rate), TLB hit (Translation Lookaside Buffer hit rate), and the like.
[0105] In step 404, reference radar chart areas corresponding to the master core and the slave cores are respectively calculated based on the performance parameter information.
[0106] Specifically, radar charts corresponding to the master core and the slave cores are respectively drawn according to the performance parameter information corresponding to the master core and the slave cores, and reference radar chart areas corresponding to the cores are calculated according to the radar charts of the cores.
[0107] In one embodiment, each performance parameter in the preset performance parameter group is five positive performance parameters, the target value of each performance parameter is set as 100%, and the radar chart of the master core and each slave core is respectively drawn according to the target value of the five performance parameters and the performance parameter information. The radar chart is composed of five triangles, the area of each triangle in the radar chart is obtained by solving the triangle area formula, the area of the radar chart is obtained by adding the areas of the five triangles, and the initial radar chart area corresponding to the master core and each slave core is respectively obtained by using the above method.
[0108] In step 406, the reference radar chart areas corresponding to the master core and each slave core are fused to obtain the initial radar chart area corresponding to the current configuration table.
[0109] Specifically, the reference radar chart areas of the master core and each slave core are added to obtain the initial radar chart area corresponding to the current configuration table.
[0110] In one embodiment, the reference radar chart areas of the master core and each slave core are fused by weighting, and the weight is determined with reference to the CPU occupancy rate of each core.
[0111] In this embodiment, the radar chart corresponding to each core is respectively drawn according to the performance parameter information of the master core and each slave core, the corresponding reference radar chart area is calculated according to the radar chart, the reference radar chart areas of each core are summed to obtain the initial radar chart area corresponding to the current configuration table, and the initial radar chart area is used to reflect the comprehensive performance of the multi-core started by the current configuration table, thereby improving the accuracy of the comprehensive performance evaluation.
[0112] In one embodiment, as shown in FIG. 5, updating the current configuration table to obtain an updated configuration table includes: Figure 5
[0113] In step 502, the total kernel configuration amount and the total memory configuration amount are obtained.
[0114] The total kernel configuration amount refers to the maximum number of kernels that can be used by the target object. The total memory configuration amount refers to the maximum memory that can be used by the target object.
[0115] In step 504, the current memory parameter in the current configuration table is fused with a preset value to obtain a reference memory parameter.
[0116] The preset value refers to the amplitude of the change of the memory parameter set in advance, which can be set with reference to the complexity of the application or the total memory configuration amount and the like.
[0117] Specifically, the reference memory parameter is obtained by adding the current memory parameter and the preset value.
[0118] In step 506, the total memory to be allocated is determined based on the reference memory parameter and the current kernel parameter in the current configuration table.
[0119] Specifically, the total memory allocated is obtained by performing summation operation on the number of cores determined according to the current core parameter and the memory of each core determined according to the reference memory parameter.
[0120] In step 508, if the total memory is less than or equal to the total memory configuration, the reference memory parameter is used to update the current memory parameter in the current configuration table to obtain an updated configuration table.
[0121] In step 510, if the total memory is greater than the total memory configuration, the current core parameter in the current configuration table is updated to the reference core parameter. If the reference core parameter is less than or equal to the total core configuration, the initial memory parameter and the reference core parameter are used to update the current memory parameter and the current core parameter in the current configuration table, respectively, to obtain an updated configuration table.
[0122] Specifically, if the total memory is greater than the total memory configuration, the current core parameter is incremented by 1 to obtain the reference core parameter. If the reference core parameter is less than or equal to the total core configuration, the initial memory parameter and the reference core parameter are used to update the current memory parameter and the current core parameter in the current configuration table, respectively, to obtain an updated configuration table.
[0123] In the embodiment, one or both of the current core parameter and the current memory parameter are updated to obtain an updated reference core parameter or reference memory parameter. The updated reference core parameter or reference memory parameter is used to replace the current reference parameter or the current reference parameter to obtain an updated configuration table. The current configuration table is updated multiple times to obtain an updated configuration table. Various configuration situations of multiple cores in the multiple-core start are considered, the frequency of training is increased, and the accuracy of the training result is improved.
[0124] In one embodiment, obtaining the total core configuration and the total memory configuration comprises:
[0125] If the Docker does not perform resource configuration, the number of cores and the memory of the host are obtained as the total core configuration and the total memory configuration, respectively. If the Docker performs resource configuration, the number of cores and the memory in the resource configuration are obtained as the total core configuration and the total memory configuration, respectively.
[0126] Docker refers to an open-source application container engine that allows developers to package their applications and dependent packages into a portable image and then publish them on any popular Linux or Windows operating system machine. The resources of the container can be configured. The host refers to the host of the container deployment, which can be a physical host or a virtual machine. Virtual Machine (VM) refers to a complete computer system that is simulated by software and runs in a completely isolated environment.
[0127] Specifically, the configuration information in the configuration file of the Docker is viewed. If the Docker does not limit the resource allocation of the container, all resources of the host machine can be used by the container. The number of the kernels and the memory of the host machine are obtained as the kernel configuration total amount and the memory configuration total amount respectively. If the Docker performs resource configuration, the number of the kernels and the memory in the resource configuration are obtained as the kernel configuration total amount and the memory configuration total amount respectively.
[0128] In the embodiment, the kernel configuration total amount and the memory configuration total amount are determined, which are used to set the limiting condition of the step 206, limit the training range, and improve the training speed.
[0129] In one embodiment, determining the target radar chart area from the initial radar chart areas corresponding to the respective configuration tables based on the performance parameters comprises:
[0130] The initial radar chart areas corresponding to the respective configuration tables are compared. If the performance parameters in the performance parameter group are positive parameters, the largest initial radar chart area is determined as the target radar chart area. If the performance parameters in the performance parameter group are negative parameters, the smallest initial radar chart area is determined as the target radar chart area.
[0131] The positive parameter refers to a parameter whose performance is better as the parameter value is larger. The negative parameter refers to a parameter whose performance is better as the parameter value is smaller.
[0132] Specifically, the initial radar chart areas corresponding to the respective configuration tables are sorted by comparison. If the performance parameters are all positive parameters, the largest initial radar chart area is taken as the target radar chart area. If the performance parameters are all negative parameters, the smallest initial radar chart area is taken as the target radar chart area. In the embodiment, the target radar chart area is determined according to the properties of the performance parameters in the performance parameter group, which improves the flexibility of the training process.
[0133] In the embodiment, the target radar chart area is determined based on the properties of the performance parameters, which meets the individualized demand by setting different performance parameters, and improves the pertinence of the training result.
[0134] In one embodiment, as Figure 6 The method for starting the multiple cores comprises:
[0135] In step 602, a target configuration table corresponding to the target object is obtained. The target configuration table is determined from a plurality of configuration tables. The target configuration table is determined based on the performance parameter information. The main core and the slave cores corresponding to the target object are started in sequence based on the plurality of configuration tables. The initial radar chart area corresponding to each configuration table is obtained based on the performance parameters. The target radar chart area is determined from the initial radar chart areas corresponding to the respective configuration tables based on the performance parameters. The configuration table corresponding to the target radar chart area is the target configuration table.
[0136] The specific generation process of the target configuration table can refer to the contents of various embodiments of the method for determining the multi-core startup configuration, which will not be described here.
[0137] Specifically, the computer device obtains the target configuration table in the application program or obtains the target configuration table in the container where the application program is located.
[0138] In step 604, the target object corresponding master core is informed to start based on the corresponding configuration information in the target configuration table.
[0139] Specifically, the terminal 102 sends the target configuration table to the master core, the master core reads the configuration information of the master core in the target configuration table, obtains the corresponding configuration, and starts, and stores the target configuration table.
[0140] In step 606, the target configuration table is informed to the target configuration table corresponding number of slave cores based on the corresponding configuration information in the target configuration table.
[0141] Specifically, the master core informs the target configuration table corresponding number of slave cores through inter-core interruption, and the corresponding slave core reads the corresponding configuration information from the target configuration table storage area and starts after obtaining the allocated resources.
[0142] In this embodiment, the target object corresponding master core and slave core are started according to the target configuration table, and the multi-core is started according to the allocated resources in the target configuration table, which improves the comprehensive performance of the multi-core and improves the resource utilization.
[0143] In one specific embodiment, the container 1 contains an application program, a configuration file and a running environment of the application program, and the container 1 is deployed on a physical machine as shown in Figure 7 The physical machine has a total of three containers, and the multi-core in the container 1 adopts an SMP (symmetric multiprocessing) running mode as shown in Figure 8 The multi-core has one master core and four slave cores, and the master core is used for managing and controlling the slave cores. The process of determining the multi-core startup configuration is as described above, which is divided into a preliminary running stage, a training stage and a use stage. Figure 9
[0144] In the preliminary running stage, the application program acquires an initial configuration table, informs the master core to start, sends the initial configuration table to the master core in the container 1, the initial configuration table is an initial configuration table configured by the application program or an initial configuration table configured by the container 1, the master core starts according to the corresponding configuration in the initial configuration table, saves the initial configuration file in the shared storage area, the master core informs the corresponding slave core to start through the inter-core interrupt, the corresponding slave core starts according to the corresponding configuration information in the initial configuration table, the master core and the slave core run the application program after starting, acquire the performance parameter information of CPU occupancy rate, memory occupancy rate, Numa delay, Cache miss and TDP of the master core and each slave core, draw the corresponding radar chart according to the performance parameter information, calculate the area of the corresponding radar chart, sum the radar chart areas of the master core and each slave core to obtain the initial radar chart area corresponding to the initial configuration table.
[0145] In the training stage, the application program acquires a current configuration table, the current configuration table can be set through input or set through a setting instruction, informs the master core to start, sends the current configuration table to the master core in the container 1, the master core informs the corresponding slave core to start through the inter-core interrupt, the corresponding slave core starts according to the corresponding configuration information in the current configuration table, the master core and the slave core run the application program after starting, acquire the performance parameter information of CPU occupancy rate, memory occupancy rate, Numa delay, Cache miss and TDP of the master core and each slave core, draw the corresponding radar chart according to the performance parameter information, calculate the area of the corresponding radar chart, sum the radar chart areas of the master core and each slave core to obtain the initial radar chart area corresponding to the current configuration table.
[0146] The current memory parameter in the current configuration table is fused with a preset value to obtain a reference memory parameter, the total memory allocated is determined through the reference memory parameter and the current core parameter in the current configuration table, if the total memory is less than or equal to the total memory configuration amount that can be used by the container 1, the current memory parameter in the current configuration table is updated with the reference memory parameter to obtain an updated configuration table; if the total memory is greater than the total memory configuration amount that can be used by the container 1, the current core parameter in the current configuration table is added by 1 to obtain a reference core parameter, if the reference core parameter is less than or equal to the total core configuration amount that can be used by the container 1, the current memory parameter and the current core parameter in the current configuration table are updated with the initial memory parameter and the reference core parameter respectively to obtain an updated configuration table.
[0147] The updated configuration table is taken as the current configuration table, the above steps of obtaining the initial radar chart area are repeated to obtain initial radar chart areas corresponding to each current configuration table, and the initial radar chart area corresponding to the initial configuration table and the initial radar chart areas corresponding to each current configuration table are compared to determine that the initial radar chart area with the minimum value is the target radar chart area, and the configuration table corresponding to the target radar chart area is the target configuration table.
[0148] In the use stage, the application program sends the target configuration table to the master core, the master core and the slave cores are started according to the configurations in the target configuration table, and the application program is run. During the running of the application program, if the number of slave cores or the memory allocated to the master core and each slave core changes, the current configurations are recorded, the performance index information is obtained, the initial radar chart area corresponding to the current configurations is calculated, and after the running of the application program ends, the initial radar chart areas corresponding to the plurality of real-time configuration tables and the target radar chart area corresponding to the target configuration table are compared to determine that the configuration table corresponding to the radar chart area with the minimum value is the target configuration table.
[0149] In the embodiment, the target configuration table is obtained through the preliminary running stage and the training stage, the master core and the slave cores are started by using the target configuration table, when the corresponding cores and memories of the application program change during the running, the current configuration table is collected in real time, the corresponding radar chart area is calculated, the target configuration table is updated in real time, and after the multi-core is started based on the updated target configuration table, the comprehensive performance is further improved during the running of the program, and the resource utilization rate is improved.
[0150] It should be understood that, although Figures 1-9 The steps in the flowchart of the method are displayed in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, Figures 1-9 At least part of the steps in the method can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0151] Based on the same inventive concept, the embodiments of the present application also provide a multi-core starting configuration determination device and a multi-core starting device for implementing the above-mentioned multi-core starting configuration determination method and multi-core starting device. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in the embodiments of one or more multi-core starting configuration determination devices and multi-core starting devices provided below can be referred to the limitations of the multi-core starting configuration determination method in the above text, and will not be repeated here.
[0152] In one embodiment, as shown in Figure 10 A multi-core startup configuration determination apparatus is provided, comprising an acquisition module, a startup module, a loop module, a comparison module, a determination module, wherein:
[0153] The acquisition module 1002 is configured to acquire an initial configuration table corresponding to a target object, and take the initial configuration table as a current configuration table; the initial configuration table includes initial kernel parameters and initial memory parameters;
[0154] The startup module 1004 is configured to start a master core and each slave core corresponding to the target object based on the current configuration table, acquire performance parameter information corresponding to the started master core and each slave core, and determine an initial radar chart area corresponding to the current configuration table based on the performance parameter information.
[0155] The loop module 1006 is configured to update the current configuration table to obtain an updated configuration table, take the updated configuration table as the current configuration table, and return to the step of starting the master core and each slave core of the target object based on the current configuration table, acquiring performance parameter information corresponding to the started master core and each slave core, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information, until a defined condition is met, to obtain an initial radar chart area corresponding to each configuration table.
[0156] The comparison module 1008 is configured to determine a target radar chart area based on performance parameters from the initial radar chart areas corresponding to each configuration table.
[0157] The determination module 1010 is configured to take a configuration table corresponding to the target radar chart area as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave core corresponding to the target object.
[0158] In one embodiment, the startup module 1004 is further configured to send the current configuration table to the master core, and the master core starts based on corresponding configuration information in the current configuration table; the master core stores the current configuration table in a first storage area, and notifies a corresponding number of slave cores in the current configuration table to start; each slave core reads corresponding configuration information in the current configuration table from the first storage area, and starts based on the read configuration information.
[0159] In one embodiment, the startup module 1004 is further configured to acquire performance parameter information corresponding to each performance parameter in a preset performance parameter group of the master core and each slave core; based on the performance parameter information, calculate a reference radar chart area corresponding to the master core and each slave core, respectively; and fuse the reference radar chart areas corresponding to the master core and each slave core to obtain an initial radar chart area corresponding to the current configuration table.
[0160] In an embodiment, the loop module 1006 is further configured to: obtain a total amount of kernel configurations and a total amount of memory configurations; fuse a current memory parameter in a current configuration table with a preset value to obtain a reference memory parameter; determine a total memory allocated based on the reference memory parameter and a current kernel parameter in the current configuration table; if the total memory is less than or equal to the total amount of memory configurations, update the current memory parameter in the current configuration table with the reference memory parameter to obtain an updated configuration table; and if the total memory is greater than the total amount of memory configurations, update the current kernel parameter in the current configuration table to a reference kernel parameter, and if the reference kernel parameter is less than or equal to the total amount of kernel configurations, update the current memory parameter and the current kernel parameter in the current configuration table with an initial memory parameter and the reference kernel parameter respectively to obtain the updated configuration table.
[0161] In an embodiment, the loop module 1006 is further configured to: if the Docker does not perform resource configuration, obtain a number of kernels of a host computer and memory as the total amount of kernel configurations and the total amount of memory configurations respectively; and if the Docker performs resource configuration, obtain a number of kernels and memory in the resource configuration as the total amount of kernel configurations and the total amount of memory configurations respectively.
[0162] In an embodiment, the comparison module 1008 is further configured to: compare initial radar chart areas corresponding to each configuration table; if a performance parameter in a performance parameter group is a positive parameter, determine a largest initial radar chart area as a target radar chart area; and if the performance parameter in the performance parameter group is a negative parameter, determine a smallest initial radar chart area as the target radar chart area.
[0163] In an embodiment, as shown in FIG. 11, a multi-core starting apparatus is provided, which includes an obtaining module 1102, a master core starting module 1104, and a slave core starting module 1106. Figure 11 The obtaining module 1102 is configured to obtain a target configuration table corresponding to a target object, the target configuration table being determined from a plurality of configuration tables, and being obtained based on sequentially starting a master core and each slave core corresponding to the target object based on the plurality of configuration tables, based on performance parameter information obtaining an initial radar chart area corresponding to each configuration table, and based on a performance parameter determining a target radar chart area from the initial radar chart areas corresponding to each configuration table, the target radar chart area corresponding to the target configuration table.
[0164] The master core starting module 1104 is configured to notify the master core corresponding to the target object to start based on corresponding configuration information in the target configuration table.
[0165]
[0166] The slave core startup module 1106 is used to notify the corresponding number of slave cores in the target configuration table to start based on the configuration information in the target configuration table through the master core.
[0167] The modules in the aforementioned multi-core boot configuration determination device and multi-core boot device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0168] Figure 12 An internal structural diagram of a computer device in one embodiment is shown. This computer device can be either a terminal or a server. Figure 12 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store computer programs. When executed by the processor, these computer programs enable the processor to implement a video compositing method. The internal memory may also store computer programs, which, when executed by the processor, enable the processor to implement a business document conversion method.
[0169] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0170] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: obtaining an initial configuration table corresponding to a target object, taking the initial configuration table as a current configuration table; the initial configuration table comprising initial kernel parameters and initial memory parameters; starting a master core and each slave core corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and each slave core, determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information; updating the current configuration table to obtain an updated configuration table, taking the updated configuration table as the current configuration table, returning to the steps of starting the master core and each slave core corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and each slave core, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information, until a defined condition is met, to obtain an initial radar chart area corresponding to each configuration table; determining a target radar chart area based on performance parameters from the initial radar chart areas corresponding to each configuration table; taking a configuration table corresponding to the target radar chart area as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave core corresponding to the target object.
[0171] In one embodiment, the processor further implements the following steps when executing the computer program: sending the current configuration table to the master core, and the master core starts based on the corresponding configuration information in the current configuration table; the master core stores the current configuration table in a first storage area, and notifies a corresponding number of slave cores in the current configuration table to start; each slave core reads the corresponding configuration information in the current configuration table from the first storage area, and starts based on the read configuration information.
[0172] In one embodiment, the processor further implements the following steps when executing the computer program: obtaining performance parameter information corresponding to each performance parameter in a preset performance parameter group of the master core and each slave core; based on the performance parameter information, calculating a reference radar chart area corresponding to the master core and each slave core, respectively; fusing the reference radar chart areas corresponding to the master core and each slave core to obtain an initial radar chart area corresponding to the current configuration table.
[0173] In one embodiment, the processor, when executing the computer program, further implements the following steps: obtaining the total amount of kernel configuration and the total amount of memory configuration; fusing the current memory parameter in the current configuration table with the preset value to obtain a reference memory parameter; determining the total memory allocated based on the reference memory parameter and the current kernel parameter in the current configuration table; if the total memory is less than or equal to the total amount of memory configuration, updating the current memory parameter in the current configuration table with the reference memory parameter to obtain an updated configuration table; if the total memory is greater than the total amount of memory configuration, updating the current kernel parameter in the current configuration table to a reference kernel parameter, and if the reference kernel parameter is less than or equal to the total amount of kernel configuration, updating the current memory parameter and the current kernel parameter in the current configuration table with the initial memory parameter and the reference kernel parameter respectively to obtain an updated configuration table.
[0174] In one embodiment, the processor, when executing the computer program, further implements the following steps: if the Docker does not perform resource configuration, obtaining the number of kernels and the memory of the host as the total amount of kernel configuration and the total amount of memory configuration respectively; if the Docker performs resource configuration, obtaining the number of kernels and the memory in the resource configuration as the total amount of kernel configuration and the total amount of memory configuration respectively.
[0175] In one embodiment, the processor, when executing the computer program, further implements the following steps: comparing the initial radar chart areas corresponding to each configuration table; if the performance parameters in the performance parameter group are positive parameters, determining the largest initial radar chart area as the target radar chart area; if the performance parameters in the performance parameter group are negative parameters, determining the smallest initial radar chart area as the target radar chart area.
[0176] In one embodiment, the processor, when executing the computer program, further implements the following steps: obtaining a target configuration table corresponding to a target object, the target configuration table being determined from a plurality of configuration tables, being based on sequentially starting the master core and each slave core corresponding to the target object based on the plurality of configuration tables, obtaining the initial radar chart area corresponding to each configuration table based on performance parameter information, determining a target radar chart area based on performance parameters from the initial radar chart areas corresponding to each configuration table, and the configuration table corresponding to the target radar chart area being the target configuration table; notifying the master core corresponding to the target object to start based on the corresponding configuration information in the target configuration table; notifying the corresponding number of slave cores in the target configuration table to start based on the corresponding configuration information in the target configuration table through the master core.
[0177] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps: obtaining an initial configuration table corresponding to a target object, taking the initial configuration table as a current configuration table; the initial configuration table includes initial kernel parameters and initial memory parameters; starting a master core and each slave core corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and each slave core, determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information; updating the current configuration table to obtain an updated configuration table, taking the updated configuration table as the current configuration table, returning to the step of starting the master core and each slave core corresponding to the target object based on the current configuration table, obtaining the performance parameter information corresponding to the started master core and each slave core, and determining the initial radar chart area corresponding to the current configuration table based on the performance parameter information, until a limited condition is met, to obtain an initial radar chart area corresponding to each configuration table; determining a target radar chart area based on the performance parameters from the initial radar chart areas corresponding to each configuration table; taking a configuration table corresponding to the target radar chart area as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave core corresponding to the target object.
[0178] In one embodiment, the computer program is executed by the processor to further implement the following steps: sending the current configuration table to the master core, and the master core starts the master core based on the corresponding configuration information in the current configuration table to store the current configuration table in a first storage area, and informs a corresponding number of slave cores in the current configuration table to start; each slave core reads the corresponding configuration information in the current configuration table from the first storage area, and starts based on the read configuration information.
[0179] In one embodiment, the computer program is executed by the processor to further implement the following steps: obtaining performance parameter information corresponding to each performance parameter in a preset performance parameter group of the master core and each slave core; based on the performance parameter information, calculating a reference radar chart area corresponding to the master core and each slave core, respectively; fusing the reference radar chart areas corresponding to the master core and each slave core to obtain an initial radar chart area corresponding to the current configuration table.
[0180] In one embodiment, the computer program, when executed by the processor, further implements the following steps: obtaining the total amount of kernel configuration and the total amount of memory configuration; fusing the current memory parameter in the current configuration table with the preset value to obtain a reference memory parameter; determining the total memory allocated based on the reference memory parameter and the current kernel parameter in the current configuration table; if the total memory is less than or equal to the total amount of memory configuration, updating the current memory parameter in the current configuration table with the reference memory parameter to obtain an updated configuration table; if the total memory is greater than the total amount of memory configuration, updating the current kernel parameter in the current configuration table to a reference kernel parameter, and if the reference kernel parameter is less than or equal to the total amount of kernel configuration, updating the current memory parameter and the current kernel parameter in the current configuration table with the initial memory parameter and the reference kernel parameter respectively to obtain an updated configuration table.
[0181] In one embodiment, the computer program, when executed by the processor, further implements the following steps: if the Docker does not perform resource configuration, obtaining the number of kernels and the memory of the host as the total amount of kernel configuration and the total amount of memory configuration respectively; if the Docker performs resource configuration, obtaining the number of kernels and the memory in the resource configuration as the total amount of kernel configuration and the total amount of memory configuration respectively.
[0182] In one embodiment, the computer program, when executed by the processor, further implements the following steps: comparing the initial radar chart areas corresponding to each configuration table; if the performance parameters in the performance parameter group are positive parameters, determining the largest initial radar chart area as the target radar chart area; if the performance parameters in the performance parameter group are negative parameters, determining the smallest initial radar chart area as the target radar chart area.
[0183] In one embodiment, the computer program, when executed by the processor, further implements the following steps: obtaining a target configuration table corresponding to a target object, the target configuration table being determined from a plurality of configuration tables, being based on sequentially starting the master core and each slave core corresponding to the target object based on the plurality of configuration tables, obtaining the initial radar chart area corresponding to each configuration table based on performance parameter information, determining the target radar chart area based on the performance parameters from the initial radar chart areas corresponding to each configuration table, and the configuration table corresponding to the target radar chart area being the target configuration table; notifying the master core corresponding to the target object to start based on the corresponding configuration information in the target configuration table; notifying the corresponding number of slave cores in the target configuration table to start based on the corresponding configuration information in the target configuration table through the master core.
[0184] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0185] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0186] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0187] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A method for determining a multi-core boot configuration, characterized in that, The method comprises: obtaining an initial configuration table corresponding to a target object, taking the initial configuration table as a current configuration table; the initial configuration table comprises initial kernel parameters and initial memory parameters; the target object is a container for running an application program; starting a master core and each slave core corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and each slave core, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information; the starting of the master core and each slave core based on the current configuration table comprises: sending the current configuration table to the master core, and starting the master core based on corresponding configuration information in the current configuration table; the master core stores the current configuration table in a first storage area, and notifies a corresponding number of slave cores in the current configuration table to start; each slave core reads corresponding configuration information in the current configuration table from the first storage area, and starts based on the read configuration information; updating the current configuration table to obtain an updated configuration table, taking the updated configuration table as the current configuration table, and returning to the step of starting the master core and each slave core corresponding to the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and each slave core, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information, until a defined condition is met, to obtain an initial radar chart area corresponding to each configuration table; determining a target radar chart area based on performance parameters from the initial radar chart areas corresponding to each configuration table; taking a configuration table corresponding to the target radar chart area as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave core corresponding to the target object.
2. The method of claim 1, wherein, The master core refers to a core that has the function of communicating with the outside world and controlling the slave core, and the slave core refers to a core that only has the most basic function of the operating system.
3. The method of claim 1, wherein, The obtaining of the performance parameter information corresponding to the started master core and each slave core, and the determination of the initial radar chart area corresponding to the current configuration table based on the performance parameter information comprise: obtaining performance parameter information corresponding to each performance parameter in a preset performance parameter group of the master core and each slave core; based on the performance parameter information, calculating a reference radar chart area corresponding to the master core and each slave core, respectively; fusing the reference radar chart areas corresponding to the master core and each slave core to obtain the initial radar chart area corresponding to the current configuration table.
4. The method of claim 1, wherein, The updating of the current configuration table to obtain the updated configuration table comprises: obtaining a total amount of kernel configuration and a total amount of memory configuration; fusing a current memory parameter in the current configuration table with a preset value to obtain a reference memory parameter; determining a total memory to be allocated based on the reference memory parameter and a current kernel parameter in the current configuration table; if the total memory is less than or equal to the total amount of memory configuration, updating the current memory parameter in the current configuration table with the reference memory parameter to obtain the updated configuration table; If the total memory is greater than the total memory configuration, a current kernel parameter in the current configuration table is updated to a reference kernel parameter, if the reference kernel parameter is less than or equal to the total kernel configuration, an initial memory parameter and the reference kernel parameter are used to update a current memory parameter and a current kernel parameter in the current configuration table respectively to obtain an updated configuration table.
5. The method of claim 4, wherein, The obtaining of the total kernel configuration and the total memory configuration comprises: If the Docker does not perform resource configuration, the number of kernels and the memory of a host are obtained as the total kernel configuration and the total memory configuration respectively; If the Docker performs resource configuration, the number of kernels and the memory in the resource configuration are obtained as the total kernel configuration and the total memory configuration respectively.
6. The method of claim 1, wherein, The method comprises: The method comprises: The method comprises: The method comprises:
7. A method of multi-core booting, the method comprising: The device comprises: The obtaining module is configured to obtain an initial configuration table corresponding to a target object, and use the initial configuration table as a current configuration table; the initial configuration table comprises an initial kernel parameter and an initial memory parameter; the target object is a container used for running an application program; and the method comprises: The device comprises: 8. A device for multi-core boot data processing, characterized in that, The starting module is configured to start the master core and the slave cores corresponding to the target object based on the current configuration table, obtain performance parameter information corresponding to the started master core and the slave cores, and determine an initial radar chart area corresponding to the current configuration table based on the performance parameter information. The starting of the master core and the slave cores based on the current configuration table includes: sending the current configuration table to the master core, starting the master core based on corresponding configuration information in the current configuration table, storing the current configuration table in a first storage area by the master core, and notifying a corresponding number of slave cores in the current configuration table to start. Each slave core reads corresponding configuration information in the current configuration table from the first storage area and starts based on the read configuration information. The cycle module is configured to update the current configuration table to obtain an updated configuration table, take the updated configuration table as the current configuration table, and return to the step of starting the master core and the slave cores of the target object based on the current configuration table, obtaining performance parameter information corresponding to the started master core and the slave cores, and determining an initial radar chart area corresponding to the current configuration table based on the performance parameter information, until a defined condition is met, and obtain an initial radar chart area corresponding to each configuration table. The comparison module is configured to determine a target radar chart area from the initial radar chart areas corresponding to the configuration tables based on performance parameters. The determination module is configured to take a configuration table corresponding to the target radar chart area as a target configuration table corresponding to the target object, and the target configuration table is used to start the master core and the slave cores corresponding to the target object. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for application program to automatically adapt to multi-core processor mode and mobile equipment
CN103077087A
Method and device for starting multiple operating systems on multi-core CPU
CN108108199A
Apparatus and method for generating smart visualizations for effective monitoring and control in industrial process control and automation systems
CN110998464A