CN111580935A - Network communication method, device, equipment and storage medium - Google Patents

Network communication method, device, equipment and storage medium Download PDF

Info

Publication number
CN111580935A
CN111580935A CN202010402015.6A CN202010402015A CN111580935A CN 111580935 A CN111580935 A CN 111580935A CN 202010402015 A CN202010402015 A CN 202010402015A CN 111580935 A CN111580935 A CN 111580935A
Authority
CN
China
Prior art keywords
virtual
service
resources
cpu
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010402015.6A
Other languages
Chinese (zh)
Inventor
周俊宇
晁永生
李星
郑炎亭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202010402015.6A priority Critical patent/CN111580935A/en
Publication of CN111580935A publication Critical patent/CN111580935A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a network communication method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving a cloud host starting instruction; distributing corresponding virtual operation resources to the service virtual machines corresponding to the cloud host starting instructions, and distributing corresponding virtual network cards to the service virtual machines; and controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card. The method relatively ensures the stability of the cloud service and reduces the service response time delay of the cloud service. In addition, the application also provides a network communication device, equipment and a storage medium, and the beneficial effects are as described above.

Description

Network communication method, device, equipment and storage medium
Technical Field
The present application relates to the field of network communications, and in particular, to a network communication method, apparatus, device, and storage medium.
Background
Cloud services are currently a common service operation mode, and refer to services that are required to be obtained in an on-demand and easily-extensible mode through a network, and the services can be related to software or the internet and can also be other types of services. The cloud service has certain convenience in deployment and online aspects, and meanwhile, the later-stage management and maintenance cost is greatly reduced.
In some specific current cloud service scenarios, a cloud service host is often required to provide stable data services with low time delay, and currently, in order to improve the diversity, deployment flexibility and risk resistance of cloud service types, a virtual machine is often operated in a physical server at the cloud end, and the cloud service is deployed through the virtual machine, so when multiple service services are operated in the physical server at the cloud end, each service is borne by the corresponding virtual machine, and since the virtual machines in the physical server share hardware and a network card of the physical server, it is often difficult to ensure communication stability and communication time delay of the virtual machine, and further, the stability of the cloud service is low, and service response time delay is high.
Therefore, it is a problem to be solved by those skilled in the art to provide a network communication method to relatively ensure the stability of cloud services and reduce the business response delay of cloud services.
Disclosure of Invention
The application aims to provide a network communication method, a network communication device, network communication equipment and a network communication storage medium, so that the stability of cloud services is relatively ensured, and the service response time delay of the cloud services is reduced.
In order to solve the above technical problem, the present application provides a network communication method, including:
receiving a cloud host starting instruction;
distributing corresponding virtual operation resources to the service virtual machines corresponding to the cloud host starting instructions, and distributing corresponding virtual network cards to the service virtual machines; the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on a physical network card in advance;
and controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card.
Preferably, before allocating the corresponding virtual network card to the service virtual machine, the method further includes:
acquiring network requirement configuration information;
distributing a corresponding virtual network card to the service virtual machine, comprising:
and distributing a corresponding virtual network card to the service virtual machine according to the network demand configuration information.
Preferably, the controlling the service virtual machine performs network communication through the corresponding virtual operation resource and the corresponding virtual network card, including:
and controlling virtual operation resources corresponding to the service virtual machine, and executing network communication in a mode of calling a user mode protocol stack to transmit a data packet to the virtual network card.
Preferably, when the number of the physical operation hardware and the number of the physical network cards are both greater than 1, allocating corresponding virtual operation resources to the service virtual machine corresponding to the cloud host startup instruction, and allocating corresponding virtual network cards to the service virtual machine, includes:
and distributing virtual operation resources belonging to the same physical operation hardware to the service virtual machines corresponding to the cloud host starting instructions, and distributing virtual network cards belonging to the same physical network cards to the service virtual machines.
Preferably, the physical computing hardware comprises CPU hardware;
distributing corresponding virtual operation resources to the service virtual machine corresponding to the cloud host starting instruction, wherein the method comprises the following steps:
distributing corresponding virtual CPU resources to the service virtual machine corresponding to the cloud host starting instruction;
before allocating corresponding virtual CPU resources to the service virtual machine corresponding to the cloud host start instruction, the method further includes:
and executing virtualization operation on the CPU hardware to obtain virtual CPU resources.
Preferably, executing the virtualization operation on the CPU hardware results in a virtual CPU resource, including:
and executing virtualization operation on the CPU hardware to obtain CPU core resources and CPU Cache resources.
Preferably, executing virtualization operation on CPU hardware to obtain CPU core resources and CPU Cache resources includes:
executing virtualization operation on CPU hardware to obtain CPU core resources comprising computing group CPU core resources and service group CPU core resources and CPU Cache resources comprising computing group CPU Cache resources and service group CPU Cache resources;
distributing corresponding virtual CPU resources to the service virtual machine, comprising:
and distributing corresponding computing group CPU core resources and corresponding computing group CPU Cache resources to the service virtual machine.
Preferably, before allocating the corresponding virtual CPU resource to the service virtual machine, the method further includes:
and executing virtualization operation on the physical network card through the SR-IOV to obtain the virtual network card.
In addition, the present application also provides a network communication apparatus, including:
the virtual machine acquisition module is used for receiving a cloud host starting instruction;
the resource allocation module is used for allocating corresponding virtual operation resources to the service virtual machine corresponding to the cloud host starting instruction and allocating a corresponding virtual network card to the service virtual machine; the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on a physical network card in advance;
and the communication execution module is used for controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card.
In addition, the present application also provides a network communication device, including:
a memory for storing a computer program;
a processor for implementing the steps of the network communication method as described above when executing the computer program.
Furthermore, the present application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the network communication method as described above.
The network communication method provided by the application receives a cloud host starting instruction, allocates corresponding virtual operation resources to a service virtual machine corresponding to the cloud host starting instruction, and allocates a corresponding virtual network card to the service virtual machine, wherein the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, the virtual network card is obtained by executing virtualization operation on the physical network card in advance, and further controls the service virtual machine to execute network communication through the corresponding virtual operation resources and the virtual network card after the corresponding virtual network card and the virtual operation resources are allocated to the service virtual machine. According to the method, the corresponding virtual operation resources and the virtual network cards are distributed to the service virtual machines in the physical server, and then the service virtual machines are controlled to execute network communication through the corresponding virtual operation resources and the virtual network cards, so that each service virtual machine in the physical server has available virtual operation resources and virtual network cards when executing network communication, the communication stability of the virtual machines is guaranteed, the communication delay of the service virtual machines is relatively reduced, the stability of cloud service is relatively guaranteed, and the service response delay of the cloud service is relatively reduced. In addition, the application also provides a network communication device, equipment and a storage medium, and the beneficial effects are as described above.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a network communication method disclosed in an embodiment of the present application;
fig. 2 is a flowchart of a specific network communication method disclosed in an embodiment of the present application;
fig. 3 is a flowchart of a specific network communication method disclosed in an embodiment of the present application;
fig. 4 is a flowchart of a specific network communication method disclosed in an embodiment of the present application;
fig. 5 is a flowchart of a specific network communication method disclosed in an embodiment of the present application;
fig. 6 is a flowchart of a specific network communication method disclosed in an embodiment of the present application;
fig. 7 is a schematic view of a resource model of a physical server in a specific application scenario disclosed in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a network communication device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
In some specific current cloud service scenarios, a cloud service host is often required to provide stable data services with low time delay, and currently, in order to improve the diversity, deployment flexibility and risk resistance of cloud service types, a virtual machine is often operated in a physical server at the cloud end, and the cloud service is deployed through the virtual machine, so when multiple service services are operated in the physical server at the cloud end, each service is borne by the corresponding virtual machine, and since the virtual machines in the physical server share hardware and a network card of the physical server, it is often difficult to ensure communication stability and communication time delay of the virtual machine, and further, the stability of the cloud service is low, and service response time delay is high.
Therefore, the core of the application is to provide a network communication method to relatively ensure the stability of the cloud service and reduce the business response delay of the cloud service.
Referring to fig. 1, an embodiment of the present application discloses a network communication method, including:
step S10: and receiving a cloud host starting instruction.
It should be noted that the execution main body of this embodiment may be a virtual machine control system pre-installed in the physical server in the cloud, or a control device capable of configuring and operating and controlling the service virtual machine in the physical server in the cloud.
The service virtual machines obtained in the step refer to virtual machines used for running service services in the physical server at the cloud end, and in the technical scheme of the application, a plurality of service virtual machines run in the physical server at the cloud end, and each service virtual machine is started with a corresponding service.
In addition, the receiving of the cloud host start instruction in this step may specifically be acquiring all the service virtual machines in the physical server, or acquiring more than one service virtual machine running a service of a specific type in the physical server.
Step S11: and distributing corresponding virtual operation resources to the service virtual machines corresponding to the cloud host starting instructions, and distributing corresponding virtual network cards to the service virtual machines.
The virtual operation resources are obtained by executing virtualization operation on the physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on the physical network card in advance.
After more than one service virtual machine is obtained, corresponding virtual operation resources are further distributed to the service virtual machines, and corresponding virtual network cards are distributed to the service virtual machines.
Virtualization is a resource management technology, which is to convert and display the physical resources of a computer, so that a user can apply the resources in a better way than the original configuration, and the new virtual parts of the resources are not limited by the erection way, the region or the physical configuration of the existing resources.
It should be noted that the virtual operation resources in this step are obtained by performing virtualization operation on physical operation hardware, and are equivalent to logical resources obtained by logically dividing physical resources in the physical operation hardware, the virtual operation resources are logically independent from each other, and the physical operation hardware refers to hardware equipment capable of performing logical operation and operation control on data; in addition, the virtual network cards in this step are obtained by performing virtualization operation on the physical network cards, which is equivalent to the logical resources obtained by logically dividing the physical resources in the physical network cards, and the virtual network cards are logically independent from each other.
The key point of this step is that there is a unique corresponding relationship between the virtual operation resources and the virtual network card and the service virtual machines, that is, the virtual operation resources and the virtual network card that are called by the service virtual machines are independent from each other, so that it can relatively avoid the situation that the other service virtual machines cannot normally provide corresponding service due to the insufficient resources of the available physical operation hardware and the physical network card because of the excessive occupation of the resources of the physical operation hardware and the physical network card by some service virtual machines.
Step S12: and controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card.
After allocating the corresponding virtual operation resources to the service virtual machine and allocating the corresponding virtual network card to the service virtual machine, the step further controls the service virtual machine to execute network communication through the corresponding virtual operation resources and the virtual network card.
The network communication method provided by the application receives a cloud host starting instruction, allocates corresponding virtual operation resources to a service virtual machine corresponding to the cloud host starting instruction, and allocates a corresponding virtual network card to the service virtual machine, wherein the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, the virtual network card is obtained by executing virtualization operation on the physical network card in advance, and further controls the service virtual machine to execute network communication through the corresponding virtual operation resources and the virtual network card after the corresponding virtual network card and the virtual operation resources are allocated to the service virtual machine. According to the method, the corresponding virtual operation resources and the virtual network cards are distributed to the service virtual machines in the physical server, and then the service virtual machines are controlled to execute network communication through the corresponding virtual operation resources and the virtual network cards, so that each service virtual machine in the physical server has available virtual operation resources and virtual network cards when executing network communication, the communication stability of the virtual machines is guaranteed, the communication delay of the service virtual machines is relatively reduced, the stability of cloud service is relatively guaranteed, and the service response delay of the cloud service is relatively reduced.
Referring to fig. 2, an embodiment of the present application discloses a network communication method, including:
step S20: and receiving a cloud host starting instruction.
Step S21: and acquiring network requirement configuration information.
It should be noted that the network requirement configuration information in this step refers to network requirement configuration for the service virtual machine, and for the service virtual machines executing different types of service services, requirements for network resources are often different, and in this step, before allocating a corresponding virtual network card to the service virtual machine, the network requirement configuration information is obtained in advance, so that a corresponding number of virtual network cards or virtual network cards having corresponding network communication capabilities are configured to the service virtual machine according to the network requirement configuration information in subsequent steps.
The network requirement configuration information in this step may further include Virtual Local Area Network (VLAN) configuration information, Quality of Service (QOS) configuration information, and the like.
Step S22: and distributing corresponding virtual operation resources to the service virtual machines corresponding to the cloud host starting instructions, and distributing corresponding virtual network cards to the service virtual machines according to the network demand configuration information.
The virtual operation resources are obtained by executing virtualization operation on the physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on the physical network card in advance.
It should be noted that, after the network requirement configuration information is obtained, the step further allocates a corresponding virtual network card to the service virtual machine according to the network requirement configuration information, so that the accuracy of the process of allocating the virtual network card to the service virtual machine can be relatively ensured.
Step S23: and controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card.
In the embodiment, the requirements of the service virtual machines executing different types of service services on network resources are further considered to be different, so that the network requirement configuration information recorded with the network requirements corresponding to the service virtual machines is obtained in advance, and then the corresponding virtual network cards are allocated to the service virtual machines based on the network requirement configuration information, so that the accuracy of the process of allocating the virtual network cards to the service virtual machines is relatively ensured, the communication stability of the virtual machines is further ensured, the communication delay of the service virtual machines is relatively reduced, the stability of the cloud services is relatively ensured, and the service response delay of the cloud services is reduced.
Referring to fig. 3, an embodiment of the present application discloses a network communication method, including:
step S30: and receiving a cloud host starting instruction.
Step S31: and distributing corresponding virtual operation resources to the service virtual machines corresponding to the cloud host starting instructions, and distributing corresponding virtual network cards to the service virtual machines.
The virtual operation resources are obtained by executing virtualization operation on the physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on the physical network card in advance.
Step S32: and controlling virtual operation resources corresponding to the service virtual machine, and executing network communication in a mode of calling a user mode protocol stack to transmit a data packet to the virtual network card.
It should be noted that, the key point of this embodiment is to further control the service virtual machine to utilize the corresponding virtual operation resource after allocating the corresponding virtual operation resource and the virtual network card to the service virtual machine, and achieve the purpose of network communication by transmitting the data packet to the virtual network card. The user mode protocol stack in this step refers to a data stack of a user layer of the service virtual machine system, and considering that when a data packet is directly transmitted to the virtual network card through the user mode protocol stack, the data packet does not need to pass through a kernel stack of the virtual machine system, so that time overhead generated by conversion of the data packet between the user layer and the kernel layer is avoided, and therefore time delay of the data packet in the process of transmitting the data packet to the virtual network card can be relatively reduced, and further, the communication time delay of the service virtual machine can be reduced, and further, service response time delay of cloud service is reduced.
Referring to fig. 4, an embodiment of the present application discloses a network communication method, where the number of physical computing hardware and physical network cards is greater than 1, the method includes:
step S40: and receiving a cloud host starting instruction.
Step S41: and distributing virtual operation resources belonging to the same physical operation hardware to the service virtual machines corresponding to the cloud host starting instructions, and distributing virtual network cards belonging to the same physical network cards to the service virtual machines.
The virtual operation resources are obtained by executing virtualization operation on the physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on the physical network card in advance.
Step S42: and controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card.
It should be noted that, in this embodiment, the physical server is suitable for a scenario in which a plurality of physical computing hardware and physical network cards are provided, in this scenario, each physical computing hardware is divided into a certain number of virtual computing resources, and each physical network card is divided into a certain number of virtual network cards.
In addition, the virtual computing resources belonging to the same physical computing hardware are allocated to the service virtual machine, and the virtual network cards belonging to the same physical network card are allocated to the service virtual machine, and the virtual computing resources belonging to the same physical computing hardware and the virtual network cards belonging to the same physical network card can be specifically configured to the same NUMA (Non Uniform Memory access architecture) node, under the framework, different hardware is subordinate to different nodes, and each node has its own integrated Memory controller, so that the resource scheduling across hardware is avoided.
Referring to fig. 5, an embodiment of the present application discloses a network communication method, including:
step S50: and receiving a cloud host starting instruction.
Step S51: and executing virtualization operation on the CPU hardware to obtain virtual CPU resources.
It should be noted that, in this embodiment, the physical operation hardware is specifically CPU hardware, where the CPU hardware, that is, a central processing unit in the physical server, is an operation and control core in the physical server, and is a final execution unit for information processing and program operation, and virtual CPU resources are provided for the service virtual machine through the CPU hardware, so that service reliability when the service virtual machine executes network communication can be relatively ensured.
In the step, before distributing corresponding virtual CPU resources to the service virtual machine, virtualization operation is performed on CPU hardware in advance to obtain virtual CPU resources, the virtual CPU resources can be specifically represented by the operation bandwidth of the CPU hardware, and each virtual CPU resource divided based on the CPU hardware can have the same operation bandwidth.
Step S52: and distributing corresponding virtual CPU resources to the service virtual machines corresponding to the cloud host starting instructions, and distributing corresponding virtual network cards to the service virtual machines.
After the virtualized operation is performed on the CPU hardware to obtain the virtual CPU resource, this step further allocates a corresponding virtual CPU resource to the service virtual machine, and the number of the virtual CPU resource allocated to the service virtual machine may be determined according to the performance requirement of the actual service of the service virtual machine.
Step S53: and the control service virtual machine executes network communication through the corresponding virtual CPU resource and the corresponding virtual network card.
In the embodiment, the virtual CPU resources are provided to the service virtual machine through the CPU hardware, so that the service reliability of the service virtual machine during network communication can be further ensured.
On the basis of the foregoing embodiment, as a preferred implementation manner, executing a virtualization operation on CPU hardware to obtain a virtual CPU resource includes:
and executing virtualization operation on the CPU hardware to obtain CPU core resources and CPU Cache resources.
It should be noted that the CPU core resource in this embodiment is a resource used by the CPU hardware to execute an operation, and the CPU Cache resource is a resource used by the CPU hardware to execute storage of related data generated by the operation. The method and the device can improve the refinement degree of the virtualization operation executed on the CPU hardware, and can further ensure the service reliability when the service virtual machine executes the network communication.
Further, as a preferred embodiment, executing virtualization operation on CPU hardware to obtain CPU core resources and CPU Cache resources includes:
executing virtualization operation on CPU hardware to obtain CPU core resources comprising computing group CPU core resources and service group CPU core resources and CPU Cache resources comprising computing group CPU Cache resources and service group CPU Cache resources;
distributing corresponding virtual CPU resources to the service virtual machine, comprising:
and distributing corresponding computing group CPU core resources and corresponding computing group CPU Cache resources to the service virtual machine.
It should be noted that the key point of this embodiment is to further divide the CPU core resources into computing group CPU core resources and service group CPU core resources, and further divide the CPU Cache resources into computing group CPU Cache resources and service group CPU Cache resources, and further allocate corresponding computing group CPU core resources and corresponding computing group CPU Cache resources to the service virtual machine, so as to ensure that the service group CPU core resources in the CPU core resources and the service group CPU Cache resources in the CPU Cache resources can be used to support normal operation of systems other than the service virtual machine, such as a virtual machine control system, and further ensure the overall stability of the cloud service.
Referring to fig. 6, an embodiment of the present application discloses a network communication method, including:
step S60: and receiving a cloud host starting instruction.
Step S61: and executing virtualization operation on the CPU hardware to obtain virtual CPU resources.
Step S62: and executing virtualization operation on the physical network card through the SR-IOV to obtain the virtual network card.
It should be noted that the SR-IOV in this embodiment is collectively called Single Root I/O Virtualization, and is a hardware-based IO Virtualization technology, and the SR-IOV standard allows PCIe (peripheral component Interconnect Express) devices to be efficiently shared between virtual machines, so that the virtual machines obtain I/O performance comparable to that of physical machines.
Step S63: and distributing corresponding virtual CPU resources to the service virtual machines corresponding to the cloud host starting instructions, and distributing corresponding virtual network cards to the service virtual machines.
Step S64: and the control service virtual machine executes network communication through the corresponding virtual CPU resource and the corresponding virtual network card.
In the embodiment, the virtual network card is obtained by performing virtualization operation on the physical network card in an SR-IOV manner, and the communication performance of the virtual network card can be relatively ensured, so that the communication delay of the service virtual machine can be reduced, and further the service response delay of the cloud service can be relatively reduced.
In order to deepen understanding of the above embodiments, a specific embodiment when the physical server performs network communication in a practical application scenario is provided below.
Fig. 7 is a schematic view of a resource model of a physical server in a specific application scenario disclosed in an embodiment of the present application. In this application scenario embodiment, the VF network card refers to a virtual network card obtained by virtualizing a physical network card through an SR-IOV function, and the VMM refers to a virtual machine control system.
1. VMM critical initialization:
when the system is started, the VMM groups CPU core resources according to the configuration, and creates a Service and computer CPU scheduling group for respectively scheduling the VMM management Service process and the Service virtual machine process; the CPU scheduling group of the service virtual machine in the computer group is delayed to be created when the service virtual machine runs;
according to the CPU core allocation proportion of the Service group and the computer group, the Cache resources are also grouped into two Cache resource scheduling groups of the Service and the computer; the Service group is used for scheduling the VMM management Service process, and the computer group is used for scheduling the Service virtual machine;
the network management service in the VMM is responsible for enabling the SR-IOV function of the network card and initializing the VF network card (virtual network card).
2. A cloud host creation process (the cloud host is a virtual host with actual business functions constructed based on business virtual machines):
a cloud host is newly built on a page, and CPU resources and network card resources are configured;
the cloud host configures a direct-connection network card, selects physical network card association, and configures attributes such as VLAN (virtual local area network), QOS (quality of service) and the like.
3. The cloud host starting process comprises the following steps:
when the cloud host is started, firstly detecting whether idle CPU resources of a CPU computer group meet the service requirements of the cloud host or not and detecting whether VF network card resources of a physical network card associated with the cloud host meet the service requirements of the cloud host or not;
if the idle CPU resources of the CPU computer group do not meet the service requirements of the cloud host, the cloud host fails to start, and the shortage of the CPU resources is prompted;
if the VF network card resources of the cloud host associated with the physical network card do not meet the service requirements of the cloud host, the cloud host fails to start, and network card resource allocation failure is prompted;
if the idle CPU resources of the CPU computer group meet the service requirements of the cloud host and the VF network card resources of the cloud host associated with the physical network card meet the service requirements of the cloud host, distributing and binding the VF network card and setting the attributes of the VF such as VLAN, QOS and the like;
creating a cloud host process to execute cloud host system starting and business online;
and meanwhile, a cloud host scheduling group is established under the CPU computer group, and the cloud host process is migrated into the scheduling group.
4. Cloud host shutdown process:
the page or the interior of the cloud host executes shutdown operation;
when the cloud host process is detected to be terminated, recovering CPU resources of a scheduling group and deleting the scheduling group;
and recovering the VF network card resources distributed by the cloud host, and simultaneously resetting the VF network card attribute.
Referring to fig. 8, an embodiment of the present application discloses a network communication apparatus, including:
the virtual machine obtaining module 10 is configured to receive a cloud host starting instruction;
the resource allocation module 11 is configured to allocate corresponding virtual operation resources to the service virtual machine, and allocate a corresponding virtual network card to the service virtual machine;
and a communication executing module 12, configured to control the service virtual machine to execute network communication through the corresponding virtual computing resource and the corresponding virtual network card.
The network communication device provided by the application receives a cloud host starting instruction, allocates corresponding virtual operation resources to a service virtual machine corresponding to the cloud host starting instruction, and allocates a corresponding virtual network card to the service virtual machine, wherein the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, the virtual network card is obtained by executing virtualization operation on the physical network card in advance, and further controls the service virtual machine to execute network communication through the corresponding virtual operation resources and the virtual network card after the corresponding virtual network card and the virtual operation resources are allocated to the service virtual machine. The device distributes corresponding virtual operation resources and virtual network cards to the service virtual machines in the physical server, and then controls the service virtual machines to execute network communication through the corresponding virtual operation resources and virtual network cards, so that each service virtual machine in the physical server has available virtual operation resources and virtual network cards when executing network communication, thereby ensuring the communication stability of the virtual machines and relatively reducing the communication delay of the service virtual machines, further relatively ensuring the stability of cloud service and reducing the service response delay of the cloud service.
On the basis of the foregoing embodiments, the embodiments of the present application further describe and optimize the detection device. Specifically, the method comprises the following steps:
in one embodiment, the apparatus further comprises:
the configuration information acquisition module is used for acquiring network requirement configuration information;
resource allocation module 11, comprising:
and the configuration information distribution module is used for distributing the corresponding virtual network card to the service virtual machine according to the network requirement configuration information.
In one embodiment, the communication execution module 12 includes:
and the user mode communication module is used for controlling the virtual operation resources corresponding to the service virtual machine and executing network communication in a mode of calling a user mode protocol stack to transmit a data packet to the virtual network card.
In a specific embodiment, when the number of the physical computing hardware and the number of the physical network cards are both greater than 1, the resource allocation module 11 includes:
and the resource allocation submodule is used for allocating virtual operation resources belonging to the same physical operation hardware to the service virtual machine and allocating virtual network cards belonging to the same physical network card to the service virtual machine.
In one embodiment, the physical computing hardware includes CPU hardware;
resource allocation module 11, comprising:
the CPU resource allocation module is used for allocating corresponding virtual CPU resources to the service virtual machine;
the device still includes:
and the CPU virtualization module is used for executing virtualization operation on the CPU hardware to obtain virtual CPU resources.
In one embodiment, a CPU virtualization module includes:
and the CPU virtualization sub-module is used for executing virtualization operation on the CPU hardware to obtain CPU core resources and CPU Cache resources.
In one embodiment, the apparatus further comprises:
and the network card virtualization module is used for executing virtualization operation on the physical network card through the SR-IOV to obtain the virtual network card.
In addition, the embodiment of the present application further discloses a network communication device, including:
a memory for storing a computer program;
a processor for implementing the steps of the network communication method as described above when executing the computer program.
The network communication device provided by the application receives a cloud host starting instruction, allocates corresponding virtual operation resources to a service virtual machine corresponding to the cloud host starting instruction, and allocates a corresponding virtual network card to the service virtual machine, wherein the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, the virtual network card is obtained by executing virtualization operation on the physical network card in advance, and further controls the service virtual machine to execute network communication through the corresponding virtual operation resources and the virtual network card after allocating the corresponding virtual network card and the virtual operation resources to the service virtual machine. The device distributes corresponding virtual operation resources and virtual network cards to the service virtual machines in the physical server, and then controls the service virtual machines to execute network communication through the corresponding virtual operation resources and virtual network cards, so that each service virtual machine in the physical server has available virtual operation resources and virtual network cards when executing network communication, thereby ensuring the communication stability of the virtual machines and relatively reducing the communication delay of the service virtual machines, further relatively ensuring the stability of cloud service and reducing the service response delay of the cloud service.
In addition, the embodiment of the present application also discloses a computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the network communication method as described above.
The computer-readable storage medium provided by the application receives a cloud host start instruction, allocates corresponding virtual operation resources to a service virtual machine corresponding to the cloud host start instruction, and allocates a corresponding virtual network card to the service virtual machine, where the virtual operation resources are obtained by performing virtualization operation on physical operation hardware in advance, the virtual network card is obtained by performing virtualization operation on a physical network card in advance, and further controls the service virtual machine to perform network communication through the corresponding virtual operation resources and the virtual network card after allocating the corresponding virtual network card and the virtual operation resources to the service virtual machine. The computer readable storage medium distributes corresponding virtual operation resources and virtual network cards to the service virtual machines in the physical server, and further controls the service virtual machines to execute network communication through the corresponding virtual operation resources and virtual network cards, so that each service virtual machine in the physical server has available virtual operation resources and virtual network cards when executing network communication, thereby ensuring the communication stability of the virtual machines and relatively reducing the communication delay of the service virtual machines, further relatively ensuring the stability of cloud service and reducing the service response delay of the cloud service.
A network communication method, a network communication device, a network communication apparatus, and a storage medium according to the present application are described in detail above. The embodiments in the specification are described in a progressive mode, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (11)

1. A network communication method, comprising:
receiving a cloud host starting instruction;
distributing corresponding virtual operation resources to the service virtual machine corresponding to the cloud host starting instruction, and distributing a corresponding virtual network card to the service virtual machine; the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on a physical network card in advance;
and controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card.
2. The network communication method according to claim 1, wherein before said assigning the corresponding virtual network card to the service virtual machine, the method further comprises:
acquiring network requirement configuration information;
the allocating a corresponding virtual network card to the service virtual machine includes:
and distributing the corresponding virtual network card to the service virtual machine according to the network demand configuration information.
3. The network communication method according to claim 1, wherein the controlling the service virtual machine to perform network communication via the corresponding virtual computing resource and the corresponding virtual network card comprises:
and controlling the virtual operation resources corresponding to the service virtual machine, and executing the network communication in a mode of calling a user mode protocol stack to transmit a data packet to the virtual network card.
4. The network communication method according to claim 1, wherein when the numbers of the physical operation hardware and the physical network cards are both greater than 1, the allocating corresponding virtual operation resources to the service virtual machine corresponding to the cloud host startup instruction and allocating corresponding virtual network cards to the service virtual machine includes:
and allocating the virtual operation resources belonging to the same physical operation hardware to the service virtual machine corresponding to the cloud host starting instruction, and allocating the virtual network card belonging to the same physical network card to the service virtual machine.
5. The network communication method according to any one of claims 1 to 4, wherein the physical operation hardware includes CPU hardware;
the allocating corresponding virtual operation resources to the service virtual machine corresponding to the cloud host starting instruction includes:
distributing corresponding virtual CPU resources to the service virtual machine corresponding to the cloud host starting instruction;
before the allocating corresponding virtual CPU resources to the service virtual machine corresponding to the cloud host start instruction, the method further includes:
and executing virtualization operation on the CPU hardware to obtain the virtual CPU resource.
6. The network communication method of claim 5, wherein the performing the virtualization operation on the CPU hardware to obtain the virtual CPU resource comprises:
and executing virtualization operation on the CPU hardware to obtain CPU core resources and CPU Cache resources.
7. The network communication method according to claim 6, wherein the executing the virtualization operation on the CPU hardware to obtain a CPU core resource and a CPU Cache resource comprises:
executing virtualization operation on the CPU hardware to obtain a CPU core resource comprising a computing group CPU core resource and a service group CPU core resource, and the CPUCache resource comprising a computing group CPU Cache resource and a service group CPU Cache resource;
the allocating corresponding virtual CPU resources to the service virtual machine includes:
and distributing the corresponding CPU core resources of the computing group and the corresponding CPUCache resources of the computing group to the service virtual machine.
8. The network communication method of claim 5, wherein prior to said allocating the respective virtual CPU resource to the business virtual machine, the method further comprises:
and executing the virtualization operation on the physical network card through the SR-IOV to obtain the virtual network card.
9. A network communication apparatus, comprising:
the virtual machine acquisition module is used for receiving a cloud host starting instruction;
the resource allocation module is used for allocating corresponding virtual operation resources to the service virtual machine corresponding to the cloud host starting instruction and allocating a corresponding virtual network card to the service virtual machine; the virtual operation resources are obtained by executing virtualization operation on physical operation hardware in advance, and the virtual network card is obtained by executing virtualization operation on a physical network card in advance;
and the communication execution module is used for controlling the service virtual machine to execute network communication through the corresponding virtual operation resource and the corresponding virtual network card.
10. A network communication device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network communication method as claimed in any one of claims 1 to 8 when executing said computer program.
11. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the network communication method according to any one of claims 1 to 8.
CN202010402015.6A 2020-05-13 2020-05-13 Network communication method, device, equipment and storage medium Pending CN111580935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010402015.6A CN111580935A (en) 2020-05-13 2020-05-13 Network communication method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010402015.6A CN111580935A (en) 2020-05-13 2020-05-13 Network communication method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111580935A true CN111580935A (en) 2020-08-25

Family

ID=72112217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010402015.6A Pending CN111580935A (en) 2020-05-13 2020-05-13 Network communication method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111580935A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374609A (en) * 2021-12-06 2022-04-19 东云睿连(武汉)计算技术有限公司 Deep learning operation running method and system based on RDMA (remote direct memory Access) equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614726A (en) * 2018-03-22 2018-10-02 华为技术有限公司 Virtual machine creation method and device
CN110198243A (en) * 2019-06-11 2019-09-03 深信服科技股份有限公司 A kind of method for network access and relevant device of virtual machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614726A (en) * 2018-03-22 2018-10-02 华为技术有限公司 Virtual machine creation method and device
WO2019179453A1 (en) * 2018-03-22 2019-09-26 华为技术有限公司 Virtual machine creation method and apparatus
CN110198243A (en) * 2019-06-11 2019-09-03 深信服科技股份有限公司 A kind of method for network access and relevant device of virtual machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374609A (en) * 2021-12-06 2022-04-19 东云睿连(武汉)计算技术有限公司 Deep learning operation running method and system based on RDMA (remote direct memory Access) equipment
CN114374609B (en) * 2021-12-06 2023-09-15 东云睿连(武汉)计算技术有限公司 Deep learning job operation method and system based on RDMA equipment

Similar Documents

Publication Publication Date Title
US11714671B2 (en) Creating virtual machine groups based on request
US11301303B2 (en) Resource pool processing to determine to create new virtual resource pools and storage devices based on currebt pools and devices not meeting SLA requirements
US10810045B2 (en) Method and apparatus for allocating central processing unit (CPU) resources in a default resource pool
US10701139B2 (en) Life cycle management method and apparatus
US9780998B2 (en) Method and apparatus for managing physical network interface card, and physical host
US8589554B2 (en) Intelligent and elastic resource pools for heterogeneous datacenter environments
US8762999B2 (en) Guest-initiated resource allocation request based on comparison of host hardware information and projected workload requirement
JP5510556B2 (en) Method and system for managing virtual machine storage space and physical hosts
CN108924268B (en) Container cloud service system and pod creation method and device
WO2015196931A1 (en) Disk io-based virtual resource allocation method and device
US9619263B2 (en) Using cooperative greedy ballooning to reduce second level paging activity
CN110098946B (en) Method and device for deploying virtualized network element equipment
WO2023050819A1 (en) System on chip, virtual machine task processing method and device, and storage medium
CN110633130B (en) Virtual memory management method and device based on memory hot plug technology
CN113312142A (en) Virtualization processing system, method, device and equipment
EP3358795B1 (en) Method and apparatus for allocating a virtual resource in network functions virtualization (nfv) network
CN111580935A (en) Network communication method, device, equipment and storage medium
EP3994574A1 (en) Harvest virtual machine for utilizing cloud-computing resources
CN114860387B (en) I/O virtualization method of HBA controller for virtualization storage application
CN113127144A (en) Processing method, processing device and storage medium
CN112468458B (en) Scheduling method based on neutron layering mechanism
CN115150268A (en) Network configuration method and device of Kubernetes cluster and electronic equipment
CN109002347B (en) Virtual machine memory allocation method, device and system
US20220334863A1 (en) Storage system, installation method, and recording medium
CN116932143A (en) Virtual machine quantity adjusting method and device, computer equipment and storage medium

Legal Events

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