WO2023020141A1 - 云服务器控制方法、装置、存储介质及电子设备 - Google Patents

云服务器控制方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2023020141A1
WO2023020141A1 PCT/CN2022/103612 CN2022103612W WO2023020141A1 WO 2023020141 A1 WO2023020141 A1 WO 2023020141A1 CN 2022103612 W CN2022103612 W CN 2022103612W WO 2023020141 A1 WO2023020141 A1 WO 2023020141A1
Authority
WO
WIPO (PCT)
Prior art keywords
error
memory
virtual machine
scheduling service
crash
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.)
Ceased
Application number
PCT/CN2022/103612
Other languages
English (en)
French (fr)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Publication of WO2023020141A1 publication Critical patent/WO2023020141A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • the present disclosure relates to the technical field of cloud computing, and in particular, to a cloud service control method, device, storage medium, and electronic equipment.
  • MCE Machine Check Error
  • Hypervisor virtual machine monitor
  • the present disclosure provides a cloud service control method, the method comprising:
  • control the cloud scheduler to schedule the corresponding scheduling service from the scheduling service library, the first scheduling service and the second scheduling service are stored in the scheduling service library, the The first scheduling service is used to control restarting the virtual machine on the original host to which the virtual machine belongs, and the second scheduling service is used to control the migration of the virtual machine from the original host to another host.
  • the present disclosure provides a cloud service control device, the device comprising:
  • the first determination module is configured to determine the memory address where the memory error occurs when a memory error is detected, and determine the error type of the memory error according to the memory address, and the error type is used to identify the memory error Whether it will cause the virtual machine to crash;
  • the second determination module is used to determine the total number of errors of the monitored memory errors
  • the third determination module is used to control the cloud scheduler to schedule the corresponding scheduling service from the scheduling service library according to the error type of the memory error and the total number of errors, and the first scheduling service and the first scheduling service are stored in the scheduling service library.
  • the second scheduling service, the first scheduling service is used to control restarting the virtual machine on the original host machine to which the virtual machine belongs, and the second scheduling service is used to control the migration of the virtual machine from the original host machine to which the virtual machine belongs on another host.
  • the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are implemented.
  • an electronic device including:
  • a processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.
  • the error type of the memory error can be determined, and the total number of errors of the detected memory error can be determined, so that according to the error type and the total number of errors of the memory error, the cloud scheduler can be controlled from the scheduling
  • the scheduling service corresponding to scheduling in the service library, the scheduling service library stores the first scheduling service and the second scheduling service, the first scheduling service is used to control the restart of the virtual machine on the original host machine to which the virtual machine belongs, and the second scheduling service is used to It is used to control the migration of the virtual machine from the original host to another host.
  • the memory error can be dealt with in a targeted manner, thereby reducing the impact of the memory error on the cloud computing service.
  • scheduling services according to the error type and total error times of memory errors can realize automatic processing of memory errors, reduce manpower and time spent in memory error processing, and improve processing efficiency.
  • Fig. 1 is a flow chart showing a cloud service control method according to an exemplary embodiment of the present disclosure
  • Fig. 2 is a flowchart showing a cloud service control method according to another exemplary embodiment of the present disclosure
  • Fig. 3 is a block diagram of a cloud service control device according to an exemplary embodiment of the present disclosure
  • Fig. 4 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • the present disclosure provides a cloud service control method to automatically schedule services to handle memory errors according to the error type and total error times of memory errors, reduce manpower and time spent in memory error processing, and improve memory Error handling efficiency.
  • Fig. 1 is a flowchart showing a cloud service control method according to an exemplary embodiment of the present disclosure. Referring to Figure 1, the method includes:
  • Step 101 when a memory error is detected, determine the memory address where the memory error occurs, and determine the error type of the memory error according to the memory address. Wherein, the error type is used to identify whether the memory error will cause the virtual machine to crash.
  • Step 102 determine the total error times of the monitored memory errors.
  • Step 103 control the cloud scheduler to schedule the corresponding scheduling service from the scheduling service library.
  • the first scheduling service and the second scheduling service are stored in the scheduling service library.
  • the first scheduling service uses In order to control restarting the virtual machine on the original host to which the virtual machine belongs, the second scheduling service is used to control to migrate the virtual machine from the original host to another host.
  • the memory error can be handled in a targeted manner, thereby reducing the impact of the memory error on the cloud computing service.
  • scheduling services according to the error type and total error times of memory errors can realize automatic processing of memory errors, reduce manpower and time spent in memory error processing, and improve processing efficiency.
  • steps 101 to 103 may be performed by a server running a cloud computing service.
  • a virtual machine, a virtual machine monitor, and a cloud scheduler run on the server, wherein the virtual machine monitor is an intermediate software layer between the server and the virtual machine, allowing multiple virtual machines to share the server.
  • the server can perform the above step 101 through the virtual machine monitor to determine the error type of the memory error, and then the virtual machine monitor reports the detailed information and error type of the memory error to the cloud scheduler, and then through the cloud scheduler device to perform step 102 and step 103.
  • step 101 if a memory error occurs, the operating system kernel of the cloud server can send a memory error notification to the virtual machine monitor, and then when the virtual machine monitor receives the memory error notification, determine the monitoring to a memory error. Afterwards, step 101 to step 103 may be performed.
  • the operating system kernel of the server will notify the virtual machine monitor, and when the virtual machine monitor receives the notification from the kernel, it will determine that a memory error has been detected.
  • the memory of the server in the cloud computing scenario is divided into two parts, one part corresponds to the virtual machine, and the other part corresponds to the virtual machine monitor. Therefore, after a memory error is detected, the memory address where the memory error occurs can be further judged, so as to determine the type of the error based on the memory address.
  • the error types may include crash errors, which are memory errors capable of crashing the virtual machine, or non-crash errors, which are memory errors capable of causing the virtual machine to continue running.
  • the error type of the memory error can be determined by the following method: in the case that the memory address belongs to the memory address range corresponding to the virtual machine monitor, determine whether the memory error can be repaired through the memory erasure code, if the memory error can Through memory erasure code repair, it is determined that the error type of the memory error is a non-crash error that will not cause the virtual machine to crash. If the memory error cannot be repaired through the memory erasure code, it is determined that the error type of the memory error is that it will cause the virtual machine to crash. crash error.
  • memory erasure codes can be used to repair memory errors caused by an abnormality of a certain bit in the memory. If the memory error can be repaired by the memory erasure code, it means that the memory error is caused by an abnormality in a certain bit in the memory, which will not cause the virtual machine process to crash, so that it can be determined that the memory error is a non-crash error. Conversely, if the memory error cannot be repaired by the memory erasure code, it means that the memory error may be caused by abnormalities in multiple bits in the memory, which may eventually cause the virtual machine process to crash, so that the memory error can be determined as a crash error.
  • the memory address belongs to the memory address range corresponding to the virtual machine
  • the error type is a non-crash error that will not cause the virtual machine to crash, and if the memory error is not successfully injected into the virtual machine, it is determined that the error type of the memory error is a crash error that will cause the virtual machine to crash.
  • the memory error may be caused by an application program running on the virtual machine.
  • the This memory error attempts to inject into the virtual machine. If the injection is successful, it means that the virtual machine can automatically repair the memory error, so that it can be determined that the memory error is not a crash error. Conversely, if the injection fails, it means that the virtual machine cannot automatically repair the memory error, so that it can be determined that the memory error is a crash error.
  • the total number of memory errors detected by the virtual machine monitor can be determined, so as to combine the error type of the memory error and the total number of errors to control the cloud scheduler to schedule the corresponding Scheduling service.
  • the cloud scheduler can be controlled to schedule the virtual machine from the scheduling service library when the total number of errors reaches a preset threshold.
  • Second dispatch service is used to control the migration of the virtual machine from the original host to another host.
  • the second scheduling service is used to control the migration of the virtual machine from the original host to another host, such as hot migration or cold migration of the virtual machine from the original host to another host according to whether the virtual machine crashes .
  • hot migration is to save the running state of the virtual machine completely during the running process of the virtual machine, and at the same time quickly restore it to the original hardware platform or a different hardware platform. After the restoration, the virtual machine still runs smoothly, and the user will not notice any difference.
  • Cold migration refers to the migration of a virtual machine to another host while the virtual machine is powered off.
  • the virtual machine can continue to run. Further, it may be determined whether the total number of errors reaches a preset threshold. If the total number of errors does not reach the preset threshold, continue to record the total number of errors. If the total number of errors reaches the preset threshold, it means that the host machine to which the virtual machine belongs is in an unhealthy state and is not suitable for the normal operation of the virtual machine. Therefore, the second scheduling service can be scheduled through the cloud scheduler, that is, the virtual machine will be migrated to another healthy host machine.
  • the host machine to which the virtual machine belongs can be understood as the above-mentioned server that executes the disclosed method, and another host machine can be understood as another server that is different from the server and can guarantee the normal operation of the virtual machine. In this way, the normal operation of the virtual machine can be guaranteed, thereby ensuring the normal operation of the cloud computing service.
  • the cloud scheduler can be controlled to schedule the first scheduling from the scheduling service library when the total number of errors does not reach the preset threshold. service, or when the total number of errors reaches a preset threshold, control the cloud scheduler to schedule the second scheduling service from the scheduling service library.
  • the memory error is a crash error
  • the memory error will cause the virtual machine process to crash.
  • the total number of errors does not reach the preset threshold, it means that the host machine to which the virtual machine belongs is still in a healthy state.
  • Scheduling the first scheduling service that is, restarting the virtual machine on the original host machine to which the virtual machine belongs. If the total number of errors reaches the preset threshold, it means that the host machine to which the virtual machine belongs is in an unhealthy state, and the host machine cannot guarantee the normal operation of the virtual machine. Therefore, the cloud scheduler can be controlled to schedule the second scheduling service from the scheduling service library. That is to migrate the virtual machine to another host. Moreover, in this case, since the process of the virtual machine crashes, a cold migration method can be adopted.
  • controlling the cloud scheduler to schedule the first scheduling service from the scheduling service library may be: determine whether the memory address where a memory error occurs belongs to a large page memory address, and if the memory address does not belong to a large page memory address, control the cloud The scheduler schedules the first scheduling service from the scheduling service library, or if the memory address belongs to the huge page memory address, it allocates huge page memory for the original host to which the virtual machine belongs, and controls the cloud scheduler to start the scheduling service from the scheduling service after allocating the huge page memory.
  • the library schedules the first scheduler service.
  • the first scheduling service can be scheduled to restart the virtual machine on the original host to which the virtual machine belongs. If the memory address belongs to the large page memory address, it can be assigned to the original host to which the virtual machine belongs Large page memory, that is to say, make the original host's large page memory the same as the large page memory capacity before the memory error occurred. Then, the first scheduling service can be scheduled on the original host machine after the huge page memory is allocated, so as to restart the virtual machine. In this way, the problem of insufficient memory in the process of restarting the virtual machine can be avoided, and the normal operation of the virtual machine after restarting can be ensured.
  • the cloud service control method includes:
  • step 201 it is determined that a memory error is detected by the virtual machine monitor.
  • Step 202 if the memory address belongs to the memory address range corresponding to the virtual machine monitor, determine whether the memory error can be repaired through the memory erasure code, if so, execute step 203, otherwise execute step 204.
  • Step 203 determine that the memory error is not a crash error, and go to step 206.
  • Step 204 determine that the memory error is a crash error, and go to step 210.
  • Step 205 if the memory address belongs to the memory address range corresponding to the virtual machine, determine whether the memory error can be injected into the virtual machine, if yes, execute step 203 , otherwise execute step 204 .
  • Step 206 determine whether the total number of memory errors reaches a preset threshold, if yes, execute step 207, otherwise execute step 208.
  • Step 207 scheduling the second scheduling service through the cloud scheduler, and hot migrating the virtual machine to another host machine.
  • Step 208 continue to record the total error times of memory errors.
  • Step 209 determine whether the total number of errors of the memory error reaches the preset threshold, if so, perform step 210, otherwise perform step 211.
  • Step 210 determine whether the memory address where the memory error occurs belongs to a large page memory address, if yes, execute step 212, otherwise execute step 213.
  • Step 211 schedule the second scheduling service through the cloud scheduler, and cold migrate the virtual machine to another host machine.
  • Step 212 allocate large page memory for the original host to which the virtual machine belongs, and schedule the first service after allocating the large page memory, and restart the virtual machine on the original host to which the virtual machine belongs.
  • Step 213 scheduling the first service, and restarting the virtual machine on the original host to which the virtual machine belongs.
  • this disclosure proposes to automatically schedule corresponding scheduling services for different types of memory errors. While solving memory errors in a timely and appropriate manner, it records the number of memory errors that occur on the host to monitor the health status of the host’s hardware, enabling early migration of virtual machines. machines to prevent disruption to business.
  • the present disclosure also provides a cloud service control device, which can become a part or all of the electronic equipment through software, hardware or a combination of both.
  • the cloud service control device 300 may include:
  • the first determination module 301 is configured to determine the memory address where the memory error occurs when a memory error is detected, and determine the error type of the memory error according to the memory address, and the error type is used to identify the memory Whether the error will cause the virtual machine to crash;
  • the second determination module 302 is configured to determine the total number of errors of the monitored memory errors
  • the third determination module 303 is configured to control the cloud scheduler to schedule the corresponding scheduling service from the scheduling service library according to the error type of the memory error and the total number of errors, and the first scheduling service is stored in the scheduling service library and a second scheduling service, the first scheduling service is used to control restarting the virtual machine on the original host machine to which the virtual machine belongs, and the second scheduling service is used to control the migration of the virtual machine from the original host machine to which it belongs to another host.
  • the third determining module 303 is configured to:
  • the third determining module 303 is configured to:
  • the third determining module 303 is configured to:
  • control the cloud scheduler When the memory address does not belong to a large page memory address, control the cloud scheduler to schedule the first scheduling service from the scheduling service library, or when the memory address belongs to a large page memory address, control the cloud scheduler to schedule the first scheduling service for the virtual machine
  • the original host to which it belongs allocates the huge page memory, and controls the cloud scheduler to schedule the first scheduling service from the scheduling service library after the huge page memory is allocated.
  • the first determination module 301 is configured to:
  • the memory error can be repaired by the memory erasure code, determine that the error type of the memory error is a non-crash error that will not cause the virtual machine to crash, and when the memory error cannot be repaired by the memory erasure code When, it is determined that the error type of the memory error is a crash error that will cause the virtual machine to crash.
  • the first determining module 301 is configured to:
  • the error type of the memory error is a non-crash error that will not cause the virtual machine to crash, and when the memory error is not successfully injected into the virtual machine , determining that the error type of the memory error is a crash error that will cause the virtual machine to crash.
  • the device 300 also includes:
  • the sending module is used to send a memory error notification to the virtual machine monitor through the operating system kernel of the cloud server;
  • a fourth determining module configured to determine that a memory error is detected when the virtual machine monitor receives the memory error notification.
  • the present disclosure also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processing device, the steps of any cloud service control method above are implemented.
  • an electronic device including:
  • a processing device configured to execute the computer program in the storage device, so as to realize the steps of any cloud service control method described above.
  • FIG. 4 it shows a schematic structural diagram of an electronic device 400 suitable for implementing an embodiment of the present disclosure.
  • the terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 4 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
  • an electronic device 400 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 401, which may be randomly accessed according to a program stored in a read-only memory (ROM) 402 or loaded from a storage device 408.
  • a processing device such as a central processing unit, a graphics processing unit, etc.
  • RAM read-only memory
  • various appropriate actions and processes are executed by programs in the memory (RAM) 403 .
  • RAM 403 In the RAM 403, various programs and data necessary for the operation of the electronic device 400 are also stored.
  • the processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404.
  • An input/output (I/O) interface 405 is also connected to bus 404 .
  • the following devices can be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 407 such as a computer; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409.
  • the communication means 409 may allow the electronic device 400 to perform wireless or wired communication with other devices to exchange data. While FIG. 4 shows electronic device 400 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 409, or from storage means 408, or from ROM 402.
  • the processing device 401 When the computer program is executed by the processing device 401, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used to communicate, and can communicate with digital data in any form or medium (for example, communication network) interconnection.
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: when a memory error is detected, determines the memory address where the memory error occurs, and Determine the error type of the memory error according to the memory address, and the error type is used to identify whether the memory error will cause the virtual machine to crash; determine the total number of errors of the memory error detected; according to the error of the memory error type and the total number of errors, the control cloud scheduler schedules the corresponding scheduling service from the scheduling service library, the first scheduling service and the second scheduling service are stored in the scheduling service library, and the first scheduling service is used to control The virtual machine is restarted on the original host to which the virtual machine belongs, and the second scheduling service is used to control migration of the virtual machine from the original host to another host.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to connected via the Internet.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation on the module itself under certain circumstances.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • Example 1 provides a cloud service control method, including:
  • control the cloud scheduler to schedule the corresponding scheduling service from the scheduling service library, the first scheduling service and the second scheduling service are stored in the scheduling service library, the The first scheduling service is used to control restarting the virtual machine on the original host to which the virtual machine belongs, and the second scheduling service is used to control the migration of the virtual machine from the original host to another host.
  • Example 2 provides the method of Example 1, wherein according to the error type of the memory error and the total number of errors, the cloud scheduler is controlled to schedule the corresponding scheduling from the scheduling service library services, including:
  • Example 3 provides the method of Example 1, wherein according to the error type of the memory error and the total number of errors, the cloud scheduler is controlled to schedule the corresponding scheduling from the scheduling service library services, including:
  • the cloud scheduler determines whether the memory error will cause the virtual machine to crash. If the error type of the memory error identifies that the memory error will cause the virtual machine to crash, then when the total number of errors does not reach the preset threshold, control the cloud scheduler from the scheduling service library Scheduling the first scheduling service, or controlling the cloud scheduler to schedule the second scheduling service from a scheduling service library when the total number of errors reaches the preset threshold.
  • Example 4 provides the method of Example 3, and the controlling the cloud scheduler to schedule the first scheduling service from the scheduling service library includes:
  • the memory address does not belong to a large page memory address, control the cloud scheduler to schedule the first scheduling service from the scheduling service library; or, if the memory address belongs to a large page memory address, the virtual The original host to which the machine belongs allocates a huge page memory, and controls the cloud scheduler to schedule the first scheduling service from the scheduling service library after the huge page memory is allocated.
  • Example 5 provides the method of any one of Examples 1-4, wherein the determining the error type of the memory error according to the memory address includes:
  • the memory error can be repaired by the memory erasure code, it is determined that the error type of the memory error is a non-crash error that will not cause the virtual machine to crash, and if the memory error cannot be repaired by the memory erasure code , then it is determined that the error type of the memory error is a crash error that will cause the virtual machine to crash.
  • Example 6 provides the method of any one of Examples 1-4, wherein the determining the error type of the memory error according to the memory address includes:
  • the error type of the memory error is a non-crash error that will not cause the virtual machine to crash; if the memory error is not successfully injected into the virtual machine, Then it is determined that the error type of the memory error is a crash error that will cause the virtual machine to crash.
  • Example 7 provides the method of any one of Examples 1-4, the method further comprising:
  • the virtual machine monitor When the virtual machine monitor receives the memory error notification, it is determined that a memory error is detected.
  • Example 8 provides a cloud service control device, the device comprising:
  • the first determination module is configured to determine the memory address where the memory error occurs when a memory error is detected, and determine the error type of the memory error according to the memory address, and the error type is used to identify the memory error Whether it will cause the virtual machine to crash;
  • the second determination module is used to determine the total number of errors of the monitored memory errors
  • the third determination module is used to control the cloud scheduler to schedule the corresponding scheduling service from the scheduling service library according to the error type of the memory error and the total number of errors, and the first scheduling service and the first scheduling service are stored in the scheduling service library.
  • the second scheduling service, the first scheduling service is used to control restarting the virtual machine on the original host machine to which the virtual machine belongs, and the second scheduling service is used to control the migration of the virtual machine from the original host machine to which the virtual machine belongs on another host.
  • Example 9 provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processing device, the method described in any one of Examples 1-7 is implemented. step.
  • Example 10 provides an electronic device, comprising:
  • a processing device configured to execute the computer program in the storage device to implement the steps of any one of the methods in Examples 1-7.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

本公开涉及一种云服务控制方法、装置、存储介质及电子设备,以针对性的处理内存错误,提高内存错误的处理效率。其中,该方法包括:当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;确定监测到的内存错误的总错误次数;根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。

Description

云服务器控制方法、装置、存储介质及电子设备
相关申请的交叉引用
本申请基于申请号为202110957018.0、申请日为2021年08月19日,名称为“云服务器控制方法、装置、存储介质及电子设备”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及云计算技术领域,具体地,涉及一种云服务控制方法、装置、存储介质及电子设备。
背景技术
随着云计算服务的兴起,大量的企业与个人服务部署在云服务器上,对云服务器进行有效管理显得异常重要。内存错误(MCE,Machine Check Error)作为一种常见的硬件故障会对虚拟机的正常运行造成不同程度的影响,有的内存错误会使虚拟机监视器(Hypervisor)停止运行,有的内存错误会使虚拟机重启。
相关技术中,在监测到内存错误后,需要运维人员登录机器查看具体的原因并手动进行处理,或者直接选择重启虚拟机。对于手动处理的方式,需要耗费较多的人力和时间,对于内存错误的处理效率较低。对于直接重启虚拟机的方式,无法针对性内存错误进行处理,从而会对云计算服务的正常运行造成影响。
发明内容
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
第一方面,本公开提供一种云服务控制方法,所述方法包括:
当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;
确定监测到的内存错误的总错误次数;
根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
第二方面,本公开提供一种云服务控制装置,所述装置包括:
第一确定模块,用于当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;
第二确定模块,用于确定监测到的内存错误的总错误次数;
第三确定模块,用于根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
第三方面,本公开提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理装置执行时实现第一方面中所述方法的步骤。
第四方面,本公开提供一种电子设备,包括:
存储装置,其上存储有计算机程序;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现第一方面中所述方法的步骤。
通过上述技术方案,当监测到内存错误时,可以确定内存错误的错误类型,并确定监测到的内存错误的总错误次数,从而根据内存错误的错误类型和总错误次数,控制云调度器从调度服务库中调度对应的调度服务,该调度服务库中存储有第一调度服务和第二调度服务,第一调度服务用于控制在虚拟机所属的原宿主机上重启虚拟机,第二调度服务用于控制将虚拟机从所属的原宿主机上迁移至另一宿主机上。相较于相关技术中直接重启虚拟机的方式,可以针对性地处理内存错误,从而减少内存错误对云计算服务的影响。另外,根据内存错误的错误类型和总错误次数调度服务,可以实现内存错误的自动处理,减少内存错误处理过程中耗费的人力和时间,提高处理效率。
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:
图1是根据本公开一示例性实施例示出的一种云服务控制方法的流程图;
图2是根据本公开另一示例性实施例示出的一种云服务控制方法的流程图;
图3是根据本公开一示例性实施例示出的一种云服务控制装置的框图;
图4是根据本公开一示例性实施例示出的一种电子设备的框图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。另外需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
正如背景技术所言,相关技术在监测到内存错误后,需要运维人员登录机器查看具体的原因并手动进行处理,或者直接选择重启虚拟机。对于手动处理的方式,需要耗费较多的人力和时间,对于内存错误的处理效率较低。对于直接重启虚拟机的方式,无法针对性内存错误进行处理,从而会对云计算服务的正常运行造成影响。
有鉴于此,本公开提供一种云服务控制方法,以根据内存错误的错误类型和总错误次数针对性地自动调度服务来处理内存错误,减少内存错误处理过程中耗费的人力和时间,提高内存错误处理效率。
图1是根据本公开一示例性实施例示出一种云服务控制方法的流程图。参照图1,该方法包括:
步骤101,当监测到内存错误时,确定发生内存错误的内存地址,并根据该内存地址确定内存错误的错误类型。其中,错误类型用于标识内存错误是否会导致虚拟机崩溃。
步骤102,确定监测到的内存错误的总错误次数。
步骤103,根据内存错误的错误类型和总错误次数,控制云调度器从调度服务库中调度对应的调度服务,调度服务库中存储有第一调度服务和第二调度服务,第一调度服务用于控制在虚拟机所属的原宿主机上重启虚拟机,第二调度服务用于控制将虚拟机从所属的原宿主机上迁移至另一宿主机上。
通过上述方式,相较于相关技术中直接重启虚拟机的方式,可以针对性地处理内存错误,从而减少内存错误对云计算服务的影响。另外,根据内存错误的错误类型和总错误次数调度服务,可以实现内存错误的自动处理,减少内存错误处理过程中耗费的人力和时间,提高处理效率。
为了使得本领域技术人员更加理解本公开提供的云服务控制方法,下面上述各步骤进行详细举例说明。
应当理解的是,本公开提供的云服务控制方法可以应用于云计算场景。比如,可以通过运行云计算服务的服务器执行步骤101至步骤103。或者,进一步细分,服务器上运行有虚拟机、虚拟机监视器和云调度器,其中虚拟机监视器为服务器和虚拟机之间的中间软件层,可允许多个虚拟机共享服务器。在此种场景下,服务器可以通过虚拟机监视器执行上述步骤101,确定内存错误的错误类型,然后虚拟机监视器将该内存错误的详细信息和错误类型上报给云调度器,再通过云调度器来执行步骤102和步骤103。
在可能的方式中,在步骤101之前,若发生内存错误,则可以通过云服务器的操作系统内核向虚拟机监视器发送内存错误通知,然后当虚拟机监视器接收到内存错误通知时,确定监测到内存错误。之后,可以执行步骤101至步骤103。
也即是说,在发生内存错误时,服务器的操作系统内核会通知虚拟机监视器,当虚拟机监视器接收到内核的通知,则确定监测到内存错误。
应当理解的是,云计算场景下服务器的内存分为两部分,一部分对应虚拟机,另一部分对应虚拟机监视器。因此,在监测到内存错误后,可以进一步判断发生该内存错误的内存地址,从而根据该内存地址确定错误类型。
示例地,在云计算服务中,有的内存错误会使虚拟机监视器停止运行,但虚拟机可以继续运行,而有的内存错误会使虚拟机进程崩溃,需要重启虚拟机。因此,错误类型可以包括崩溃错误或非崩溃错误,崩溃错误是能够使虚拟机崩溃的内存错误,非崩溃错误是能够使虚拟机继续运行的内存错误。
在可能的方式中,可通过如下方式确定内存错误的错误类型:在内存地址属于虚拟机监视器对应的内存地址范围的情况下,确定内存错误是否能够通过内存纠删码修复,若内存错误能够通过内存纠删码修复,则确定内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,若内存错误通过内存纠删码无法修复,则确定内存错误的错误类型为会导致虚拟机崩溃的崩溃错误。
示例地,内存纠删码可以用于修复由于内存中某一比特位发生异常而导致的内存错误。若内存错误能够通过内存纠删码修复,则说明该内存错误是由内存中某一比特位发生异常而导致的,不会造成虚拟机进程崩溃,从而可以确定内存错误为非崩溃错误。反之,若内存错误通过内存纠删码无法修复,则说明该内存错误可能是由于内存中多个比特位发生异常而导致的,最终可能造成虚拟机进程崩溃,从而可以确定内存错误为崩溃错误。
在另一可能的方式中,在内存地址属于虚拟机对应的内存地址范围的情况下,可以确定是否能够将内存错误注入到虚拟机,若成功将内存错误注入 到虚拟机,则确定内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,若未成功将内存错误注入到虚拟机,则确定内存错误的错误类型为会导致虚拟机崩溃的崩溃错误。
示例地,若发生内存错误的内存地址属于虚拟机,则该内存错误可能是由于运行在虚拟机上的某个应用程序导致的,为了进一步确定该内存错误是否会使虚拟机进程崩溃,可以将该内存错误尝试注入到虚拟机中。若注入成功,则说明虚拟机能够自动修复该内存错误,从而可以确定该内存错误是非崩溃错误。反之,若注入失败,则说明虚拟机无法自动修复该内存错误,从而可以确定该内存错误是崩溃错误。
在确定内存错误的错误类型后,可以确定虚拟机监视器监测到的内存错误的总错误次数,从而结合内存错误的错误类型和该总错误次数,控制云调度器从调度服务库中调度对应的调度服务。
在可能的方式中,若内存错误的错误类型标识所述内存错误不会导致所述虚拟机崩溃,则可以在总错误次数达到预设阈值的情况下,控制云调度器从调度服务库中调度第二调度服务。该第二调度服务用于控制将虚拟机从所属的原宿主机上迁移至另一宿主机上。
示例地,预设阈值可以根据实际情况进行设定,本公开实施例对此不作限定。第二调度服务用于控制将虚拟机从所属的原宿主机上迁移至另一宿主机上,比如根据虚拟机是否崩溃将虚拟机从所属的原宿主机上热迁移或冷迁移至另一宿主机上。其中,热迁移是在虚拟机的运行过程中将虚拟机的运行状态完整保存下来,同时快速恢复到原有硬件平台或者不同硬件平台上,恢复后虚拟机仍旧平滑运行,用户不会察觉到任何差异。冷迁移是指在虚拟机处于关机状态时间虚拟机迁移到另一宿主机。
在本公开实施例中,若内存错误的错误类型标识内存错误不会导致虚拟机崩溃,即内存错误为非崩溃错误,虚拟机可以继续运行。进一步,可以确定总错误次数是否达到预设阈值。若总错误次数未达到预设阈值,则继续记 录总错误次数。若总错误次数达到预设阈值,则说明虚拟机所属的宿主机处于非健康状态,不适合虚拟机的正常运行,因此可以通过云调度器调度第二调度服务,即将虚拟机迁移到另一健康的宿主机。在此种情况下,由于虚拟机没有崩溃,因此可以在虚拟机运行的情况下,将虚拟机的运行状态热迁移到另一健康的宿主机。其中,虚拟机所属的宿主机可以理解为上述提及的执行本公开方法的服务器,另一宿主机可以理解为区别与该服务器的、能够保证虚拟机正常运行的其他服务器。通过这种方式,可以保证虚拟机的正常运行,从而保证云计算服务的正常运行。
在其他可能的方式中,若内存错误的错误类型标识内存错误会导致虚拟机崩溃,则可以在总错误次数未达到预设阈值的情况下,控制云调度器从调度服务库中调度第一调度服务,或者在总错误次数达到预设阈值的情况下,控制云调度器从调度服务库中调度第二调度服务。
示例地,若内存错误为崩溃错误,则说明该内存错误会使虚拟机进程崩溃。此种情况下,若总错误次数未达到预设阈值,则说明虚拟机所属的宿主机还处于健康状态,该宿主机可以保证虚拟机的正常运行,从而可以控制云调度器从调度服务库中调度第一调度服务,即在虚拟机所属的原宿主机上重启虚拟机。若总错误次数达到预设阈值,则说明虚拟机所属的宿主机处于非健康状态,该宿主机无法保证虚拟机的正常运行,因此可以控制云调度器从调度服务库中调度第二调度服务,即将该虚拟机迁移到另一宿主机。并且,此种情况下由于虚拟机的进程崩溃,因此可以采用冷迁移的方式。
在可能的方式中,控制云调度器从调度服务库中调度第一调度服务可以是:确定发生内存错误的内存地址是否属于大页内存地址,若内存地址不属于大页内存地址,则控制云调度器从调度服务库中调度第一调度服务,或者若内存地址属于大页内存地址,则为虚拟机所属的原宿主机分配大页内存,并在分配大页内存后控制云调度器从调度服务库中调度第一调度服务。
应当理解的是,若大页内存发生内存错误,则大页内存的容量会减少。 在此情况下,直接调度第一调度服务,在原宿主机上重启虚拟机,会存在内存不足的情况。因此,本公开实施例中先确定发生内存错误的内存地址是否属于大页内存地址。
若内存地址不属于大页内存地址,则可以调度第一调度服务,在虚拟机所属的原宿主机上重启虚拟机,若内存地址属于大页内存地址,则可以先为虚拟机所属的原宿主机分配大页内存,也就是说使原宿主机的大页内存与发生内存错误之前的大页内存容量一致。然后可以在分配大页内存后的原宿主机上调度第一调度服务,以重启虚拟机。由此,可以避免重启虚拟机的过程中内存不足的问题,保证重启后虚拟机的正常运行。
下面通过另一示例性实施例对本公开提供的云服务控制方法进行说明。参照图2,该云服务控制方法包括:
步骤201,确定虚拟机监视器监测到内存错误。
步骤202,在内存地址属于虚拟机监视器对应的内存地址范围的情况下,确定内存错误是否能够通过内存纠删码修复,若是,则执行步骤203,否则执行步骤204。
步骤203,确定内存错误为非崩溃错误,并进入步骤206。
步骤204,确定内存错误为崩溃错误,并进入步骤210。
步骤205,在内存地址属于虚拟机对应的内存地址范围的情况下,确定是否能够将内存错误注入到虚拟机,若是,则执行步骤203,否则执行步骤204。
步骤206,确定内存错误的总错误次数是否达到预设阈值,若是,则执行步骤207,否则执行步骤208。
步骤207,通过云调度器调度第二调度服务,将虚拟机热迁移到另一宿主机。
步骤208,继续记录内存错误的总错误次数。
步骤209,确定内存错误的总错误次数是否达到预设阈值,若是,则执 行步骤210,否则执行步骤211。
步骤210,确定发生内存错误的内存地址是否属于大页内存地址,若是,则执行步骤212,否则执行步骤213。
步骤211,通过云调度器调度第二调度服务,将虚拟机冷迁移到另一宿主机。
步骤212,为虚拟机所属的原宿主机分配大页内存,并在分配大页内存后调度第一服务,在虚拟机所属的原宿主机上重启虚拟机。
步骤213,调度第一服务,在虚拟机所属的原宿主机上重启虚拟机。
上述各步骤的具体实施方式已在上文进行详细举例说明,这里不再赘述。另外应当理解的是,对于上述方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本公开并不受上文所描述的动作顺序的限制。其次,本领域技术人员也应该知悉,上文所描述的实施例属于优选实施例,所涉及的步骤并不一定是本公开所必须的。
应当理解的是,在大规模云服务器的管理中,人工处理内存错误的方式是低效和不及时的,而直接重启虚拟机也无法有效地预防内存错误。因此,本公开提出针对不同的内存错误类型自动调度对应的调度服务,在及时并且恰当地解决内存错误的同时,记录宿主机发生内存错误的次数以监测宿主机硬件健康状态,可以及早的迁移虚拟机防止影响到业务。
基于同一构思,本公开还提供一种云服务控制装置,该装置可以通过软件、硬件或者两者结合的方式成为电子设备的部分或全部。参照图3,该云服务控制装置300可以包括:
第一确定模块301,用于当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;
第二确定模块302,用于确定监测到的内存错误的总错误次数;
第三确定模块303,用于根据所述内存错误的错误类型和所述总错误次 数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
可选地,所述第三确定模块303用于:
当所述内存错误的错误类型标识所述内存错误不会导致所述虚拟机崩溃时,在所述总错误次数达到预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第二调度服务。
可选地,所述第三确定模块303用于:
当所述内存错误的错误类型标识所述内存错误会导致所述虚拟机崩溃时,在所述总错误次数未达到所述预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第一调度服务,或者在所述总错误次数达到所述预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第二调度服务。
可选地,所述第三确定模块303用于:
确定发生所述内存错误的内存地址是否属于大页内存地址;
当所述内存地址不属于大页内存地址时,控制所述云调度器从调度服务库中调度所述第一调度服务,或者当所述内存地址属于大页内存地址时,为所述虚拟机所属的原宿主机分配大页内存,并在分配大页内存后控制所述云调度器从调度服务库中调度所述第一调度服务。
可选地,所述第一确定模块301用于:
在所述内存地址属于虚拟机监视器对应的内存地址范围的情况下,确定所述内存错误是否能够通过内存纠删码修复;
当所述内存错误能够通过所述内存纠删码修复时,确定所述内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,当所述内存错误通过所述内存纠删码无法修复时,确定所述内存错误的错误类型为会导致所述虚拟机崩溃的崩溃错误。
可选地,所述第一确定模块301用于:
在所述内存地址属于所述虚拟机对应的内存地址范围的情况下,确定是否能够将所述内存错误注入到所述虚拟机;
当成功将所述内存错误注入到所述虚拟机时,确定所述内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,当未成功将所述内存错误注入到所述虚拟机时,确定所述内存错误的错误类型为会导致虚拟机崩溃的崩溃错误。
可选地,所述装置300还包括:
发送模块,用于通过云服务器的操作系统内核向虚拟机监视器发送内存错误通知;
第四确定模块,用于当所述虚拟机监视器接收到所述内存错误通知时,确定监测到内存错误。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
基于同一构思,本公开还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理装置执行时实现上述任一云服务控制方法的步骤。
基于同一构思,本公开还提供一种电子设备,包括:
存储装置,其上存储有计算机程序;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现上述任一云服务控制方法的步骤。
下面参考图4,其示出了适于用来实现本公开实施例的电子设备400的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图4示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图4所示,电子设备400可以包括处理装置(例如中央处理器、图形处理器等)401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储装置408加载到随机访问存储器(RAM)403中的程序而执行各种适当的动作和处理。在RAM 403中,还存储有电子设备400操作所需的各种程序和数据。处理装置401、ROM 402以及RAM 403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。
通常,以下装置可以连接至I/O接口405:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置406;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置407;包括例如磁带、硬盘等的存储装置408;以及通信装置409。通信装置409可以允许电子设备400与其他设备进行无线或有线通信以交换数据。虽然图4示出了具有各种装置的电子设备400,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置409从网络上被下载和安装,或者从存储装置408被安装,或者从ROM 402被安装。在该计算机程序被处理装置401执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读 存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;确定监测到的内存错误的总错误次数;根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中 存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来 执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,示例1提供了一种云服务控制方法,包括:
当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;
确定监测到的内存错误的总错误次数;
根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,包括:
若所述内存错误的错误类型标识所述内存错误不会导致所述虚拟机崩溃,则在所述总错误次数达到预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第二调度服务。
根据本公开的一个或多个实施例,示例3提供了示例1的方法,所述根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,包括:
若所述内存错误的错误类型标识所述内存错误会导致所述虚拟机崩溃,则在所述总错误次数未达到所述预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第一调度服务,或者在所述总错误次数达到所述预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第二调度服务。
根据本公开的一个或多个实施例,示例4提供了示例3的方法,所述控制所述云调度器从调度服务库中调度所述第一调度服务,包括:
确定发生所述内存错误的内存地址是否属于大页内存地址;
若所述内存地址不属于大页内存地址,则控制所述云调度器从调度服务库中调度所述第一调度服务;或者,若所述内存地址属于大页内存地址,则为所述虚拟机所属的原宿主机分配大页内存,并在分配大页内存后控制所述云调度器从调度服务库中调度所述第一调度服务。
根据本公开的一个或多个实施例,示例5提供了示例1-4任一项的方法,所述根据所述内存地址确定所述内存错误的错误类型,包括:
在所述内存地址属于虚拟机监视器对应的内存地址范围的情况下,确定所述内存错误是否能够通过内存纠删码修复;
若所述内存错误能够通过所述内存纠删码修复,则确定所述内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,若所述内存错误通过所述内存纠删码无法修复,则确定所述内存错误的错误类型为会导致所述虚拟机崩溃的崩溃错误。
根据本公开的一个或多个实施例,示例6提供了示例1-4任一项的方法, 所述根据所述内存地址确定所述内存错误的错误类型,包括:
在所述内存地址属于所述虚拟机对应的内存地址范围的情况下,确定是否能够将所述内存错误注入到所述虚拟机;
若成功将所述内存错误注入到所述虚拟机,则确定所述内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,若未成功将所述内存错误注入到所述虚拟机,则确定所述内存错误的错误类型为会导致所述虚拟机崩溃的崩溃错误。
根据本公开的一个或多个实施例,示例7提供了示例1-4任一项的方法,所述方法还包括:
通过云服务器的操作系统内核向虚拟机监视器发送内存错误通知;
当所述虚拟机监视器接收到所述内存错误通知时,确定监测到内存错误。
根据本公开的一个或多个实施例,示例8提供了一种云服务控制装置,所述装置包括:
第一确定模块,用于当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;
第二确定模块,用于确定监测到的内存错误的总错误次数;
第三确定模块,用于根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
根据本公开的一个或多个实施例,示例9提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理装置执行时实现示例1-7中任一项所述方法的步骤。
根据本公开的一个或多个实施例,示例10提供了一种电子设备,包括:
存储装置,其上存储有计算机程序;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1-7中任一项所述方法的步骤。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。

Claims (10)

  1. 一种云服务控制方法,其特征在于,所述方法包括:
    当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;
    确定监测到的内存错误的总错误次数;
    根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,包括:
    若所述内存错误的错误类型标识所述内存错误不会导致所述虚拟机崩溃,则在所述总错误次数达到预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第二调度服务。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,包括:
    若所述内存错误的错误类型标识所述内存错误会导致所述虚拟机崩溃,则在所述总错误次数未达到所述预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第一调度服务,或者在所述总错误次数达到所述预设阈值的情况下,控制所述云调度器从调度服务库中调度所述第二调度服务。
  4. 根据权利要求3所述的方法,其特征在于,所述控制所述云调度器从调度服务库中调度所述第一调度服务,包括:
    确定发生所述内存错误的内存地址是否属于大页内存地址;
    若所述内存地址不属于大页内存地址,则控制所述云调度器从调度服务库中调度所述第一调度服务;或者
    若所述内存地址属于大页内存地址,则为所述虚拟机所属的原宿主机分配大页内存,并在分配大页内存后控制所述云调度器从调度服务库中调度所述第一调度服务。
  5. 根据权利要求1-4任一所述的方法,其特征在于,所述根据所述内存地址确定所述内存错误的错误类型,包括:
    在所述内存地址属于虚拟机监视器对应的内存地址范围的情况下,确定所述内存错误是否能够通过内存纠删码修复;
    若所述内存错误能够通过所述内存纠删码修复,则确定所述内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,若所述内存错误通过所述内存纠删码无法修复,则确定所述内存错误的错误类型为会导致所述虚拟机崩溃的崩溃错误。
  6. 根据权利要求1-4任一所述的方法,其特征在于,所述根据所述内存地址确定所述内存错误的错误类型,包括:
    在所述内存地址属于所述虚拟机对应的内存地址范围的情况下,确定是否能够将所述内存错误注入到所述虚拟机;
    若成功将所述内存错误注入到所述虚拟机,则确定所述内存错误的错误类型为不会导致虚拟机崩溃的非崩溃错误,若未成功将所述内存错误注入到 所述虚拟机,则确定所述内存错误的错误类型为会导致虚拟机崩溃的崩溃错误。
  7. 根据权利要求1-4任一所述的方法,其特征在于,所述方法还包括:
    通过云服务器的操作系统内核向虚拟机监视器发送内存错误通知;
    当所述虚拟机监视器接收到所述内存错误通知时,确定监测到内存错误。
  8. 一种云服务控制装置,其特征在于,所述装置包括:
    第一确定模块,用于当监测到内存错误时,确定发生所述内存错误的内存地址,并根据所述内存地址确定所述内存错误的错误类型,所述错误类型用于标识所述内存错误是否会导致虚拟机崩溃;
    第二确定模块,用于确定监测到的内存错误的总错误次数;
    第三确定模块,用于根据所述内存错误的错误类型和所述总错误次数,控制云调度器从调度服务库中调度对应的调度服务,所述调度服务库中存储有第一调度服务和第二调度服务,所述第一调度服务用于控制在虚拟机所属的原宿主机上重启所述虚拟机,所述第二调度服务用于控制将所述虚拟机从所属的原宿主机上迁移至另一宿主机上。
  9. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理装置执行时实现权利要求1-7中任一项所述方法的步骤。
  10. 一种电子设备,其特征在于,包括:
    存储装置,其上存储有计算机程序;
    处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-7中任一项所述方法的步骤。
PCT/CN2022/103612 2021-08-19 2022-07-04 云服务器控制方法、装置、存储介质及电子设备 Ceased WO2023020141A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110957018.0A CN115904642A (zh) 2021-08-19 2021-08-19 云服务器控制方法、装置、存储介质及电子设备
CN202110957018.0 2021-08-19

Publications (1)

Publication Number Publication Date
WO2023020141A1 true WO2023020141A1 (zh) 2023-02-23

Family

ID=85240020

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/103612 Ceased WO2023020141A1 (zh) 2021-08-19 2022-07-04 云服务器控制方法、装置、存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN115904642A (zh)
WO (1) WO2023020141A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335214A (zh) * 2015-11-12 2016-02-17 国云科技股份有限公司 一种虚拟机故障检测和恢复的方法
CN106354543A (zh) * 2016-08-11 2017-01-25 上海交通大学 一种基于虚拟机和宿主机内存地址转换的numa内存迁页方法
CN109343931A (zh) * 2018-09-12 2019-02-15 西安交通大学 一种在IaaS环境中面向负载均衡的应用感知虚拟机调度方法
CN111625387A (zh) * 2020-05-27 2020-09-04 北京金山云网络技术有限公司 内存错误处理方法、装置及服务器
US20210216404A1 (en) * 2020-01-15 2021-07-15 Tiny Labs, Inc. Virtual memory management

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100343828C (zh) * 2004-03-24 2007-10-17 华为技术有限公司 一种内存分配方法
US10108550B2 (en) * 2016-09-22 2018-10-23 Google Llc Memory management supporting huge pages
CN106844010A (zh) * 2017-01-20 2017-06-13 深信服科技股份有限公司 动态内存大页调度处理方法及装置
CN111708653B (zh) * 2020-05-29 2023-08-08 北京百度网讯科技有限公司 内存故障处理方法、装置、电子设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335214A (zh) * 2015-11-12 2016-02-17 国云科技股份有限公司 一种虚拟机故障检测和恢复的方法
CN106354543A (zh) * 2016-08-11 2017-01-25 上海交通大学 一种基于虚拟机和宿主机内存地址转换的numa内存迁页方法
CN109343931A (zh) * 2018-09-12 2019-02-15 西安交通大学 一种在IaaS环境中面向负载均衡的应用感知虚拟机调度方法
US20210216404A1 (en) * 2020-01-15 2021-07-15 Tiny Labs, Inc. Virtual memory management
CN111625387A (zh) * 2020-05-27 2020-09-04 北京金山云网络技术有限公司 内存错误处理方法、装置及服务器

Also Published As

Publication number Publication date
CN115904642A (zh) 2023-04-04

Similar Documents

Publication Publication Date Title
US9098609B2 (en) Health monitoring of applications in a guest partition
CN108469986B (zh) 一种数据迁移方法及装置
US9442791B2 (en) Building an intelligent, scalable system dump facility
US10860353B1 (en) Migrating virtual machines between oversubscribed and undersubscribed compute devices
US10216517B2 (en) Clearing specified blocks of main storage
US8595192B1 (en) Systems and methods for providing high availability to instance-bound databases
US9003139B1 (en) Systems and methods for recovering virtual machines after disaster scenarios
CN117093335A (zh) 分布式存储系统的任务调度方法及装置
US20230137436A1 (en) Data privacy preservation in object storage
CN116501529A (zh) 故障处理方法、装置、存储介质及电子设备
US9817585B1 (en) Data retrieval system and method
US11645164B2 (en) Adjusting data backups based on system details
WO2023020141A1 (zh) 云服务器控制方法、装置、存储介质及电子设备
US8984336B1 (en) Systems and methods for performing first failure data captures
CN112532747B (zh) 用于输出信息的方法、装置、设备以及存储介质
CN116244004A (zh) 资源管理方法、装置、介质和电子设备
CN115408230A (zh) 应用程序管理装置、方法、车辆及存储介质
CN110602162B (zh) 终端取证方法、装置、设备和存储介质
CN109213569B (zh) 一种基于虚拟机的审计方法、装置、服务器及存储介质
US20250217177A1 (en) System and method for correlating virtual machine interruptions and node characteristics
CN114356067B (zh) 数据存储方法、装置和电子设备
CN120406826B (zh) 数据管理方法及相关设备
US11366605B2 (en) Storage management system and method for storage migration services
US10185517B2 (en) Limiting the execution of background management operations in a drive array
CN119557045A (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: 22857454

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 12/06/2024)

122 Ep: pct application non-entry in european phase

Ref document number: 22857454

Country of ref document: EP

Kind code of ref document: A1