WO2024027148A1 - 资源调度方法、装置、计算设备集群、介质及程序产品 - Google Patents

资源调度方法、装置、计算设备集群、介质及程序产品 Download PDF

Info

Publication number
WO2024027148A1
WO2024027148A1 PCT/CN2023/079075 CN2023079075W WO2024027148A1 WO 2024027148 A1 WO2024027148 A1 WO 2024027148A1 CN 2023079075 W CN2023079075 W CN 2023079075W WO 2024027148 A1 WO2024027148 A1 WO 2024027148A1
Authority
WO
WIPO (PCT)
Prior art keywords
cloud server
virtual processor
memory
instruction
physical processing
Prior art date
Application number
PCT/CN2023/079075
Other languages
English (en)
French (fr)
Inventor
周文礼
杨孟
朱磊
苏利
Original Assignee
华为云计算技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2024027148A1 publication Critical patent/WO2024027148A1/zh

Links

Classifications

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

Definitions

  • This application relates to the field of cloud computing, and in particular, to a resource scheduling method, device, computing equipment cluster, medium and program product.
  • Cloud computing is another new innovation in the information age after the Internet and computers. Cloud computing can coordinate many computer resources together, allowing users to obtain unlimited resources through the network. At the same time, the resources obtained are not affected by time and Space limitations.
  • a cloud server (elastic cloud server, ECS) is a basic computing component composed of a virtual processor core (virtual CPU, vCPU), memory, operating system, and cloud disk. After the cloud server is successfully created, users can use their own Like a local computer or a local server, use a cloud server over the network.
  • ECS elastic cloud server
  • the created cloud server has certain specifications, such as the number of vCPUs and memory size corresponding to the cloud server.
  • the relationship between the specifications and performance of existing cloud servers is usually one-to-one, that is, users can only adjust the cloud server by adjusting the cloud server.
  • the size of the server specification parameters is used to adjust the performance of the cloud server. In some cases, for users, although the performance of the cloud server under the current specification parameters is not suitable, the performance of the cloud server under higher specification parameters or lower specification parameters may not be the most suitable. Therefore, how to meet users' needs for cloud servers with multiple performances has become a research hotspot in this field.
  • a resource scheduling method, device, computing device cluster, medium and program product are proposed.
  • multiple scheduling methods can be provided under the same parameters, so that multiple scheduling methods can be used Cloud servers have different performances to meet users' needs for cloud servers with multiple performances.
  • embodiments of the present application provide a resource scheduling method.
  • the method is applied to a first processor.
  • the method includes: obtaining a first instruction, the first instruction indicating a target parameter of the cloud server; according to The first instruction and the actual usage of the resource determine multiple scheduling methods of the schedulable resource under the target parameters.
  • the schedulable resource is scheduled by at least one second processor based on a non-uniform memory access architecture. , when the second processor schedules schedulable resources for the cloud server according to different scheduling methods, the performance of the cloud server is different; display data is generated according to the multiple scheduling methods and the performance of the corresponding cloud server, the The display data is used to display an interface including the multiple scheduling methods and the performance of the corresponding cloud servers.
  • the first instruction indicating the target parameters of the cloud server is obtained through the first processor, and the number of schedulable resources under the target parameters can be determined based on the first instruction and the actual usage of the resources. Therefore, there are multiple scheduling methods to choose from for schedulable resources under the same target parameters, which improves the flexibility of selecting resource scheduling methods; because schedulable resources are composed of at least one based on non-uniform memory access architecture.
  • the second processing When the second processor schedules schedulable resources for the cloud server according to different scheduling methods, the performance of the cloud server is different. Therefore, the performance of the cloud server is different under multiple scheduling methods; according to the multiple scheduling methods and the corresponding The performance of the cloud server generates display data.
  • the display data is used to display an interface including multiple scheduling methods and corresponding cloud server performance. It can meet the user's needs for cloud servers with multiple performances, and can flexibly adjust the cloud by adjusting the scheduling method. Server performance and improved user experience.
  • the resources include virtual processor cores, and for each second processor, the second processor includes at least one physical processing node, The physical processing node is used to schedule and run virtual processor cores, and the target parameters include the target number of virtual processor cores corresponding to the cloud server and the target memory size of the cloud server.
  • the multiple scheduling methods include: a virtual processor core corresponding to the cloud server and the The memory of the cloud server is provided by a single physical processing node; and/or the virtual processor core corresponding to the cloud server and the memory of the cloud server are provided by two or more physical processing nodes, and each physical processing node provides the same number of virtual processor cores and the same size of memory; and/or the virtual processor core corresponding to the cloud server and the memory of the cloud server are provided by two or more physical processing nodes, and at least two physical processing nodes The number of virtual processor cores and/or memory size provided is different.
  • the virtual processor core corresponding to the cloud server and the memory of the cloud server are composed of two and When the above physical processing nodes are provided, the two or more physical processing nodes are located on the same computer.
  • the final cloud server can have a non-uniform memory access architecture.
  • the processor accesses local storage (memory) faster than accessing non-local storage.
  • the resource scheduling method according to the multiple scheduling methods and the corresponding cloud server After the performance display data is generated, the method further includes: receiving a second instruction from the user, the second instruction indicating one of the multiple scheduling methods; causing the second processor to follow the instructions indicated by the second instruction.
  • the scheduling method is that the cloud server schedules schedulable resources; and updates the actual usage of the resources according to the resource status on the second processor.
  • the obtaining the first instruction includes: receiving a first instruction from the user. instructions, or obtain the user's usage of the cloud server under current parameters, which include the current number of virtual processor cores corresponding to the cloud server and the current memory size of the cloud server; obtained according to the usage the first instruction.
  • multiple scheduling methods can be determined based on the target parameters indicated by the user, and it can also proactively provide services for the users whose performance is not suitable.
  • Cloud server users determine appropriate target parameters and provide recommendations for multiple scheduling methods, which can improve the user experience.
  • obtaining the first instruction according to the usage situation includes: determining the minimum value of the number of virtual processor cores and the minimum value of the memory size that satisfy the usage situation; The minimum value and the minimum value of the memory size are used as the target parameters to obtain the first instruction.
  • the minimum number of virtual processor cores and the minimum memory size determined in this way can be used as target parameters.
  • the first processor can determine the appropriate The target parameters are obtained and the first instruction is obtained, so that multiple scheduling methods can still be displayed, which can further optimize the user experience.
  • the method when the first instruction comes from the user, the method further includes: obtaining the user's response to the current parameters
  • the current parameters include the current number of virtual processor cores corresponding to the cloud server and the current memory size of the cloud server; according to the multiple scheduling methods and the corresponding cloud server
  • Generating display data based on the performance of the system includes: generating display data in descending order of proximity between the multiple scheduling methods and the usage situation, wherein, in the interface displayed according to the display data, the Multiple scheduling methods are displayed in descending order of their proximity to the usage situation.
  • the display effects of the multiple scheduling methods displayed can also be optimized based on the user's usage of the cloud server under the current parameters, which can improve the display generated by the resource scheduling method.
  • Data s ability to demonstrate multiple scheduling approaches.
  • inventions of the present application provide a resource scheduling device.
  • the device includes: a first acquisition module for acquiring a first instruction indicating the target parameters of the cloud server; a determination module for Determine multiple scheduling modes of schedulable resources under target parameters based on the first instruction and the actual usage of the resources.
  • the schedulable resources are configured by at least one second processor based on a non-uniform memory access architecture. Perform scheduling, and when the second processor schedules schedulable resources for the cloud server according to different scheduling methods, the performance of the cloud server is different; and generates a module for scheduling according to the multiple scheduling methods and the corresponding cloud server.
  • the performance generates display data, and the display data is used to display an interface including the multiple scheduling methods and the performance of the corresponding cloud server.
  • the resource in a first possible implementation manner of the resource scheduling device, includes a virtual processor core, and for each second processor, the second processor includes at least one physical processing node, The physical processing node is used to schedule and run virtual processor cores, and the target parameters include the target number of virtual processor cores corresponding to the cloud server and the target memory size of the cloud server.
  • the multiple scheduling methods include: a virtual processor core corresponding to the cloud server and the The memory of the cloud server is provided by a single physical processing node; and/or the virtual processor core corresponding to the cloud server and the memory of the cloud server are provided by two or more physical processing nodes, and each physical processing node provides the same number of virtual processor cores and the same size of memory; and/or the virtual processor core corresponding to the cloud server and the memory of the cloud server are provided by two or more physical processing nodes, and at least two physical processing nodes The number of virtual processor cores and/or memory size provided is different.
  • the virtual processor core corresponding to the cloud server and the memory of the cloud server are composed of two and When the above physical processing nodes are provided, the two or more physical processing nodes are located on the same computer.
  • the device further includes: a receiving module, configured to receive a message from a user. second instruction, stated The second instruction indicates one of the multiple scheduling methods; a scheduling module is used to cause the second processor to schedule schedulable resources for the cloud server according to the scheduling method indicated by the second instruction; an update module is used to Update the actual usage of the resource according to the resource status on the second processor.
  • the first acquisition module includes: a receiving unit, configured to receive from The user's first instruction, or acquisition unit, is used to obtain the user's usage of the cloud server under current parameters.
  • the current parameters include the current number of virtual processor cores corresponding to the cloud server and the current number of virtual processor cores of the cloud server. Memory size; processing unit, used to obtain the first instruction according to the usage situation.
  • the processing unit includes: a determining subunit, used to determine virtual processing that satisfies the usage situation The minimum value of the number of processor cores and the minimum value of the memory size; the processing subunit is used to use the minimum value of the number of virtual processor cores and the minimum value of the memory size as the target parameters to obtain the first instruction .
  • the device when the first instruction comes from the user, the device further includes: a second acquisition module, Used to obtain the user's usage of the cloud server under current parameters.
  • the current parameters include the current number of virtual processor cores corresponding to the cloud server and the current memory size of the cloud server;
  • the generating module includes: generating A unit configured to generate display data according to the order of proximity between the multiple scheduling methods and the usage situation in descending order, wherein in the interface displayed according to the display data, the multiple scheduling methods are The degree of proximity to the usage situation is displayed in descending order.
  • embodiments of the present application provide a computing device cluster, including at least one computing device, each computing device including a first processor and a memory; the first processor of the at least one computing device is used to execute the Instructions stored in the memory of at least one computing device, so that the computing device cluster executes one or more of the resource scheduling methods of the first aspect or multiple possible implementations of the first aspect.
  • embodiments of the present application provide a computer-readable storage medium, including computer program instructions.
  • the computer program instructions When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the above first aspect or the first aspect.
  • embodiments of the present application provide a computer program product containing instructions.
  • the computing device cluster When the instructions are executed by a computing device cluster, the computing device cluster causes the computing device cluster to execute the first aspect or multiple possibilities of the first aspect.
  • One or several resource scheduling methods in the implementation method One or several resource scheduling methods in the implementation method.
  • Figure 1 shows an example of a cloud server ECS specification parameter adjustment scheme in the prior art.
  • Figure 2 shows an exemplary application scenario of the resource scheduling method according to the embodiment of the present application.
  • Figure 3 shows a schematic diagram of the flow of a resource scheduling method according to an embodiment of the present application.
  • Figure 4 shows an example of multiple scheduling methods according to embodiments of the present application.
  • Figure 5 shows a schematic diagram of the flow of a resource scheduling method according to an embodiment of the present application.
  • Figure 6 shows a schematic diagram of the flow of a resource scheduling method according to an embodiment of the present application.
  • Figure 7 shows a schematic diagram of the structure of a resource scheduling device according to an embodiment of the present application.
  • Figure 8 shows an exemplary structural diagram of a computing device according to an embodiment of the present application.
  • Figure 9 shows an exemplary structural diagram of a computing device cluster according to an embodiment of the present application.
  • Figure 10 shows a schematic diagram of a connection method between computing device clusters according to an embodiment of the present application.
  • exemplary means "serving as an example, example, or illustrative.” Any embodiment described herein as “exemplary” is not necessarily to be construed as superior or superior to other embodiments.
  • Virtual processor core (virtual CPU, vCPU): A central processing unit (CPU) can contain several physical processor cores. Through hyper-threading (HT) technology, one physical processor core can be made concurrent Run multiple threads independently, and one thread can be regarded as a virtual processor core vCPU.
  • HT hyper-threading
  • NUMA architecture is a common architecture in modern computers. As the speed of CPU performance improvement has gradually slowed down in recent years, methods of improving performance through multiple CPUs working together have begun to appear, and the NUMA architecture is an optimization solution for computer architecture that emerged along with this method.
  • the NUMA architecture sets up multiple physical processing nodes (often called NUMA nodes) on a single processor. Under the NUMA architecture, the processor accesses its own local memory faster than non-local memory.
  • the industry is dominated by single NUMA architecture and dual NUMA architecture.
  • the virtual processor core and memory included in the ECS are provided by a single NUMA node.
  • the dual NUMA architecture the virtual processor core and memory included in the ECS Provided jointly by two NUMA nodes.
  • Cloud server (elastic cloud server, ECS): It is a basic computing component composed of virtual processor core, memory, operating system, and cloud disk. After the cloud server is successfully created, you can use the cloud server in the cloud just like using a local computer or physical server.
  • Cloud computing is another new innovation in the information age after the Internet and computers. Cloud computing is a big leap in the information age. The future era may be the era of cloud computing. Although there are currently many definitions of cloud computing, overall Generally speaking, the basic meaning of cloud computing is the same, that is, cloud computing has strong scalability and necessity. Its core is to coordinate many computer resources together, so that users can obtain unlimited information through the network. resources, and the resources obtained at the same time are not limited by time and space.
  • NUMA Non-Uniform Memory Access Architecture
  • ECS cloud servers
  • NUMA architecture is a CPU design method that was born when computer architecture entered the multi-core era from single-core. It can set up NUMA nodes on the physical processor and divide all the virtual processor cores vCPU on the physical processor into different NUMA nodes. to speed up computer processing.
  • the scheduling strategy of the core vCPU is generally a single NUMA architecture method or a strategy of evenly placing vCPUs in a dual NUMA architecture.
  • the scheduling strategy of the virtual processor core vCPU corresponding to the cloud server ECS selected by the above-mentioned prior art also affects the cloud server ECS specification parameter adjustment scheme of each cloud vendor.
  • Figure 1 shows the cloud server ECS specification parameter adjustment scheme of the prior art. An example of.
  • the user first enters the manual adjustment page of ECS specification parameters.
  • the terminal device first adjusts the parameters according to the terminal device that can provide resources (i.e., in Figure 1 Resource usage of the resource pool), determine the available specifications, and display them on the ECS specification parameter manual adjustment page.
  • the user selects a certain specification parameter from the displayed specification parameters;
  • the terminal device creates a cloud server ECS that meets the specification parameters selected by the user based on the specification parameter, and refreshes the terminal device that can provide resources. Resource usage;
  • the fourth step is to display the successful adjustment of the cloud server ECS specification parameters on the ECS specification parameters manual adjustment page.
  • each optional adjustment method has fixed virtual processor core vCPU specification parameters (or instance specifications/parameters/types) and corresponding performance indicators, that is to say , when the user plans to slightly adjust the performance of the purchased cloud server ECS, since the cloud server ECS performance can only be changed by adjusting the specification parameter size or instance type, the specification parameters, instance type and optional resource scheduling Methods are bound one by one, and the optional resource scheduling methods may not be the best performance solution for users. In this case, users often have to make a choice between cost and performance. That is to say, the resource scheduling method of cloud server ECS in the existing technology cannot yet meet users' needs for cloud servers with multiple performances.
  • the present application provides a resource scheduling method.
  • the resource scheduling method of the embodiment of the present application can provide multiple scheduling methods under the same parameters, so that the performance of the cloud server is different under the multiple scheduling methods, satisfying the user's requirements. Requirements for cloud servers with various performances.
  • Figure 2 shows an exemplary application scenario of the resource scheduling method according to the embodiment of the present application.
  • this exemplary application scenario may include at least one terminal device.
  • the terminal device of this application may be a smartphone, a netbook, a tablet computer, a notebook computer, or a wearable electronic device based on the Non-Uniform Memory Access Architecture (MUMA). (such as smart bracelets, smart watches, etc.), TV, virtual reality equipment, speakers, electronic ink, etc.
  • MUMA Non-Uniform Memory Access Architecture
  • the resource scheduling method of this application can be applied to the first processor on a certain terminal device.
  • Other terminal devices can communicate with the terminal device.
  • each second processor may be provided with multiple physical processor cores (not shown), and each physical processor core may run multiple virtual processors core (vCPU); under the MUMA architecture, at least one MUMA node (not shown, also referred to as a physical processing node below) can be provided on each second processor, and multiple physical processing nodes on each second processor
  • the processor core can be divided into at least one MUMA node. When there are two or more MUMA nodes, multiple The physical processor cores can be evenly allocated to MUMA nodes or non-uniformly allocated to MUMA nodes. This application does not limit this.
  • the resource scheduling method in the embodiment of the present application can be used when a user purchases a cloud server ECS, or when a user adjusts a purchased cloud server ECS.
  • the resource scheduling method may be executed by the first processor and used to determine the schedulable resources under target parameters (such as specification parameters selected when the user purchases ECS, or specification parameters selected by the user when adjusting the performance of the purchased cloud server ECS, Or multiple scheduling methods based on the parameters determined by the user's usage of the cloud server under the current parameters, etc.), where the schedulable resources can refer to the remaining ECS on the MUMA node of each terminal device that has not yet been provided to any cloud server The virtual processor core used.
  • the first processor generates display data, and the display data is used to display an interface including the multiple scheduling methods and the performance of the corresponding cloud server, so that the user can select a scheduling method.
  • display data can be generated based on the user's usage of the cloud server under current parameters to adjust the display order of multiple scheduling methods on the interface.
  • the first processor can cause the second processor to complete resource scheduling according to the instructions of the scheduling method, so that at least one MUMA node provides a virtual processor core that meets the specification parameters, thereby completing the cloud server ECS creation or adjustment.
  • the first processor may be the same as the second processor, or may be different from the second processor, and this application does not limit this.
  • Figure 3 shows a schematic diagram of the flow of a resource scheduling method according to an embodiment of the present application.
  • this application proposes a resource scheduling method.
  • the method is applied to the first processor.
  • the method includes steps S1-S3:
  • Step S1 Obtain a first instruction indicating target parameters of the cloud server.
  • the target parameters can be the specification parameters selected by the user when purchasing the cloud server ECS, or the specification parameters selected by the user when adjusting the performance of the purchased cloud server ECS, or based on the user's preference for the cloud server ECS. Parameters determined by the usage of cloud server ECS under current parameters.
  • the target parameters may include the target number of virtual processor cores vCPU corresponding to the cloud server ECS and the target memory size of the cloud server ECS. The embodiments of this application do not limit the specific types of target parameters.
  • Step S2 Determine multiple scheduling methods of schedulable resources under target parameters based on the first instruction and the actual usage of the resources.
  • the schedulable resources are scheduled by at least one second processor based on a non-uniform memory access architecture. , when the second processor schedules schedulable resources for the cloud server according to different scheduling methods, the performance of the cloud server is different.
  • the actual usage of resources may refer to the virtual processor cores and provided objects that have been provided on the MUMA node of each terminal device (the terminal device where the first processor is located and the terminal device that can communicate with the first processor). , and virtual processor cores that have not been provided for use by any cloud server ECS, may be recorded based on a resource view (not shown) or the like.
  • the schedulable resources may refer to the remaining virtual processor cores on the MUMA nodes of each terminal device that have not yet been provided to any cloud server ECS.
  • the schedulable resources may be scheduled by at least one second processor based on a non-uniform memory access architecture.
  • Scheduling may refer to the second processor allocating schedulable resources to the cloud server in a certain manner, and the scheduling method may indicate which resources are allocated to the cloud server. According to the first instruction and the actual usage of the resource, multiple scheduling methods of the schedulable resources under the target parameters can be determined, and when schedulable resources are scheduled for the cloud server according to different scheduling methods, the performance of the cloud server can be different.
  • Step S3 Generate display data based on the multiple scheduling methods and the performance of the corresponding cloud server.
  • the display data is used to display an interface including the multiple scheduling methods and the performance of the corresponding cloud server.
  • the display data can be the A processor generates code corresponding to the interface to be displayed, etc.
  • the display data can display the interface to be displayed after being parsed by the browser of the client (not shown) used by the user.
  • the interface can be an ECS user interface or ECS Specification recommendation interface. Multiple scheduling methods and corresponding cloud server performance displayed on the interface are available for the user to choose. In this case, the user can select the corresponding scheduling method according to the performance requirements, so that the second processor can be selected according to the user's selection. By scheduling resources using the scheduling method, you can obtain the cloud server with the required performance.
  • the first instruction indicating the target parameters of the cloud server is obtained through the first server, and a variety of schedulable resources under the target parameters can be determined based on the first instruction and the actual usage of the resources.
  • Scheduling method therefore, there are multiple scheduling methods to choose from for schedulable resources under the same target parameters, which improves the flexibility of resource scheduling method selection; because schedulable resources are composed of at least one based on non-uniform memory access architecture
  • the second processor performs scheduling. When the second processor schedules schedulable resources for the cloud server according to different scheduling methods, the performance of the cloud server is different.
  • the performance of the cloud server is different under multiple scheduling methods; according to multiple scheduling methods and the performance of the corresponding cloud server to generate display data.
  • the display data is used to display an interface including multiple scheduling methods and the performance of the corresponding cloud server. It can meet the user's needs for cloud servers with multiple performances, and can adjust the scheduling method. Flexibly adjust the performance of cloud servers to improve user experience.
  • the resource includes a virtual processor core.
  • the second processor includes at least one physical processing node, and the physical processing node is used to schedule and run virtual processing.
  • the target parameters include the target number of virtual processor cores corresponding to the cloud server and the target memory size of the cloud server.
  • the physical processing node is the NUMA node mentioned above.
  • each second processor it may include at least one physical processing node.
  • the terminal device (physical host) where the second processor is located it may include at least one Physical processing node.
  • a terminal device includes a second processor, the second processor includes 10 physical processor cores, and each physical processor core can run (or control) 10 virtual processor cores; the second processor The processor includes 2 physical processing nodes under the non-uniform memory access architecture.
  • Each physical processing node includes 5 physical processor cores, that is, each physical processing node is allowed to provide (schedule and run) 50 virtual processors. Processor core.
  • the virtual processor core corresponding to the cloud server can be provided by one or both of the two physical processing nodes. For any physical processing node on the terminal device, after the virtual processor cores provided to the cloud server are sequentially deducted from the 50 virtual processor cores on the physical processing node, the remaining virtual processing on all physical processing nodes on the terminal device The processor core is the schedulable resource of the terminal device.
  • the target parameters may include the target number of virtual processor cores corresponding to the cloud server and the target memory size of the cloud server.
  • the two are usually in one-to-one correspondence.
  • the target number of virtual processor cores corresponding to the cloud server is 4, the target memory size of the cloud server can be 8GB; the target number of virtual processor cores corresponding to the cloud server When the quantity is 8, the target memory size of the cloud server can be 16GB.
  • the target number of virtual processor cores corresponding to the cloud server included in the target parameters is The quantity is 8 and the target memory size of the cloud server is 16GB as an example.
  • any physical processing node on the terminal device after the virtual processor cores provided to the cloud server are sequentially deducted from the 50 virtual processor cores on the physical processing node, all physical processing nodes on the terminal device The remaining virtual processor cores on the processing node are the schedulable resources of the terminal device. For example, if according to the resource scheduling scheme of the existing technology, if the number of virtual processor cores created each time is 8, the memory size It is a 16GB cloud server. If a single physical processing node provides a virtual processor core each time a cloud server is created, each physical processing node can support up to 6 cloud servers providing resources, and finally 2 virtual processor cores will be left.
  • the multiple scheduling methods proposed in the embodiments of this application can improve the utilization rate of "vCPU fragmentation". Examples of various scheduling methods proposed by the embodiments of this application are introduced below.
  • multiple scheduling methods include:
  • the virtual processor core corresponding to the cloud server and the memory of the cloud server are provided by a single physical processing node; and/or
  • the virtual processor cores corresponding to the cloud server and the memory of the cloud server are provided by two or more physical processing nodes, and each physical processing node provides the same number of virtual processor cores and the same size of memory; and/or
  • the virtual processor cores corresponding to the cloud server and the memory of the cloud server are provided by two or more physical processing nodes, and at least two physical processing nodes provide different numbers of virtual processor cores and/or memory sizes.
  • Figure 4 shows an example of multiple scheduling methods according to embodiments of the present application.
  • the target number of virtual processor cores corresponding to the cloud server included in the target parameters is 8, and the target memory size of the cloud server is 16GB.
  • the virtual processor core corresponding to the cloud server And if the memory of the cloud server is provided by a single physical processing node, then the single physical processing node needs to provide 8 virtual processor cores and 16GB of memory.
  • step S2 when determining the scheduling method, you can first determine whether there is a terminal device including a physical processing node that can independently provide 8 virtual processor cores and 16GB of memory based on resource usage. If there is a physical processing node that meets the needs (Node A1), and then determine that the single physical processing node needs to provide 8 virtual processor cores and 16GB of memory in a scheduling mode, and then display the scheduling mode in step S3.
  • step S2 when determining the scheduling method, you can first determine whether there is a terminal device including two physical processing nodes that can respectively provide 4 virtual processor cores and 8GB of memory based on resource usage.
  • Processing nodes (node A2 and node B2), and then confirm that the two physical processing nodes need to provide 4 virtual processor cores and 8GB memory respectively in a scheduling mode, and then display the scheduling mode in step S3.
  • the four physical processing nodes need to provide 2 virtual processor cores and 4GB of memory respectively. If in step S2, when determining the scheduling method, it is determined based on resource usage that one physical processing node on the terminal device meets the requirements of two physical processing nodes that can respectively provide 4 virtual processor cores and 8GB of memory. , the physical processing nodes on the terminal device or other terminal devices also meet the requirements of four (nodes A3-D3) physical processing nodes that can respectively provide 2 virtual processor cores and 4GB memory, then it can be determined that the two physical processing nodes The processing node needs to provide 4 virtual processor cores and 8GB memory respectively.
  • the scheduling method can exist at the same time as the four physical processing nodes need to provide 2 virtual processor cores and 4GB memory respectively. It includes multiple scheduling methods. And the corresponding cloud server Performance interface can be displayed together.
  • step S2 when determining the scheduling method, it can first be determined according to the resource usage whether there is a terminal device including a physical processing node that can provide 6 virtual processor cores and 12GB of memory, and a physical processing node that can provide 2 virtual processors. core and 4GB of memory.
  • node A4 and node B4 If there are physical processing nodes (node A4 and node B4) that meet the requirements, it can be determined that one physical processing node provides 6 virtual processor cores and 12GB of memory, and the other physical processing node provides The scheduling mode of 2 virtual processor cores and 4GB memory exists, and this scheduling mode is displayed again in step S3.
  • one of the three physical processing nodes may need to provide 4 virtual processor cores and 8GB of memory, and the other two may need to provide 2 virtual processor cores and 4GB of memory respectively.
  • step S2 when determining the scheduling method, it is determined according to the resource usage that there is a physical processing node of the terminal device that includes a physical processing node that can provide 6 virtual processor cores and 12GB of memory and a physical processing node that can provide 2
  • the physical processing node on this terminal device or other terminal device also meets the requirements of a physical processing node with 4 virtual processor cores and 4GB of memory.
  • the physical processing node (node A5) can provide 4 virtual processor cores and 8GB of memory.
  • node B5 and node C5 that can provide 2 virtual processor cores and 4GB of memory respectively.
  • one physical processing node provides 6 virtual processor cores and 12GB of memory, and the other The physical processing node provides a scheduling method with 2 virtual processor cores and 4GB memory.
  • This physical processing node can provide 4 virtual processor cores and 8GB memory.
  • the other two physical processing nodes need to provide 2 virtual processor cores respectively.
  • 4GB memory scheduling methods co-exist, and can be displayed together in an interface including multiple scheduling methods and corresponding cloud server performance.
  • this application provides specific numbers of physical processing nodes that provide virtual processor cores and memory in each scheduling method, as well as the specific number of physical processing nodes for each scheduling method. There are no restrictions on the number of virtual processor cores and memory size provided by a physical processing node, as well as the specific number of scheduling methods displayed.
  • step S3 when generating display data, multiple scheduling methods and corresponding cloud server performance can be sorted according to performance to generate display data. In this case, the multiple scheduling methods and corresponding cloud servers displayed are The cloud server performance can also be displayed in the order of cloud server performance, making the display effect better.
  • Table 1 shows an example showing multiple scheduling methods and corresponding cloud server performance according to the embodiment of the present application.
  • the target number of virtual processor cores corresponding to the cloud server included in the target parameters is 8 and the target memory size of the cloud server is 16GB
  • one physical processing node provides 6 virtual processor cores and 12GB Memory
  • another physical processing node provides 2 virtual processor cores and 4GB of memory.
  • the cloud server performance (75%) corresponding to the scheduling method (scheduling method name is s6.2xlarge.2-C) is lower than that of two physical processing nodes. It is necessary to provide the cloud server performance (80%) corresponding to the scheduling mode of 4 virtual processor cores and 8GB memory (the scheduling mode name is s6.2xlarge.2-B).
  • the scheduling mode name is s6.2xlarge.2-B.
  • the performance of the cloud server corresponding to the scheduling method is lower than that of the cloud server corresponding to the scheduling method (scheduling method name is s6.2xlarge.2-A) that requires a single physical processing node to provide 8 virtual processor cores and 16GB of memory.
  • the performance of cloud servers is directly proportional to the price. Therefore, when displaying multiple scheduling methods and the performance of the corresponding cloud servers, the corresponding prices can also be displayed to facilitate users to choose, thereby reducing the cost of using cloud servers for users.
  • the two or more physical processing nodes are located on the same computer.
  • the final cloud server can have a non-uniform memory access architecture.
  • the processor accesses local storage (memory) faster than accessing non-local storage.
  • Figure 5 shows a schematic diagram of the flow of a resource scheduling method according to an embodiment of the present application.
  • step S3 the method further includes steps S4-S6:
  • Step S4 Receive a second instruction from the user, and the second instruction indicates one of multiple scheduling methods
  • Step S5 causing the second processor to schedule schedulable resources for the cloud server according to the scheduling method indicated by the second instruction;
  • Step S6 Update the actual usage of the resource according to the resource status on the second processor.
  • the display data can be output to the client (not shown), so that the client (not shown) can display an interface including multiple scheduling methods and corresponding cloud server performance to the user.
  • the user for example, through a client, not shown
  • the second instruction instructs one physical processing node (for example, node A4) to provide 6 virtual processor cores and 12GB of memory
  • another The physical processing node for example, node B4) provides a scheduling method of 2 virtual processor cores and 4GB memory.
  • step S5 when the second processor is caused to schedule schedulable resources for the cloud server according to the scheduling method indicated by the second instruction,
  • the first processor will control the second processor to complete the actual resource scheduling, deducting 6 virtual processor cores and 12GB memory from the resources of node A4, and deducting 2 virtual processor cores and 12GB memory from the resources of node B4.
  • Processor core, 4GB memory After completing step S5, the cloud server under the required target parameters is obtained.
  • step S5 After executing step S5, since the cloud server is successfully created, the actual usage of resources of the terminal device where node A4 and/or node B4 is located will change, except for the terminal device where node A4 and/or node B4 is located. The actual resource usage of the terminal device remains unchanged. Therefore, in step S6, when updating the actual usage of resources, it is enough to update the actual usage of resources of the terminal device where node A4 and/or node B4 is located according to the resource status on the second processor to save data. Processing costs.
  • this application also proposes multiple acquisition methods for the first instruction, so that not only users can actively adjust the cloud server Specification parameters and performance, you can also monitor the virtual processor core and memory utilization of the user's existing cloud server, and based on the relationship between the utilization of the user's cloud server and the performance indicators of the purchased cloud server within a period of time, Users recommend suitable specifications and performance.
  • Various ways of obtaining the first instruction in the embodiment of the present application are introduced below.
  • obtaining the first instruction includes:
  • Obtain the user's usage of the cloud server under current parameters which include the current number of virtual processor cores corresponding to the cloud server and the current memory size of the cloud server; obtain the first instruction based on the usage.
  • the first instruction may be issued by the user, and the target parameters may be specified by the user.
  • the first processor can obtain the user's usage of the cloud server under current parameters, where the current parameters may refer to the specifications of the purchased cloud server, and may include virtual data corresponding to the cloud server.
  • the current number of processor cores and the current memory size of the cloud server; the usage may be, for example, the utilization of virtual processor cores and memory of the cloud server, and the utilization may be determined based on existing technology.
  • the first instruction can also be obtained based on the user's usage of the cloud server under current parameters, where the target parameters may include the appropriate number of virtual processor cores and memory determined based on the user's usage of the cloud server under current parameters. size.
  • the scheduling method can also be displayed to the user so that the user After selecting the resource scheduling method, you can obtain a cloud server with more suitable performance.
  • multiple scheduling methods can be determined based on the target parameters indicated by the user, and it can also proactively provide services for those users whose performance is not suitable.
  • Cloud server users determine appropriate target parameters and provide recommendations for multiple scheduling methods, which can improve the user experience.
  • the first instruction is obtained according to usage conditions, including:
  • the first instruction is obtained.
  • the current parameters of the cloud server are 8 virtual processor cores and 16G memory. If the usage situation is such that the virtual processor core and memory utilization of the cloud server is 50%, then the virtual processor core that meets the usage situation The minimum value of the quantity can be 4 (8*50%), and the minimum value of the memory size can be 8G (16G*50%). If the usage is such that the virtual processor core and memory utilization of the cloud server is 70%, the minimum number of virtual processor cores that meets the usage can be 6 (greater than the integer minimum value of 8*70%), memory The minimum size can be 12G (an integer minimum greater than 16G*70%).
  • the minimum number of virtual processor cores and the minimum memory size determined in this way can be used as target parameters.
  • the first processor can determine the appropriate The target parameters are obtained and the first instruction is obtained, so that multiple scheduling methods can still be displayed, which can further optimize the user experience.
  • Figure 6 shows a schematic diagram of the flow of a resource scheduling method according to an embodiment of the present application.
  • the method further includes:
  • Step S7 Obtain the user's usage of the cloud server under current parameters.
  • the current parameters include the current number of virtual processor cores corresponding to the cloud server and the current memory size of the cloud server;
  • Step S3 includes:
  • Display data is generated according to the order of proximity between the multiple scheduling methods and the usage situation from large to small.
  • the multiple scheduling methods are based on the relationship between themselves and the usage situation.
  • the proximity is displayed in descending order.
  • the user's usage of the cloud server under the current parameters can also be obtained and used to determine multiple How close a scheduling method is to usage.
  • the user's usage of the cloud server under the current parameters can also include the number of packets sent and received by the intranet, etc.
  • the maximum number of packets sent and received by the intranet under each scheduling method is certain (an example can be Referring to Table 1), the difference between the maximum number of packets sent and received by the intranet and the number of packets sent and received by the intranet in the usage situation can be determined. The smaller the difference, the greater the degree of proximity. The greater the difference, the smaller the degree of proximity.
  • the display data can be generated in descending order according to the proximity of multiple scheduling methods and usage.
  • the display data is output to the client (not shown), in the interface displayed by the client (not shown) according to the display data, multiple scheduling methods are performed in descending order of proximity to the usage situation. exhibit.
  • This application is based on multiple There are no restrictions on the scheduling method and the specific method of generating display data based on the performance of the corresponding cloud server.
  • the display effects of the multiple scheduling methods displayed can also be optimized based on the user's usage of the cloud server under the current parameters, which can improve the display generated by the resource scheduling method.
  • Data s ability to demonstrate multiple scheduling approaches.
  • FIG. 7 shows a schematic diagram of the structure of a resource scheduling device according to an embodiment of the present application.
  • the device is applied to a first processor, and the device includes:
  • a first acquisition module configured to acquire a first instruction, where the first instruction indicates the target parameters of the cloud server;
  • Determining module configured to determine whether the schedulable resource is in the target parameter according to the first instruction and the actual usage of the resource.
  • the schedulable resources are scheduled by at least one second processor based on a non-uniform memory access architecture.
  • the second processor schedules the schedulable resources for the cloud server according to different scheduling methods. When using resources, the performance of the cloud server is different;
  • a generation module configured to generate display data according to the multiple scheduling methods and the performance of the corresponding cloud server, where the display data is used to display an interface including the multiple scheduling methods and the performance of the corresponding cloud server.
  • the resource includes a virtual processor core.
  • the second processor includes at least one physical processing node, and the physical processing node is used to schedule and run virtual processing.
  • the target parameters include the target number of virtual processor cores corresponding to the cloud server and the target memory size of the cloud server.
  • the multiple scheduling methods include: the virtual processor core corresponding to the cloud server and the memory of the cloud server are provided by a single physical processing node; and/or the virtual processor core corresponding to the cloud server
  • the virtual processor cores and the memory of the cloud server are provided by two or more physical processing nodes, and each physical processing node provides the same number of virtual processor cores and the same size of memory; and/or the cloud server corresponds to
  • the virtual processor cores and the memory of the cloud server are provided by two or more physical processing nodes, and the number of virtual processor cores and/or memory sizes provided by at least two physical processing nodes are different.
  • the two or more physical processing nodes are located on the same computer. superior.
  • the device further includes:
  • a receiving module configured to receive a second instruction from the user, where the second instruction indicates one of the multiple scheduling methods
  • a scheduling module configured to cause the second processor to schedule schedulable resources for the cloud server in accordance with the scheduling method indicated by the second instruction
  • An update module configured to update the actual usage of the resource according to the resource status on the second processor.
  • the first acquisition module includes: a receiving unit for receiving the first instruction from the user, or an acquisition unit for acquiring the user's usage of the cloud server under current parameters, so
  • the current parameters include the current number of virtual processor cores corresponding to the cloud server and the current memory size of the cloud server; a processing unit is used to obtain the first instruction according to the usage situation.
  • the processing unit includes: a determination subunit, used to determine a minimum number of virtual processor cores and a minimum memory size that satisfy the usage situation; a processing subunit, used to determine Using the minimum value of the number of virtual processor cores and the minimum memory size as the target parameters, the first instruction is obtained.
  • the device when the first instruction comes from the user, the device further includes:
  • the second acquisition module is used to obtain the user's usage of the cloud server under current parameters.
  • the current parameters include the current number of virtual processor cores corresponding to the cloud server and the current memory size of the cloud server;
  • the generation module includes: a generation unit, configured to generate display data according to the order of proximity between the multiple scheduling methods and the usage situation in descending order, wherein, among the interfaces displayed according to the display data, The multiple scheduling methods are displayed in descending order of their proximity to the usage situation.
  • the first acquisition module, determination module, generation module, receiving module, scheduling module, update module and second acquisition module can all be implemented by software, or can be implemented by hardware.
  • the following takes the first acquisition module as an example to introduce the implementation method of the first acquisition module.
  • the implementation of the determination module, generation module, receiving module, scheduling module, update module and second acquisition module can refer to the implementation of the first acquisition module.
  • a module may include code running on a computing instance.
  • the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container.
  • the above computing instance may be one or more.
  • the first acquisition module may include code running on multiple hosts/virtual machines/containers. It should be noted that multiple hosts/virtual machines/containers used to run the code can be distributed in the same region (region) or in different regions. Further, multiple hosts/virtual machines/containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs. Each AZ includes one data center or multiple AZs. geographically close data centers. Among them, usually a region can include multiple AZs.
  • the multiple hosts/VMs/containers used to run the code can be distributed in the same virtual private cloud (VPC), or across multiple VPCs.
  • VPC virtual private cloud
  • Cross-region communication between two VPCs in the same region and between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway. .
  • the first acquisition module may include at least one computing device, such as a server.
  • the first acquisition module may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL), or any combination thereof.
  • CPLD complex programmable logical device
  • FPGA field-programmable gate array
  • GAL general array logic
  • Multiple computing devices included in the first acquisition module may be distributed in the same region or in different regions. Multiple computing devices included in the first acquisition module may be distributed in the same AZ or in different AZs. Similarly, multiple computing devices included in the first acquisition module may be distributed in the same VPC or in multiple VPCs.
  • the plurality of computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
  • any one of the first acquisition module, determination module, generation module, receiving module, scheduling module, update module and second acquisition module can be used to perform any step in the resource scheduling method.
  • the steps responsible for implementation by the first acquisition module, determination module, generation module, receiving module, scheduling module, update module and second acquisition module can be specified as needed, through the first acquisition module, determination module, generation module, receiving module, scheduling The module, the update module and the second acquisition module respectively implement different steps in the resource scheduling method to realize all functions of the resource scheduling device.
  • FIG. 8 shows an exemplary structural diagram of a computing device according to an embodiment of the present application.
  • computing device 100 includes: bus 102 , first processor 104 , memory 106 , and communication interface 108 .
  • the first processor 104, the memory 106 and the communication interface 108 communicate through the bus 102.
  • Computing device 100 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 100.
  • the bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one line is used in Figure 8, but it does not mean that there is only one bus or one type of bus.
  • Bus 102 may include a path that carries information between various components of computing device 100 (eg, memory 106, first processor 104, communications interface 108).
  • the first processor 104 may include a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP) or a digital signal processing unit. Any one or more types of processors such as digital signal processor (DSP).
  • CPU central processing unit
  • GPU graphics processing unit
  • MP microprocessor
  • DSP digital signal processor
  • Memory 106 may include volatile memory, such as random access memory (RAM).
  • RAM random access memory
  • the processor 104 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, mechanical hard disk drive (hard disk drive, HDD) or solid state drive (solid state drive). drive, SSD).
  • ROM read-only memory
  • HDD hard disk drive
  • SSD solid state drive
  • the memory 106 stores executable program code, and the first processor 104 executes the executable program code to respectively implement the functions of the aforementioned first acquisition module, determination module, generation module, etc., thereby implementing the resource scheduling method. That is, the memory 106 stores instructions for executing the resource scheduling method.
  • the communication interface 103 uses transceiver modules such as, but not limited to, network interface cards and transceivers to implement communication between the computing device 100 and other devices or communication networks.
  • An embodiment of the present application also provides a computing device cluster.
  • the computing device cluster includes at least one computing device.
  • the computing device may be a server, such as a central server, an edge server, or a local server in a local data center.
  • the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
  • Figure 9 shows an exemplary structural diagram of a computing device cluster according to an embodiment of the present application.
  • the computing device cluster includes at least one computing device 100 .
  • the same instructions for performing the resource scheduling method may be stored in the memory 106 of one or more computing devices 100 in the computing device cluster.
  • the memory 106 of one or more computing devices 100 in the computing device cluster may also store part of the instructions for executing the resource scheduling method.
  • a combination of one or more computing devices 100 may collectively execute instructions for performing a resource scheduling method.
  • the memories 106 in different computing devices 100 in the computing device cluster may store different instructions, respectively used to execute part of the functions of the resource scheduling device. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more modules among the aforementioned first acquisition module, determination module, and generation module.
  • one or more computing devices in a cluster of computing devices may be connected through a network.
  • the network may be a wide area network or a local area network, etc.
  • Figure 10 shows a schematic diagram of a connection method between computing device clusters according to an embodiment of the present application. .
  • two computing devices 100A and 100B are connected through a network.
  • the connection to the network is made through a communication interface in each computing device.
  • instructions for performing the functions of the first acquisition module are stored in the memory 106 of the computing device 100A.
  • the memory 106 in the computing device 100B stores instructions for performing the functions of the determining module and the generating module.
  • connection mode between computing device clusters shown in Figure 10 can be based on the fact that some steps in the resource scheduling method provided by this application are related to the user (for example, receiving the first instruction and the second instruction from the user), and other steps are related to the user.
  • User-independent for example, determining multiple scheduling methods of schedulable resources under target parameters, generating display data based on multiple scheduling methods and corresponding cloud server performance
  • the functions are performed by computing device 100B.
  • computing device 100A shown in FIG. 10 may also be performed by multiple computing devices 100 .
  • the functions of computing device 100B may also be performed by multiple computing devices 100 .
  • An embodiment of the present application also provides a computer program product containing instructions.
  • the computer program product may be a software or program product containing instructions capable of running on a computing device or stored in any available medium.
  • the computer program product is run on at least one computing device, at least one computing device is caused to execute the resource scheduling method.
  • An embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be any available medium that a computing device can store or a data storage device such as a data center that contains one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
  • the computer-readable storage medium includes instructions that instruct a computing device to perform a resource scheduling method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请涉及一种资源调度方法、装置、计算设备集群、介质及程序产品,所述方法应用于第一处理器,所述方法包括:获取第一指令,第一指令指示云服务器的目标参数;根据第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,在第二处理器按照不同调度方式为云服务器调度可调度的资源时,云服务器的性能不同;根据所述多种调度方式及对应的云服务器的性能生成展示数据,所述展示数据用于展示包括所述多种调度方式及对应的云服务器的性能的界面。根据本申请实施例的资源调度方法,能够在相同参数下提供多种调度方式,使得多种调度方式下云服务器的性能不同,满足用户对于多种性能的云服务器的需求。

Description

资源调度方法、装置、计算设备集群、介质及程序产品
本申请要求于2022年8月4日提交中国专利局、申请号为202210932565.8、申请名称为“资源调度方法、装置、计算设备集群、介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云计算领域,尤其涉及一种资源调度方法、装置、计算设备集群、介质及程序产品。
背景技术
云计算是继互联网、计算机后在信息时代又一种新的革新,云计算可以将很多的计算机资源协调在一起,使用户通过网络就可以获取到无限的资源,同时获取的资源不受时间和空间的限制。例如云服务器(elastic cloud server,ECS)是由虚拟处理器核(virtual CPU,vCPU)、内存、操作系统、云硬盘组成的基础的计算组件,云服务器创建成功后,用户就可以像使用自己的本地计算机或本地服务器一样,通过网络使用云服务器。
创建好的云服务器具有一定的规格参数,例如云服务器所对应的vCPU数量以及内存大小等,现有的云服务器的规格参数与性能的关系通常是一一对应的,即用户只能通过调整云服务器规格参数的大小来调整云服务器性能的高低。在一些情况下,对于用户来说,虽然当前规格参数下云服务器的性能并不合适,但更高的规格参数下或更低的规格参数下的云服务器可能也不是性能最合适的。因此,如何满足用户对于多种性能的云服务器的需求,成为本领域的研究热点。
发明内容
有鉴于此,提出了一种资源调度方法、装置、计算设备集群、介质及程序产品,根据本申请实施例的资源调度方法,能够在相同参数下提供多种调度方式,使得多种调度方式下云服务器的性能不同,满足用户对于多种性能的云服务器的需求。
第一方面,本申请的实施例提供了一种资源调度方法,所述方法应用于第一处理器,所述方法包括:获取第一指令,所述第一指令指示云服务器的目标参数;根据所述第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,所述可调度的资源由至少一个基于非一致性内存访问架构的第二处理器进行调度,在第二处理器按照不同调度方式为所述云服务器调度可调度的资源时,所述云服务器的性能不同;根据所述多种调度方式及对应的云服务器的性能生成展示数据,所述展示数据用于展示包括所述多种调度方式及对应的云服务器的性能的界面。
根据本申请实施例的资源调度方法,通过第一处理器获取指示云服务器的目标参数的第一指令,可根据第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,因此,同一目标参数下有可调度的资源有多种调度方式可供选择,提升了资源调度方式的选择的灵活性;由于可调度的资源由至少一个基于非一致性内存访问架构的第二处理 器进行调度,在第二处理器按照不同调度方式为云服务器调度可调度的资源时,云服务器的性能不同,因此,多种调度方式下云服务器的性能不同;根据多种调度方式及对应的云服务器的性能生成展示数据,展示数据用于展示包括多种调度方式及对应的云服务器的性能的界面,可满足用户对于多种性能的云服务器的需求,并能够通过调整调度方式灵活调整云服务器的性能,提升用户体验。
根据第一方面,在所述资源调度方法的第一种可能的实现方式中,所述资源包括虚拟处理器核,针对每一第二处理器,该第二处理器包括至少一个物理处理节点,所述物理处理节点用于调度和运行虚拟处理器核,所述目标参数包括所述云服务器对应的虚拟处理器核的目标数量和所述云服务器的目标内存大小。
根据第一方面的第一种可能的实现方式,在所述资源调度方法的第二种可能的实现方式中,所述多种调度方式包括:所述云服务器对应的虚拟处理器核以及所述云服务器的内存由单个物理处理节点提供;和/或所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且每个物理处理节点提供相同数量的虚拟处理器核以及相同大小的内存;和/或所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且至少两个物理处理节点提供的虚拟处理器核数量和/或内存大小不同。
通过这种方式,使得每个物理节点上剩余的较少数量的虚拟处理器核也可以被调度和运行,使得可以提高资源的利用率,降低创建云服务器所必需的硬件成本以及数据处理成本。同时多种调度方式也为资源的调度提供了更多选择,可以提升资源调度的灵活性。
根据第一方面的第二种可能的实现方式,在所述资源调度方法的第三种可能的实现方式中,所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供时,该两个及以上的物理处理节点位于同一计算机上。
调度位于同一计算机(终端设备)上的物理处理节点的资源时,才能够使得最终得到的云服务器能够具备非一致性内存访问架构下处理器在访问本地存储器(内存)时快于访问非本地存储器的优势。通过这种方式以提升第二处理器为云服务器调度可调度的资源时的性能。
根据第一方面,或以上第一方面的任意一种可能的实现方式,在所述资源调度方法的第四种可能的实现方式中,所述根据所述多种调度方式及对应的云服务器的性能生成展示数据之后,所述方法还包括:接收来自用户的第二指令,所述第二指令指示所述多种调度方式之一;使所述第二处理器按照所述第二指令指示的调度方式为所述云服务器调度可调度的资源;根据所述第二处理器上的资源状态,更新所述资源的实际使用情况。
通过这种方式,可以获得满足需求的云服务器,并保证资源的实际使用情况的准确度。
根据第一方面,或以上第一方面的任意一种可能的实现方式,在所述资源调度方法的第五种可能的实现方式中,所述获取第一指令,包括:接收来自用户的第一指令,或者获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;根据所述使用情况得到所述第一指令。
通过这种方式,既可以在用户有购买新的云服务器,或者有调整已购买的云服务器的需求时根据用户指示的目标参数确定多种调度方式,又可以主动为正在使用性能并不合适的云服务器的用户确定合适的目标参数并提供多种调度方式的推荐,能够提升用户的使用体验。
根据第一方面的第五种可能的实现方式,在所述资源调度方法的第六种可能的实现方式 中,所述根据所述使用情况得到所述第一指令,包括:确定满足所述使用情况的虚拟处理器核的数量的最小值和内存大小的最小值;将所述虚拟处理器核的数量的最小值和内存大小的最小值作为所述目标参数,得到所述第一指令。
通过这种方式确定的虚拟处理器核的数量的最小值和内存大小的最小值,可以作为目标参数,在此情况下,即便用户没有指示明确的目标参数,第一处理器也可以确定合适的目标参数,并得到第一指令,使得仍然能够展示多种调度方式,可以进一步优化用户体验。
根据第一方面的第五种可能的实现方式,在所述资源调度方法的第七种可能的实现方式中,在所述第一指令来自用户时,所述方法还包括:获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;所述根据所述多种调度方式及对应的云服务器的性能生成展示数据,包括:根据所述多种调度方式与所述使用情况的接近程度由大到小的顺序,生成展示数据,其中,在根据所述展示数据所展示的界面中,所述多种调度方式以自身与所述使用情况的接近程度由大到小的顺序展示。
通过这种方式,使得在用户指示明确的目标参数时,也可以基于用户对当前参数下的云服务器的使用情况对展示的多种调度方式的展示效果进行优化,可以提升资源调度方法生成的展示数据在展示多种调度方式方面的能力。
第二方面,本申请的实施例提供了一种资源调度装置,所述装置包括:第一获取模块,用于获取第一指令,所述第一指令指示云服务器的目标参数;确定模块,用于根据所述第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,所述可调度的资源由至少一个基于非一致性内存访问架构的第二处理器进行调度,在第二处理器按照不同调度方式为所述云服务器调度可调度的资源时,所述云服务器的性能不同;生成模块,用于根据所述多种调度方式及对应的云服务器的性能生成展示数据,所述展示数据用于展示包括所述多种调度方式及对应的云服务器的性能的界面。
根据第二方面,在所述资源调度装置的第一种可能的实现方式中,所述资源包括虚拟处理器核,针对每一第二处理器,该第二处理器包括至少一个物理处理节点,所述物理处理节点用于调度和运行虚拟处理器核,所述目标参数包括所述云服务器对应的虚拟处理器核的目标数量和所述云服务器的目标内存大小。
根据第二方面的第一种可能的实现方式,在所述资源调度装置的第二种可能的实现方式中,所述多种调度方式包括:所述云服务器对应的虚拟处理器核以及所述云服务器的内存由单个物理处理节点提供;和/或所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且每个物理处理节点提供相同数量的虚拟处理器核以及相同大小的内存;和/或所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且至少两个物理处理节点提供的虚拟处理器核数量和/或内存大小不同。
根据第二方面的第二种可能的实现方式,在所述资源调度装置的第三种可能的实现方式中,所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供时,该两个及以上的物理处理节点位于同一计算机上。
根据第二方面,或以上第二方面的任意一种可能的实现方式,在所述资源调度装置的第四种可能的实现方式中,所述装置还包括:接收模块,用于接收来自用户的第二指令,所述 第二指令指示所述多种调度方式之一;调度模块,用于使所述第二处理器按照所述第二指令指示的调度方式为所述云服务器调度可调度的资源;更新模块,用于根据所述第二处理器上的资源状态,更新所述资源的实际使用情况。
根据第二方面,或以上第二方面的任意一种可能的实现方式,在所述资源调度装置的第五种可能的实现方式中,所述第一获取模块包括:接收单元,用于接收来自用户的第一指令,或者获取单元,用于获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;处理单元,用于根据所述使用情况得到所述第一指令。
根据第二方面的第五种可能的实现方式,在所述资源调度装置的第六种可能的实现方式中,所述处理单元包括:确定子单元,用于确定满足所述使用情况的虚拟处理器核的数量的最小值和内存大小的最小值;处理子单元,用于将所述虚拟处理器核的数量的最小值和内存大小的最小值作为所述目标参数,得到所述第一指令。
根据第二方面的第五种可能的实现方式,在所述资源调度装置的第七种可能的实现方式中,在所述第一指令来自用户时,所述装置还包括:第二获取模块,用于获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;所述生成模块包括:生成单元,用于根据所述多种调度方式与所述使用情况的接近程度由大到小的顺序,生成展示数据,其中,根据所述展示数据所展示的界面中,所述多种调度方式以自身与所述使用情况的接近程度由大到小的顺序展示。
第三方面,本申请的实施例提供了一种计算设备集群,包括至少一个计算设备,每个计算设备包括第一处理器和存储器;所述至少一个计算设备的第一处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的资源调度方法。
第四方面,本申请的实施例提供了一种计算机可读存储介质,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的资源调度方法。
第五方面,本申请的实施例提供了一种包含指令的计算机程序产品,当所述指令被计算设备集群运行时,使得所述计算设备集群执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的资源调度方法。
本申请的这些和其他方面在以下(多个)实施例的描述中会更加简明易懂。
附图说明
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本申请的示例性实施例、特征和方面,并且用于解释本申请的原理。
图1示出现有技术的云服务器ECS规格参数调整方案的一个示例。
图2示出根据本申请实施例的资源调度方法的示例性应用场景。
图3示出根据本申请实施例的资源调度方法的流程的示意图。
图4示出根据本申请实施例的多种调度方式的一个示例。
图5示出根据本申请实施例的资源调度方法的流程的示意图。
图6示出根据本申请实施例的资源调度方法的流程的示意图。
图7示出根据本申请实施例的资源调度装置的结构的示意图。
图8示出根据本申请实施例的计算设备的示例性结构图。
图9示出根据本申请实施例的计算设备集群的示例性结构图。
图10示出根据本申请实施例的计算设备集群之间的连接方式的示意图。
具体实施方式
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。
以下对本文中出现的部分术语进行解释。
虚拟处理器核(virtual CPU,vCPU):一个中央处理器(central processing unit,CPU)可以包含若干个物理处理器核,通过超线程(hyper-threading,HT)技术可以使一个物理处理器核并发地运行多个线程,一个线程即可视为一个虚拟处理器核vCPU。
非一致性内存访问(non-uniform memory access,NUMA)架构:NUMA架构是近代计算机常见的一种架构。随着近年来CPU性能提升速度的逐渐放缓,开始出现通过多个CPU共同工作来提升性能的方式,而NUMA架构则是伴随这种方式出现的一种计算机架构的优化方案。NUMA架构在单个处理器上设置多个物理处理节点(通常称为NUMA节点),在NUMA架构下,处理器访问自己的本地存储器的速度比非本地存储器快一些。一般业内以单NUMA架构和双NUMA架构为主,采用单NUMA架构时ECS所包括的虚拟处理器核以及内存由单个NUMA节点提供,采用双NUMA架构时,ECS所包括的虚拟处理器核以及内存由两个NUMA节点共同提供。
云服务器(elastic cloud server,ECS):是由虚拟处理器核、内存、操作系统、云硬盘组成的基础的计算组件。云服务器创建成功后,就可以像使用本地计算机或物理服务器一样,在云端使用云服务器。
下面对现有技术的云计算技术以及云服务器进行介绍。
云计算是继互联网、计算机后在信息时代又一种新的革新,云计算是信息时代的一个大飞跃,未来的时代可能是云计算的时代,虽然目前有关云计算的定义有很多,但总体上来说,云计算的基本含义是一致的,即云计算具有很强的扩展性和需要性,其核心是可以将很多的计算机资源协调在一起,因此,使用户通过网络就可以获取到无限的资源,同时获取的资源不受时间和空间的限制。
当前非一致性内存访问架构(NUMA)是业界广泛采用的计算机架构设计方式,在云厂商推出的云服务器(ECS)中普遍使用。NUMA架构是计算机架构从单核进入到多核时代时,诞生的CPU设计方式,能够通过在物理处理器上设置NUMA节点、并将物理处理器上所有的虚拟处理器核vCPU分到不同的NUMA节点上,以加快计算机处理速度。在利用NUMA架构创建虚拟化的云服务器ECS时,对于相同规格参数(云服务器ECS所对应的虚拟处理器核vCPU数量以 及内存大小等)的云服务器ECS,虚拟处理器核vCPU的调度策略不同时,云服务器ECS的性能表现上也有差异。业界已知现状为:单NUMA架构(同一云服务器ECS对应的所有虚拟处理器核vCPU由单个NUMA节点提供)>双NUMA架构vCPU均分放置(同一云服务器ECS对应的所有虚拟处理器核vCPU由两个NUMA节点提供,两个节点提供的vCPU数量相同)>双NUMA架构vCPU不均分放置(同一云服务器ECS对应的所有虚拟处理器核vCPU由两个NUMA节点提供,两个节点提供的vCPU数量不同)。这也就使得,为了保证同规格参数的云服务器ECS的性能与友商相比更具优势,现有技术中,云厂商在创建云服务器ECS时,所选择的云服务器ECS所对应的虚拟处理器核vCPU的调度策略,一般为单NUMA架构方式或者双NUMA架构vCPU均分放置的策略。
上述现有技术所选择的云服务器ECS所对应的虚拟处理器核vCPU的调度策略同样影响着各个云厂商的云服务器ECS规格参数调整方案,图1示出现有技术的云服务器ECS规格参数调整方案的一个示例。
如图1所示,用户首先进入ECS规格参数手动调整页面,第一步,当用户给出云服务器ECS规格参数调整的指令后,终端设备首先根据该能够提供资源的终端设备(即图1中的资源池)的资源的使用情况,确定可用的规格参数,并在ECS规格参数手动调整页面上展示。第二步,用户从展示的规格参数中选择某一规格参数;第三步,终端设备根据该规格参数,创建出符合用户选择的规格参数的云服务器ECS,并刷新能够提供资源的终端设备的资源的使用情况;第四步,在ECS规格参数手动调整页面上展示云服务器ECS规格参数调整成功的信息。
然而,现有技术的云服务器ECS规格参数调整方案中,每种可选择的调整方式具有固定的虚拟处理器核vCPU规格参数(或实例规格/参数/类型)与对应的性能指标,也就是说,当用户计划对于已采购的云服务器ECS性能进行略加调整时,由于只能在调整规格参数大小或实例类型的前提下来改变云服务器ECS性能,规格参数、实例类型又和可选择的资源调度方式一一绑定,而可选择的资源调度方式对于用户来说可能都不是性能最佳方案,此时用户往往只能在成本与性能方面进行取舍。也即,现有技术的云服务器ECS的资源调度方式尚不能满足用户对于多种性能的云服务器的需求。
为了解决上述技术问题,本申请提供了一种资源调度方法,本申请实施例的资源调度方法能够在相同参数下提供多种调度方式,使得多种调度方式下云服务器的性能不同,满足用户对于多种性能的云服务器的需求。
图2示出根据本申请实施例的资源调度方法的示例性应用场景。
举例来说,该示例性应用场景中可包括至少一个终端设备,本申请的终端设备可以是基于非一致性内存访问架构(MUMA)的智能手机、上网本、平板电脑、笔记本电脑、可穿戴电子设备(如智能手环、智能手表等)、TV、虚拟现实设备、音响、电子墨水,等等。本申请的资源调度方法可以应用于某一终端设备上的第一处理器,其他终端设备可以与该终端设备通信,该终端设备上以及可与该终端设备通信的其他终端设备上还可设置有基于非一致性内存访问架构的多个第二处理器,每个第二处理器上可设置有多个物理处理器核(未示出),每个物理处理器核可运行多个虚拟处理器核(vCPU);在MUMA架构下,每个第二处理器上可设置有至少一个MUMA节点(未示出,下文中也称为物理处理节点),每个第二处理器上的多个物理处理器核可以被分到至少一个MUMA节点上,其中在MUMA节点有两个或两个以上时,多个 物理处理器核可以均匀分到MUMA节点上,也可以是非均匀分到MUMA节点上,本申请对此不作限制。
本申请实施例的资源调度方法可以在用户购买云服务器ECS时、或者在用户调整已购买的云服务器ECS时使用。资源调度方法可以由第一处理器执行,用于确定可调度的资源在目标参数(例如为用户购买ECS时选择的规格参数,或用户调整已购买的云服务器ECS的性能时选择的规格参数,或根据用户对当前参数下的云服务器的使用情况确定的参数等等)下的多种调度方式,其中可调度的资源可以指各终端设备的MUMA节点上剩余的、尚未提供给任意云服务器ECS使用的虚拟处理器核。第一处理器生成展示数据,展示数据用于展示包括该多种调度方式及对应的云服务器的性能的界面,以供用户选择一种调度方式。可选地,在生成展示数据时,可以基于用户对当前参数下的云服务器的使用情况生成展示数据,以对界面上多种调度方式的展示顺序进行调整。进一步地,根据用户选择的调度方式,第一处理器可以使第二处理器按照该调度方式的指示完成资源调度,使至少一个MUMA节点提供符合规格参数的虚拟处理器核,从而完成云服务器ECS的创建或调整。
其中,第一处理器可以与第二处理器相同,也可以与第二处理器不同,本申请对此不作限制。
下面介绍根据本申请实施例的资源调度方法的示例性工作流程。图3示出根据本申请实施例的资源调度方法的流程的示意图。
如图3所示,在一种可能的实现方式中,本申请提出一种资源调度方法,所述方法应用于第一处理器,所述方法包括步骤S1-S3:
步骤S1,获取第一指令,所述第一指令指示云服务器的目标参数。
举例来说,参见上文及图2的相关描述,目标参数可以是用户购买云服务器ECS时选择的规格参数,或用户调整已购买的云服务器ECS的性能时选择的规格参数,或根据用户对当前参数下的云服务器ECS的使用情况确定的参数。目标参数可包括云服务器ECS对应的虚拟处理器核vCPU的目标数量和云服务器ECS的目标内存大小。本申请实施例对于目标参数的具体类型不作限制。
步骤S2,根据第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,可调度的资源由至少一个基于非一致性内存访问架构的第二处理器进行调度,在第二处理器按照不同调度方式为所述云服务器调度可调度的资源时,云服务器的性能不同。
举例来说,资源的实际使用情况可以指各终端设备(第一处理器所在的终端设备以及可与第一处理器通信的终端设备)的MUMA节点上已经被提供的虚拟处理器核以及提供对象,和尚未提供给任意云服务器ECS使用的虚拟处理器核,可以基于资源视图(未示出)等来记录。则可调度的资源可以指各终端设备的MUMA节点上剩余的、尚未提供给任意云服务器ECS使用的虚拟处理器核。可调度的资源可以由至少一个基于非一致性内存访问架构的第二处理器进行调度。调度可以指第二处理器将可调度的资源按照某种方式分配给云服务器,调度方式可指示将哪些资源分配给云服务器。根据第一指令和资源的实际使用情况,可确定可调度的资源在目标参数下的多种调度方式,且按照不同调度方式为云服务器调度可调度的资源时,云服务器的性能可以不同。
步骤S3,根据所述多种调度方式及对应的云服务器的性能生成展示数据,所述展示数据用于展示包括所述多种调度方式及对应的云服务器的性能的界面。其中,展示数据可以是第 一处理器生成的与待展示的界面对应的代码等,展示数据在被用户使用的客户端(未示出)的浏览器等解析后可以展示待展示的界面,界面可以是ECS用户界面或者ECS规格推荐界面。界面上展示的多种调度方式及对应的云服务器的性能可供用户进行选择,在此情况下,用户可根据对性能的需求选择对应的调度方式,以使得第二处理器可按照用户选择的调度方式进行资源调度,就可以得到所需性能的云服务器。
根据本申请实施例的资源调度方法,通过第一服务器获取指示云服务器的目标参数的第一指令,可根据第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,因此,同一目标参数下有可调度的资源有多种调度方式可供选择,提升了资源调度方式的选择的灵活性;由于可调度的资源由至少一个基于非一致性内存访问架构的第二处理器进行调度,在第二处理器按照不同调度方式为云服务器调度可调度的资源时,云服务器的性能不同,因此,多种调度方式下云服务器的性能不同;根据多种调度方式及对应的云服务器的性能生成展示数据,展示数据用于展示包括多种调度方式及对应的云服务器的性能的界面,可满足用户对于多种性能的云服务器的需求,并能够通过调整调度方式灵活调整云服务器的性能,提升用户体验。
在一种可能的实现方式中,所述资源包括虚拟处理器核,针对每一第二处理器,该第二处理器包括至少一个物理处理节点,所述物理处理节点用于调度和运行虚拟处理器核,所述目标参数包括所述云服务器对应的虚拟处理器核的目标数量和所述云服务器的目标内存大小。
其中,物理处理节点即为上文所述的NUMA节点,对于每一第二处理器,可包括至少一个物理处理节点,则对于第二处理器所在的终端设备(物理主机),可包括至少一个物理处理节点。例如,某终端设备上包括1个第二处理器,该第二处理器包括10个物理处理器核,每个物理处理器核可运行(或控制)10个虚拟处理器核;该第二处理器在非一致性内存访问架构下包括2个物理处理节点,其中,每个物理处理节点上包括5个物理处理器核,即,每个物理处理节点上允许提供(调度和运行)50个虚拟处理器核。每次创建云服务器,需使用该终端设备上的资源时,云服务器对应的虚拟处理器核可由该2个物理处理节点中的一个或两个提供。针对终端设备上任意物理处理节点,其提供给云服务器的虚拟处理器核从该物理处理节点上的50个虚拟处理器核中依次扣除后,终端设备上全部的物理处理节点上剩余的虚拟处理器核即为该终端设备的可调度的资源。
目标参数可包括云服务器对应的虚拟处理器核的目标数量和云服务器的目标内存大小。现有技术中,二者通常是一一对应,例如,云服务器对应的虚拟处理器核的目标数量是4时,云服务器的目标内存大小可以是8GB;云服务器对应的虚拟处理器核的目标数量是8时,云服务器的目标内存大小可以是16GB。本申请实施例中对云服务器对应的虚拟处理器核的目标数量和云服务器的目标内存大小的关系不作限制,后文中为了描述清楚,按照目标参数包括的云服务器对应的虚拟处理器核的目标数量是8、云服务器的目标内存大小是16GB作为示例。
由上文描述可知,针对终端设备上任意的物理处理节点,其提供给云服务器的虚拟处理器核从该物理处理节点上的50个虚拟处理器核中依次扣除后,终端设备上全部的物理处理节点上剩余的虚拟处理器核即为该终端设备的可调度的资源,例如,如果按照现有技术的资源调度方案,若每次创建的都是虚拟处理器核的数量是8、内存大小是16GB的云服务器,则若每次创建云服务器时都由单个物理处理节点提供虚拟处理器核,则每个物理处理节点上最多可支持为6个云服务器提供资源,最后将剩余2个虚拟处理器核无法被用于为云服务器提供 资源(50-6*8=2)。若每次创建云服务器时都由两个物理处理节点平均提供虚拟处理器核,即每个物理处理节点为每一云服务器提供4个虚拟处理器核,则每个物理处理节点上最多可支持为12个云服务器提供资源,最后也将剩余2个虚拟处理器核无法被用于为云服务器提供资源(50-12*4=2)。这些剩余的虚拟处理器核也因数量太少而不满足调度要求所以没有被调度,该部分虚拟处理器核在现有技术中可称为“vCPU碎片”。这些“vCPU碎片”很大概率不会被利用,从而导致了成本的增加。
本申请实施例提出的多种调度方式可以提高“vCPU碎片”的利用率。下面介绍本申请实施例提出的多种调度方式的示例。
在一种可能的实现方式中,多种调度方式包括:
云服务器对应的虚拟处理器核以及云服务器的内存由单个物理处理节点提供;和/或
云服务器对应的虚拟处理器核以及云服务器的内存由两个及以上的物理处理节点提供,且每个物理处理节点提供相同数量的虚拟处理器核以及相同大小的内存;和/或
云服务器对应的虚拟处理器核以及云服务器的内存由两个及以上的物理处理节点提供,且至少两个物理处理节点提供的虚拟处理器核数量和/或内存大小不同。
通过这种方式,使得每个物理节点上剩余的较少数量的虚拟处理器核也可以被调度和运行,使得可以提高资源的利用率,降低创建云服务器所必需的硬件成本以及数据处理成本。同时多种调度方式也为资源的调度提供了更多选择,可以提升资源调度的灵活性。
图4示出根据本申请实施例的多种调度方式的一个示例。
如图4所示,举例来说,以目标参数包括的云服务器对应的虚拟处理器核的目标数量是8、云服务器的目标内存大小是16GB作为示例,如按照云服务器对应的虚拟处理器核以及云服务器的内存由单个物理处理节点提供的调度方式,则该单个物理处理节点需提供8个虚拟处理器核、16GB内存。在步骤S2中,在确定调度方式时,可以根据资源的使用情况先确定是否有一个终端设备包括能够单独提供8个虚拟处理器核、16GB内存的物理处理节点,如果有满足需求的物理处理节点(节点A1),再确定该单个物理处理节点需提供8个虚拟处理器核、16GB内存的调度方式存在,在步骤S3中再显示该调度方式。
如按照云服务器对应的虚拟处理器核以及云服务器的内存由两个及以上的物理处理节点提供,且每个物理处理节点提供相同数量的虚拟处理器核以及相同大小的内存的调度方式,则以两个物理处理节点为例,该两个物理处理节点需分别提供4个虚拟处理器核、8GB内存。在步骤S2中,在确定调度方式时,可以根据资源的使用情况先确定是否有一个终端设备包括两个能够分别提供4个虚拟处理器核、8GB内存的物理处理节点,如果有满足需求的物理处理节点(节点A2和节点B2),再确定该两个物理处理节点需分别提供4个虚拟处理器核、8GB内存的调度方式存在,在步骤S3中再显示该调度方式。
以四个物理处理节点为例,该四个物理处理节点需分别提供2个虚拟处理器核、4GB内存。如果在步骤S2中,在确定调度方式时,根据资源的使用情况确定了有一个终端设备上的物理处理节点满足包括两个能够分别提供4个虚拟处理器核、8GB内存的物理处理节点的需求,该终端设备或其他终端设备上的物理处理节点还满足包括四个(节点A3-D3)能够分别提供2个虚拟处理器核、4GB内存的物理处理节点的需求,则可确定该两个物理处理节点需分别提供4个虚拟处理器核、8GB内存的调度方式,可以和该四个物理处理节点需分别提供2个虚拟处理器核、4GB内存的调度方式同时存在,在包括多种调度方式及对应的云服务器的 性能的界面中可以共同展示。
如按照云服务器对应的虚拟处理器核以及云服务器的内存由两个及以上的物理处理节点提供,且至少两个物理处理节点提供的虚拟处理器核数量和/或内存大小不同的调度方式,则以两个物理处理节点为例,其中一个物理处理节点为可例如需提供6个虚拟处理器核、12GB内存,另一个物理处理节点为可例如需提供2个虚拟处理器核、4GB内存。在步骤S2中,在确定调度方式时,可以根据资源的使用情况先确定是否有一个终端设备包括一个能够提供6个虚拟处理器核、12GB内存的物理处理节点和一个能够提供2个虚拟处理器核、4GB内存的物理处理节点,如果有满足需求的物理处理节点(节点A4和节点B4),则可确定该一个物理处理节点提供6个虚拟处理器核、12GB内存,另一个物理处理节点提供2个虚拟处理器核、4GB内存的调度方式存在,在步骤S3中再显示该调度方式。
以三个物理处理节点为例,该三个物理处理节点中的一个可例如需提供4个虚拟处理器核、8GB内存,另外两个可例如需别提供2个虚拟处理器核、4GB内存。如果在步骤S2中,在确定调度方式时,根据资源的使用情况确定了有一个终端设备的物理处理节点满足包括一个能够提供6个虚拟处理器核、12GB内存的物理处理节点和一个能够提供2个虚拟处理器核、4GB内存的物理处理节点的需求,该终端设备或其他终端设备上的物理处理节点还满足包括一个能够提供4个虚拟处理器核、8GB内存的物理处理节点(节点A5)以及两个能够分别提供2个虚拟处理器核、4GB内存的物理处理节点(节点B5和节点C5)的需求,则可确定该一个物理处理节点提供6个虚拟处理器核、12GB内存,另一个物理处理节点提供2个虚拟处理器核、4GB内存的调度方式,可以和该一个物理处理节点提供4个虚拟处理器核、8GB内存,另两个物理处理节点需分别提供2个虚拟处理器核、4GB内存的调度方式共同存在,在包括多种调度方式及对应的云服务器的性能的界面中可以共同展示。
本领域技术人员应理解,只要终端设备的物理节点可满足以上多种调度方式中的需求即可,本申请对于各调度方式中提供虚拟处理器核以及内存的物理处理节点的具体数目,以及每一物理处理节点提供的虚拟处理器核数目以及内存大小,以及展示的调度方式的具体数目均不做限制。
可以理解的是,多种调度方式中,用于提供云服务器对应的虚拟处理器核以及云服务器的内存的物理处理节点数量越少,则最终得到的云服务器的性能也更优;对于用于提供云服务器对应的虚拟处理器核以及云服务器的内存的物理处理节点数量相同的调度方式,单个物理处理节点提供的虚拟处理器核数量更小,则最终得到的云服务器的性能也更低。可选地,在步骤S3中,在生成展示数据时,可以按照性能优劣对多种调度方式及对应的云服务器的性能排序生成展示数据,在此情况下,展示的多种调度方式及对应的云服务器性能也可以按云服务器性能优劣的顺序进行展示,使得展示效果更佳。表1示出根据本申请实施例展示多种调度方式及对应的云服务器性能的一个示例。
表1
从表1中可以看出,在目标参数包括的云服务器对应的虚拟处理器核的目标数量是8、云服务器的目标内存大小是16GB时,一个物理处理节点提供6个虚拟处理器核、12GB内存,另一个物理处理节点提供2个虚拟处理器核、4GB内存的调度方式(调度方式名称为s6.2xlarge.2-C)对应的云服务器性能(75%),低于两个物理处理节点需分别提供4个虚拟处理器核、8GB内存的调度方式(调度方式名称为s6.2xlarge.2-B)对应的云服务器性能(80%),调度方式名称为s6.2xlarge.2-B的调度方式对应的云服务器性能又低于单个物理处理节点需提供8个虚拟处理器核、16GB内存的调度方式(调度方式名称为s6.2xlarge.2-A)对应的云服务器性能。
云服务器的性能与价格成正比,因此,在显示多种调度方式及对应的云服务器的性能时,也可以显示对应的价格,以便用户进行选择,从而为用户减少使用云服务器所需成本。
在一种可能的实现方式中,云服务器对应的虚拟处理器核以及云服务器的内存由两个及以上的物理处理节点提供时,该两个及以上的物理处理节点位于同一计算机上。
调度位于同一计算机(终端设备)上的物理处理节点的资源时,才能够使得最终得到的云服务器能够具备非一致性内存访问架构下处理器在访问本地存储器(内存)时快于访问非本地存储器的优势。因此,在确定调度方式时,对于需两个及以上的物理处理节点提供资源的调度方式,可以使得该两个及以上的物理处理节点位于同一计算机上,通过这种方式以提升第二处理器为云服务器调度可调度的资源时的性能。
图5示出根据本申请实施例的资源调度方法的流程的示意图。
如图5所示,在一种可能的实现方式中,步骤S3之后,所述方法还包括步骤S4-S6:
步骤S4,接收来自用户的第二指令,第二指令指示多种调度方式之一;
步骤S5,使第二处理器按照第二指令指示的调度方式为云服务器调度可调度的资源;
步骤S6,根据第二处理器上的资源状态,更新资源的实际使用情况。
举例来说,在步骤S3之后,展示数据可输出到客户端(未示出),使得在客户端(未示出)可以展示包括多种调度方式及对应的云服务器性能的界面给用户。如果步骤S4中,用户(例如通过客户端,未示出)给出了第二指令,且第二指令指示一个物理处理节点(例如节点A4)提供6个虚拟处理器核、12GB内存,另一个物理处理节点(例如节点B4)提供2个虚拟处理器核、4GB内存的调度方式,则步骤S5中,使第二处理器按照第二指令指示的调度方式为云服务器调度可调度的资源时,第一处理器将控制第二处理器完成实际的资源调度,从节点A4的资源中处扣除6个虚拟处理器核、12GB内存,从节点B4的资源中扣除2个虚拟 处理器核、4GB内存。完成步骤S5后,即获得了所需的目标参数下的云服务器。
在执行步骤S5后,由于云服务器创建成功,因此节点A4和/或节点B4所在的终端设备的资源的实际使用情况将产生变化,除节点A4和/或节点B4所在的终端设备之外的其他终端设备的资源的实际使用情况不变。因此,在步骤S6中,在更新资源的实际使用情况时,根据第二处理器上的资源状态,更新节点A4和/或节点B4所在的终端设备的资源的实际使用情况即可,以节约数据处理成本。
通过这种方式,可以获得满足需求的云服务器,并保证资源的实际使用情况的准确度。
根据业界现有方案不难发觉,现有技术中用户通常主观地去调整云服务器的规格参数,基于此,本申请还提出第一指令的多种获取方式,使得不仅可以有用户主动调整云服务器的规格参数和性能,还可以监控用户已有云服务器的虚拟处理器核和内存的利用率,并根据在一段时间内用户的云服务器的利用率与所采购的云服务器的性能指标的关系为用户推荐合适的规格参数和性能。下面对本申请实施例的第一指令的多种获取方式进行介绍。
在一种可能的实现方式中,获取第一指令,包括:
接收来自用户的第一指令,或者
获取用户对当前参数下的云服务器的使用情况,当前参数包括云服务器对应的虚拟处理器核的当前数量和云服务器的当前内存大小;根据使用情况得到第一指令。
举例来说,在用户想要购买新的云服务器时,或者用户想要调整已购买的云服务器时,第一指令可以是用户发出,此时目标参数可以由用户指定。或者,当用户已经购买了云服务器时,第一处理器可以获取用户对当前参数下的云服务器的使用情况,其中当前参数可以指已购买的云服务器的规格参数,可以包括云服务器对应的虚拟处理器核的当前数量和云服务器的当前内存大小;使用情况可例如是云服务器的虚拟处理器核和内存的利用率,利用率可以基于现有技术来确定。
可以认为如果一段时间内利用率低于云服务器在当前参数下的性能指标,则云服务器在当前参数下的性能与用户需求并不匹配,且云服务器在当前参数下的性能高于用户需求。同理,可以认为如果利用率高于云服务器在当前参数下的性能指标,则云服务器在当前参数下的性能与用户需求并不匹配,且云服务器在当前参数下的性能低于用户需求。因此,根据用户对当前参数下的云服务器的使用情况,也可以得到第一指令,其中目标参数可以包括根据用户对当前参数下的云服务器的使用情况确定的合适的虚拟处理器核数量以及内存大小。在此情况下,在用户没有作出调整已购买的云服务器的指示,或者作出了调整已购买的云服务器的指示、但没有指示具体的目标参数时,也可以展示调度方式给用户,以使得用户选择资源调度方式之后,能够获得性能更加合适的云服务器。
通过这种方式,既可以在用户有购买新的云服务器,或者有调整已购买的云服务器的需求时根据用户指示的目标参数确定多种调度方式,又可以主动为正在使用性能并不合适的云服务器的用户确定合适的目标参数并提供多种调度方式的推荐,能够提升用户的使用体验。
下面介绍本申请实施例主动为正在使用性能并不合适的云服务器的用户确定合适的目标参数的示例性方法。
在一种可能的实现方式中,根据使用情况得到第一指令,包括:
确定满足使用情况的虚拟处理器核的数量的最小值和内存大小的最小值;
将虚拟处理器核的数量的最小值和内存大小的最小值作为目标参数,得到第一指令。
举例来说,假设云服务器的当前参数是8个虚拟处理器核、16G内存,如果使用情况例如云服务器的虚拟处理器核和内存的利用率为50%,则满足使用情况的虚拟处理器核的数量的最小值可以是4(8*50%),内存大小的最小值可以是8G(16G*50%)。如果使用情况例如云服务器的虚拟处理器核和内存的利用率为70%,则满足使用情况的虚拟处理器核的数量的最小值可以是6(大于8*70%的整数最小值),内存大小的最小值可以是12G(大于16G*70%的整数最小值)。
通过这种方式确定的虚拟处理器核的数量的最小值和内存大小的最小值,可以作为目标参数,在此情况下,即便用户没有指示明确的目标参数,第一处理器也可以确定合适的目标参数,并得到第一指令,使得仍然能够展示多种调度方式,可以进一步优化用户体验。
图6示出根据本申请实施例的资源调度方法的流程的示意图。
如图6所示,在一种可能的实现方式中,在第一指令来自用户时,所述方法还包括:
步骤S7,获取用户对当前参数下的云服务器的使用情况,当前参数包括云服务器对应的虚拟处理器核的当前数量和云服务器的当前内存大小;
步骤S3包括:
根据多种调度方式与使用情况的接近程度由大到小的顺序,生成展示数据,其中,在根据所述展示数据所展示的界面中,所述多种调度方式以自身与所述使用情况的接近程度由大到小的顺序展示。
举例来说,在用户(例如通过客户端,未示出)给出了第一指令,指示了明确的目标参数时,也可以获取用户对当前参数下的云服务器的使用情况,并用于确定多种调度方式与使用情况的接近程度。其中,用户对当前参数下的云服务器的使用情况还可以包括内网收发包数量等等,在确定多种调度方式时,每种调度方式下内网收发包的最大数量是一定的(示例可参见表1),可以确定内网收发包的最大数量与使用情况中的内网收发包数量的差值,差值越小可认为接近程度越大,差值越大可认为接近程度越小。通过这种方式确定接近程度后,在生成展示数据时,可以根据多种调度方式与使用情况的接近程度由大到小的顺序生成展示数据。展示数据输出到客户端(未示出)时,使得在客户端(未示出)根据展示数据所展示的界面中,多种调度方式以自身与使用情况的接近程度由大到小的顺序进行展示。
可选地,在生成展示数据时,还可以根据接近程度与预设的阈值的大小关系,确定接近程度较大的调度方式,筛选该部分调度方式生成展示数据,使得展示的界面中该部分接近程度较大的调度方式可以突出展示等等,只要是根据所述展示数据所展示的界面中,多种调度方式及对应的云服务器的性能的展示方式得以优化即可,本申请对于根据多种调度方式及对应的云服务器的性能生成展示数据的具体方式不作限制。
通过这种方式,使得在用户指示明确的目标参数时,也可以基于用户对当前参数下的云服务器的使用情况对展示的多种调度方式的展示效果进行优化,可以提升资源调度方法生成的展示数据在展示多种调度方式方面的能力。
本申请的实施例还提供了一种资源调度装置,图7示出根据本申请实施例的资源调度装置的结构的示意图。
如图7所示,在一种可能的实现方式中,所述装置应用于第一处理器,所述装置包括:
第一获取模块,用于获取第一指令,所述第一指令指示云服务器的目标参数;
确定模块,用于根据所述第一指令和资源的实际使用情况,确定可调度的资源在目标参 数下的多种调度方式,所述可调度的资源由至少一个基于非一致性内存访问架构的第二处理器进行调度,在第二处理器按照不同调度方式为所述云服务器调度可调度的资源时,所述云服务器的性能不同;
生成模块,用于根据所述多种调度方式及对应的云服务器的性能生成展示数据,所述展示数据用于展示包括所述多种调度方式及对应的云服务器的性能的界面。
在一种可能的实现方式中,所述资源包括虚拟处理器核,针对每一第二处理器,该第二处理器包括至少一个物理处理节点,所述物理处理节点用于调度和运行虚拟处理器核,所述目标参数包括所述云服务器对应的虚拟处理器核的目标数量和所述云服务器的目标内存大小。
在一种可能的实现方式中,所述多种调度方式包括:所述云服务器对应的虚拟处理器核以及所述云服务器的内存由单个物理处理节点提供;和/或所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且每个物理处理节点提供相同数量的虚拟处理器核以及相同大小的内存;和/或所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且至少两个物理处理节点提供的虚拟处理器核数量和/或内存大小不同。
在一种可能的实现方式中,所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供时,该两个及以上的物理处理节点位于同一计算机上。
在一种可能的实现方式中,所述装置还包括:
接收模块,用于接收来自用户的第二指令,所述第二指令指示所述多种调度方式之一;
调度模块,用于使所述第二处理器按照所述第二指令指示的调度方式为所述云服务器调度可调度的资源;
更新模块,用于根据所述第二处理器上的资源状态,更新所述资源的实际使用情况。
在一种可能的实现方式中,所述第一获取模块包括:接收单元,用于接收来自用户的第一指令,或者获取单元,用于获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;处理单元,用于根据所述使用情况得到所述第一指令。
在一种可能的实现方式中,所述处理单元包括:确定子单元,用于确定满足所述使用情况的虚拟处理器核的数量的最小值和内存大小的最小值;处理子单元,用于将所述虚拟处理器核的数量的最小值和内存大小的最小值作为所述目标参数,得到所述第一指令。
在一种可能的实现方式中,在所述第一指令来自用户时,所述装置还包括:
第二获取模块,用于获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;
所述生成模块包括:生成单元,用于根据所述多种调度方式与所述使用情况的接近程度由大到小的顺序,生成展示数据,其中,根据所述展示数据所展示的界面中,所述多种调度方式以自身与所述使用情况的接近程度由大到小的顺序展示。
其中,第一获取模块、确定模块、生成模块、接收模块、调度模块、更新模块和第二获取模块均可以通过软件实现,或者可以通过硬件实现。示例性的,接下来以第一获取模块为例,介绍第一获取模块的实现方式。类似的,确定模块、生成模块、接收模块、调度模块、更新模块和第二获取模块的实现方式可以参考第一获取模块的实现方式。
模块作为软件功能单元的一种举例,第一获取模块可以包括运行在计算实例上的代码。 其中,计算实例可以包括物理主机(计算设备)、虚拟机、容器中的至少一种。进一步地,上述计算实例可以是一台或者多台。例如,第一获取模块可以包括运行在多个主机/虚拟机/容器上的代码。需要说明的是,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的区域(region)中,也可以分布在不同的region中。进一步地,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的可用区(availability zone,AZ)中,也可以分布在不同的AZ中,每个AZ包括一个数据中心或多个地理位置相近的数据中心。其中,通常一个region可以包括多个AZ。
同样,用于运行该代码的多个主机/虚拟机/容器可以分布在同一个虚拟私有云(virtual private cloud,VPC)中,也可以分布在多个VPC中。其中,通常一个VPC设置在一个region内,同一region内两个VPC之间,以及不同region的VPC之间跨区通信需在每个VPC内设置通信网关,经通信网关实现VPC之间的互连。
模块作为硬件功能单元的一种举例,第一获取模块可以包括至少一个计算设备,如服务器等。或者,第一获取模块也可以是利用专用集成电路(application-specific integrated circuit,ASIC)实现、或可编程逻辑器件(programmable logic device,PLD)实现的设备等。其中,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD)、现场可编程门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合实现。
第一获取模块包括的多个计算设备可以分布在相同的region中,也可以分布在不同的region中。第一获取模块包括的多个计算设备可以分布在相同的AZ中,也可以分布在不同的AZ中。同样,第一获取模块包括的多个计算设备可以分布在同一个VPC中,也可以分布在多个VPC中。其中,所述多个计算设备可以是服务器、ASIC、PLD、CPLD、FPGA和GAL等计算设备的任意组合。
需要说明的是,在其他实施例中,第一获取模块、确定模块、生成模块、接收模块、调度模块、更新模块和第二获取模块中的任意一个可以用于执行资源调度方法中的任意步骤,第一获取模块、确定模块、生成模块、接收模块、调度模块、更新模块和第二获取模块负责实现的步骤可根据需要指定,通过第一获取模块、确定模块、生成模块、接收模块、调度模块、更新模块以及第二获取模块分别实现资源调度方法中不同的步骤来实现资源调度装置的全部功能。
本申请还提供一种计算设备100。图8示出根据本申请实施例的计算设备的示例性结构图。如图8所示,计算设备100包括:总线102、第一处理器104、存储器106和通信接口108。第一处理器104、存储器106和通信接口108之间通过总线102通信。计算设备100可以是服务器或终端设备。应理解,本申请不限定计算设备100中的处理器、存储器的个数。
总线102可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。总线102可包括在计算设备100各个部件(例如,存储器106、第一处理器104、通信接口108)之间传送信息的通路。
第一处理器104可以包括中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理 器(digital signal processor,DSP)等处理器中的任意一种或多种。
存储器106可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。处理器104还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,机械硬盘(hard disk drive,HDD)或固态硬盘(solid state drive,SSD)。
存储器106中存储有可执行的程序代码,第一处理器104执行该可执行的程序代码以分别实现前述第一获取模块、确定模块和生成模块等的功能,从而实现资源调度方法。也即,存储器106上存有用于执行资源调度方法的指令。
通信接口103使用例如但不限于网络接口卡、收发器一类的收发模块,来实现计算设备100与其他设备或通信网络之间的通信。
本申请实施例还提供了一种计算设备集群。该计算设备集群包括至少一台计算设备。该计算设备可以是服务器,例如是中心服务器、边缘服务器,或者是本地数据中心中的本地服务器。在一些实施例中,计算设备也可以是台式机、笔记本电脑或者智能手机等终端设备。
图9示出根据本申请实施例的计算设备集群的示例性结构图。如图9所示,所述计算设备集群包括至少一个计算设备100。计算设备集群中的一个或多个计算设备100中的存储器106中可以存有相同的用于执行资源调度方法的指令。
在一些可能的实现方式中,该计算设备集群中的一个或多个计算设备100的存储器106中也可以分别存有用于执行资源调度方法的部分指令。换言之,一个或多个计算设备100的组合可以共同执行用于执行资源调度方法的指令。
需要说明的是,计算设备集群中的不同的计算设备100中的存储器106可以存储不同的指令,分别用于执行资源调度装置的部分功能。也即,不同的计算设备100中的存储器106存储的指令可以实现前述的第一获取模块、确定模块和生成模块等模块的中的一个或多个模块的功能。
在一些可能的实现方式中,计算设备集群中的一个或多个计算设备可以通过网络连接。其中,所述网络可以是广域网或局域网等等。图10示出根据本申请实施例的计算设备集群之间的连接方式的示意图。。如图10所示,两个计算设备100A和100B之间通过网络进行连接。具体地,通过各个计算设备中的通信接口与所述网络进行连接。在这一类可能的实现方式中,计算设备100A中的存储器106中存有执行第一获取模块的功能的指令。同时,计算设备100B中的存储器106中存有执行确定模块和生成模块的功能的指令。
图10所示的计算设备集群之间的连接方式可以是考虑到本申请提供的资源调度方法中的一些步骤与用户相关(例如接收来自用户的第一指令、第二指令),另一些步骤与用户无关(例如确定可调度的资源在目标参数下的多种调度方式、根据多种调度方式及对应的云服务器的性能生成展示数据),因此考虑将确定模块和生成模块实现的与用户无关的功能交由计算设备100B执行。
应理解,图10中示出的计算设备100A的功能也可以由多个计算设备100完成。同样,计算设备100B的功能也可以由多个计算设备100完成。
本申请实施例还提供了一种包含指令的计算机程序产品。所述计算机程序产品可以是包含指令的,能够运行在计算设备上或被储存在任何可用介质中的软件或程序产品。当所述计算机程序产品在至少一个计算设备上运行时,使得至少一个计算设备执行资源调度方法。
本申请实施例还提供了一种计算机可读存储介质。所述计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘)等。该计算机可读存储介质包括指令,所述指令指示计算设备执行资源调度方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的保护范围。

Claims (19)

  1. 一种资源调度方法,其特征在于,所述方法应用于第一处理器,所述方法包括:
    获取第一指令,所述第一指令指示云服务器的目标参数;
    根据所述第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,所述可调度的资源由至少一个基于非一致性内存访问架构的第二处理器进行调度,在第二处理器按照不同调度方式为所述云服务器调度可调度的资源时,所述云服务器的性能不同;
    根据所述多种调度方式及对应的云服务器的性能生成展示数据,所述展示数据用于展示包括所述多种调度方式及对应的云服务器的性能的界面。
  2. 根据权利要求1所述的方法,其特征在于,所述资源包括虚拟处理器核,针对每一第二处理器,该第二处理器包括至少一个物理处理节点,所述物理处理节点用于调度和运行虚拟处理器核,所述目标参数包括所述云服务器对应的虚拟处理器核的目标数量和所述云服务器的目标内存大小。
  3. 根据权利要求2所述的方法,其特征在于,所述多种调度方式包括:
    所述云服务器对应的虚拟处理器核以及所述云服务器的内存由单个物理处理节点提供;和/或
    所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且每个物理处理节点提供相同数量的虚拟处理器核以及相同大小的内存;和/或
    所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且至少两个物理处理节点提供的虚拟处理器核数量和/或内存大小不同。
  4. 根据权利要求3所述的方法,其特征在于,所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供时,该两个及以上的物理处理节点位于同一计算机上。
  5. 根据权利要求1-4中任意一项所述的方法,其特征在于,所述根据所述多种调度方式及对应的云服务器的性能生成展示数据之后,所述方法还包括:
    接收来自用户的第二指令,所述第二指令指示所述多种调度方式之一;
    使所述第二处理器按照所述第二指令指示的调度方式为所述云服务器调度可调度的资源;
    根据所述第二处理器上的资源状态,更新所述资源的实际使用情况。
  6. 根据权利要求1-5中任意一项所述的方法,其特征在于,所述获取第一指令,包括:
    接收来自用户的第一指令,或者
    获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;
    根据所述使用情况得到所述第一指令。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述使用情况得到所述第一指令,包括:
    确定满足所述使用情况的虚拟处理器核的数量的最小值和内存大小的最小值;
    将所述虚拟处理器核的数量的最小值和内存大小的最小值作为所述目标参数,得到所述第一指令。
  8. 根据权利要求6所述的方法,其特征在于,在所述第一指令来自用户时,所述方法还 包括:
    获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;
    所述根据所述多种调度方式及对应的云服务器的性能生成展示数据,包括:
    根据所述多种调度方式与所述使用情况的接近程度由大到小的顺序,生成展示数据,其中,在根据所述展示数据所展示的界面中,所述多种调度方式以自身与所述使用情况的接近程度由大到小的顺序展示。
  9. 一种资源调度装置,其特征在于,所述装置包括:
    第一获取模块,用于获取第一指令,所述第一指令指示云服务器的目标参数;
    确定模块,用于根据所述第一指令和资源的实际使用情况,确定可调度的资源在目标参数下的多种调度方式,所述可调度的资源由至少一个基于非一致性内存访问架构的第二处理器进行调度,在第二处理器按照不同调度方式为所述云服务器调度可调度的资源时,所述云服务器的性能不同;
    生成模块,用于根据所述多种调度方式及对应的云服务器的性能生成展示数据,所述展示数据用于展示包括所述多种调度方式及对应的云服务器的性能的界面。
  10. 根据权利要求9所述的装置,其特征在于,所述资源包括虚拟处理器核,针对每一第二处理器,该第二处理器包括至少一个物理处理节点,所述物理处理节点用于调度和运行虚拟处理器核,所述目标参数包括所述云服务器对应的虚拟处理器核的目标数量和所述云服务器的目标内存大小。
  11. 根据权利要求10所述的装置,其特征在于,所述多种调度方式包括:
    所述云服务器对应的虚拟处理器核以及所述云服务器的内存由单个物理处理节点提供;和/或
    所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且每个物理处理节点提供相同数量的虚拟处理器核以及相同大小的内存;和/或
    所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供,且至少两个物理处理节点提供的虚拟处理器核数量和/或内存大小不同。
  12. 根据权利要求11所述的装置,其特征在于,所述云服务器对应的虚拟处理器核以及所述云服务器的内存由两个及以上的物理处理节点提供时,该两个及以上的物理处理节点位于同一计算机上。
  13. 根据权利要求9-12中任意一项所述的装置,其特征在于,所述装置还包括:
    接收模块,用于接收来自用户的第二指令,所述第二指令指示所述多种调度方式之一;
    调度模块,用于使所述第二处理器按照所述第二指令指示的调度方式为所述云服务器调度可调度的资源;
    更新模块,用于根据所述第二处理器上的资源状态,更新所述资源的实际使用情况。
  14. 根据权利要求9-13中任意一项所述的装置,其特征在于,所述第一获取模块包括:
    接收单元,用于接收来自用户的第一指令,或者
    获取单元,用于获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;
    处理单元,用于根据所述使用情况得到所述第一指令。
  15. 根据权利要求14所述的装置,其特征在于,所述处理单元包括:
    确定子单元,用于确定满足所述使用情况的虚拟处理器核的数量的最小值和内存大小的最小值;
    处理子单元,用于将所述虚拟处理器核的数量的最小值和内存大小的最小值作为所述目标参数,得到所述第一指令。
  16. 根据权利要求14所述的装置,其特征在于,在所述第一指令来自用户时,所述装置还包括:
    第二获取模块,用于获取用户对当前参数下的云服务器的使用情况,所述当前参数包括所述云服务器对应的虚拟处理器核的当前数量和所述云服务器的当前内存大小;
    所述生成模块包括:
    生成单元,用于根据所述多种调度方式与所述使用情况的接近程度由大到小的顺序,生成展示数据,其中,根据所述展示数据所展示的界面中,所述多种调度方式以自身与所述使用情况的接近程度由大到小的顺序展示。
  17. 一种计算设备集群,其特征在于,包括至少一个计算设备,每个计算设备包括第一处理器和存储器;
    所述至少一个计算设备的第一处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行如权利要求1-8中任一项所述的方法。
  18. 一种计算机可读存储介质,其特征在于,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如权利要求1-8中任一项所述的方法。
  19. 一种包含指令的计算机程序产品,其特征在于,当所述指令被计算设备集群运行时,使得所述计算设备集群执行如权利要求1-8中任一项所述的方法。
PCT/CN2023/079075 2022-08-04 2023-03-01 资源调度方法、装置、计算设备集群、介质及程序产品 WO2024027148A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210932565.8A CN117555669A (zh) 2022-08-04 2022-08-04 资源调度方法、装置、计算设备集群、介质及程序产品
CN202210932565.8 2022-08-04

Publications (1)

Publication Number Publication Date
WO2024027148A1 true WO2024027148A1 (zh) 2024-02-08

Family

ID=89819137

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/079075 WO2024027148A1 (zh) 2022-08-04 2023-03-01 资源调度方法、装置、计算设备集群、介质及程序产品

Country Status (2)

Country Link
CN (1) CN117555669A (zh)
WO (1) WO2024027148A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971502A (zh) * 2024-03-29 2024-05-03 南京认知物联网研究院有限公司 一种针对ai推理集群进行在线优化调度的方法与装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130297802A1 (en) * 2012-05-04 2013-11-07 Citrix Systems, Inc. Systems and methods for adaptive application provisioning
CN106506657A (zh) * 2016-11-21 2017-03-15 黑龙江省科学院自动化研究所 一种基于多目标的云计算虚拟机分配调整方法
CN107133087A (zh) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 一种资源调度方法与设备
CN108009003A (zh) * 2017-12-01 2018-05-08 湖南女子学院 一种多目标虚拟机自适应位置选择方法、分布式云系统
CN109639791A (zh) * 2018-12-06 2019-04-16 广东石油化工学院 一种容器环境下云工作流调度方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130297802A1 (en) * 2012-05-04 2013-11-07 Citrix Systems, Inc. Systems and methods for adaptive application provisioning
CN107133087A (zh) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 一种资源调度方法与设备
CN106506657A (zh) * 2016-11-21 2017-03-15 黑龙江省科学院自动化研究所 一种基于多目标的云计算虚拟机分配调整方法
CN108009003A (zh) * 2017-12-01 2018-05-08 湖南女子学院 一种多目标虚拟机自适应位置选择方法、分布式云系统
CN109639791A (zh) * 2018-12-06 2019-04-16 广东石油化工学院 一种容器环境下云工作流调度方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971502A (zh) * 2024-03-29 2024-05-03 南京认知物联网研究院有限公司 一种针对ai推理集群进行在线优化调度的方法与装置

Also Published As

Publication number Publication date
CN117555669A (zh) 2024-02-13

Similar Documents

Publication Publication Date Title
CN107690622B (zh) 实现硬件加速处理的方法、设备和系统
TWI752066B (zh) 讀寫請求處理方法及裝置
US9858052B2 (en) Decentralized operating system
US20140181824A1 (en) Qos inband upgrade
CN110580197A (zh) 大型模型深度学习的分布式计算架构
WO2024027148A1 (zh) 资源调度方法、装置、计算设备集群、介质及程序产品
US20180365425A1 (en) Systems and methods for securely booting a system on chip via a virtual collated internal memory pool
US10970118B2 (en) Shareable FPGA compute engine
US20210049042A1 (en) Electronic apparatus and method for controlling thereof
US20150067024A1 (en) Autobatching
WO2014062260A1 (en) Reducing execution jitter in multi-core processors
JP2019521428A (ja) ユーザ行動に基づくサービスディスパッチのシステム及び方法
JP2016091547A (ja) ユーザー・インターフェースを備えた集約サービス
EP4113298A1 (en) Task scheduling method, computing device and storage medium
US11706289B1 (en) System and method for distributed management of hardware using intermediate representations of systems to satisfy user intent
US20220229701A1 (en) Dynamic allocation of computing resources
US20210132860A1 (en) Management of multiple physical function non-volatile memory devices
CN111158909A (zh) 集群资源分配处理方法、装置、设备及存储介质
US10521381B2 (en) Self-moderating bus arbitration architecture
WO2022100534A1 (zh) 虚拟实例设置方法及装置
US10942948B2 (en) Cloud-based pluggable classification system
WO2022078060A1 (en) Tag-driven scheduling of computing resources for function execution
US20220138019A1 (en) Method and system for performing workloads in a data cluster
CN116670661A (zh) 图形处理器的缓存访问方法、图形处理器及电子设备
WO2022199234A1 (zh) 一种提供云服务的方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23848863

Country of ref document: EP

Kind code of ref document: A1