A method and device for allocating vnc resources in a supercomputer cluster

By rationally allocating VNC resources in the supercomputing cluster, the problem of poor graphics display and crash caused by too many VNC services started on display nodes is solved, and efficient utilization of VNC resources and high-quality display of applications are achieved.

CN119835268BActive Publication Date: 2025-10-14CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411746308.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-10-14
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In supercomputing clusters, existing VNC resource allocation methods do not consider the number of VNC services that can be started by display nodes, resulting in poor graphics display effects and display node crashes.

Method used

By controlling the node splicing job script, the computing resources of the computing nodes and the VNC resource data of the display nodes are compared with the preset scheduling conditions, and VNC resources are reasonably allocated, including starting and stopping VNC services, to avoid resource waste and node crashes.

Benefits of technology

It achieves the reasonable allocation of VNC resources within the supercomputing cluster, improves the graphic display effect of the application, and avoids poor display effect and node crash caused by excessive resource usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835268B_ABST
    Figure CN119835268B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of supercomputer clusters, and discloses a method and device for allocating vnc resources in a supercomputer cluster, which comprises the following steps: a control node splices a job script to obtain a job script file, and compares the vnc resource data of a display node and the computing resource of a computing node with preset scheduling conditions; if the vnc resource data and the computing resource meet the preset scheduling conditions, the job script file is sent to the computing node; the computing node executes the job script file to start a vnc service; after the execution of the job script file is completed, the computing node acquires and executes a user application program; the control node calls a job state in the computing node, sends a vnc service stop request to the display node based on the job state, and controls the display node to stop the vnc service. The application realizes the reasonable allocation of the vnc resources in the supercomputer cluster, solves the node collapse caused by the unreasonable allocation of the vnc resources, and improves the graphic display effect of the application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of supercomputing clusters, and in particular to a method and device for allocating VNC resources within a supercomputing cluster. Background Art

[0002] VNC (virtual network computing) is a remote desktop sharing technology used to remotely access and control computers in a supercomputing cluster. VNC resource allocation plays an important role in improving system performance, ensuring user experience, enhancing system security, and facilitating system management and maintenance.

[0003] The VNC resource allocation method within a related supercomputing cluster fails to consider the number of VNC services that a display node can start when allocating resources. This causes too many VNC services to be started on a display node, resulting in poor graphics display and display node crashes. Summary of the Invention

[0004] In view of this, the present invention provides a VNC resource allocation method within a supercomputing cluster to solve the problem that the related VNC resource allocation method within a supercomputing cluster does not consider the number of VNC services that can be started by a display node when allocating resources, causing the display node to start too many VNC services, thereby resulting in poor graphics display effects and display node crashes.

[0005] In a first aspect, the present invention provides a method for allocating VNC resources within a supercomputing cluster, wherein the supercomputing cluster includes computing nodes, control nodes, and display nodes, and the computing nodes, control nodes, and display nodes are interconnected; the method includes:

[0006] The control node assembles the job scripts to obtain a job script file, and compares the computing resources of the computing node and the VNC resource data of the display node with the preset scheduling conditions. If the VNC resource data and computing resources meet the preset scheduling conditions, the job script file is sent to the computing node;

[0007] The computing node executes the job script file, and the display node uses the job script file to start the VNC service;

[0008] When the job script file is executed, the computing node obtains and executes the user application;

[0009] The control node retrieves the job status from the computing node and sends a VNC service stop request to the display node based on the job status.

[0010] The display node receives the VNC service stop request and stops the VNC service based on the VNC service stop request.

[0011] The VNC resource allocation method in the supercomputing cluster provided by this embodiment obtains a job script file by splicing the job scripts by the control node, and compares the computing resources of the computing node and the VNC resource data of the display node with the preset scheduling conditions. If the VNC resource data meets the preset scheduling conditions, the job script file is sent to the computing node; when submitting a job, reasonable application of job resources is achieved by uniformly allocating VNC resources, avoiding the problem of poor VNC display effect caused by excessive resource occupation and avoiding deadlock or node crash caused by loop waiting; the computing node executes the job script file, and the display node uses the job script file to start VNC. nc service; further, when the job script file is executed, the computing node obtains and executes the user application; the control node calls the job status in the computing node, and sends a VNC service stop request to the display node based on the job status; the display node receives the VNC service stop request and stops the VNC service based on the VNC service stop request; the unused VNC service is closed in time to avoid wasting system resources; finally, the VNC resource allocation result in the supercomputing cluster is obtained, the reasonable allocation of VNC resources in the supercomputing cluster is realized, the node crash problem caused by unreasonable VNC resource allocation is solved, and the graphic display effect of the application is improved.

[0012] In an optional embodiment, the control node includes a manager service and a slurmctld service; the control node splices the job script to obtain a job script file, and compares the computing resources of the computing node and the VNC resource data of the display node with preset scheduling conditions. If the VNC resource data and the computing resources meet the preset scheduling conditions, the control node sends the job script file to the computing node, including:

[0013] The manager service assembles the job scripts, obtains the job script file, and sends the job script file to the slurmctld service;

[0014] The slurmctld service adds the job script file to the waiting queue and assigns a job identifier to the job script file;

[0015] The slurmctld service determines whether the computing resources of the computing node meet the job requirements and displays whether the node has VNC resources;

[0016] When the computing resources of the computing node meet the job requirements and the display node has VNC resources, the slurmctld service dispatches the job script file in the waiting queue to the computing node.

[0017] The present embodiment provides a method for allocating VNC resources within a supercomputing cluster. The method comprises the following steps: splicing job scripts through a manager service to obtain a job script file, and sending the job script file to a slurmctld service. The slurmctld service adds the job script file to a waiting queue and allocates a job identifier to the job script file. The slurmctld service determines whether the computing resources of a computing node meet the job requirements and whether VNC resources exist on the display node. When the computing resources of the computing node meet the job requirements and VNC resources exist on the display node, the slurmctld service dispatches the job script file in the waiting queue to the computing node. When the job script file is dispatched to the computing node, reasonable application of job resources is achieved by uniformly allocating VNC resources, thereby avoiding the problem of poor VNC display effect caused by excessive resource occupation and circumventing deadlock or node crash caused by loop waiting.

[0018] In an optional implementation, the computing node executes the job script file, and the display node uses the job script file to start the VNC service, including:

[0019] The computing node sends a request instruction to the manager service;

[0020] The computing node receives the vnc node information sent by the manager service and sends the vnc node information to the display node; wherein the vnc node information is the information retrieved by the manager service according to the request instruction;

[0021] Display the node connected to the vnc node information and start the vnc service based on the vnc node information;

[0022] The display node obtains the vnc service information during the execution of the vnc service and sends the vnc service information to the manager service through the computing node; wherein the manager service stores the vnc service information in the job data and updates the vnc resources of the display node.

[0023] The method for allocating vnc resources in the supercomputing cluster provided in the embodiment comprises the following steps: a computing node sends a request instruction to a manager service; the computing node receives vnc node information sent by the manager service and sends the vnc node information to a display node; wherein the vnc node information is information called by the manager service according to the request instruction; the manager service selects a display node for starting a vnc service through a scheduling algorithm, so as to avoid starting the vnc service on a few display nodes, improve the reliability of the vnc service, and improve the running efficiency of the display node; the display node receives the vnc node information and starts the vnc service based on the vnc node information; the display node obtains vnc service information in the execution process of the vnc service and sends the vnc service information to the manager service through the computing node; wherein the manager service stores the vnc service information into job data and updates the vnc resources of the display node, so as to realize the starting of the vnc service in the display node and lay a foundation for the graphic display of a user application program.

[0024] In an optional implementation, the control node calls the job state in the computing node, sends a vnc service stop request to the display node based on the job state, and the method comprises the following steps:

[0025] The control node calls the job state in the computing node, and when the job state is a job end state, a job cancellation state, or a job failure state, a vnc service stop request is sent to the display node corresponding to the job state.

[0026] The method for allocating vnc resources in the supercomputing cluster provided in the embodiment comprises the following steps: the control node calls the job state in the computing node, and when the job state is a job end state, a job cancellation state, or a job failure state, a vnc service stop request is sent to the display node corresponding to the job state; the vnc resources in the supercomputing cluster are recycled, invalid vnc resource occupation is cleaned up, and the utilization rate of the vnc resources is improved.

[0027] In an optional implementation, after the control node splices a job script to obtain a job script file and compares the computing resources of the computing node and the vnc resource data of the display node with preset scheduling conditions, if the vnc resource data and the computing resources meet the preset scheduling conditions, the method further comprises the following steps:

[0028] Obtaining hardware configuration data of the display node, calculating the number of vnc services to be started corresponding to the display node according to the hardware configuration data of the display node, and configuring vnc resources for the computing node and the control node based on the number of vnc services to be started.

[0029] The method for allocating vnc resources in the supercomputing cluster provided in the embodiment comprises the following steps: obtaining hardware configuration data of a display node, calculating the number of vnc services corresponding to the display node according to the hardware configuration data of the display node, and configuring vnc resources for the computing node and the control node based on the number of vnc services, so that the check before the allocation of the vnc resources is realized, and the foundation for the control node to schedule jobs is laid.

[0030] In an alternative embodiment, the method further comprises:

[0031] When the display node stops the vnc service, the computing node obtains the current available vnc number, and adds one to the current available vnc number.

[0032] The method for allocating vnc resources in the supercomputing cluster provided in the embodiment comprises the following steps: obtaining hardware configuration data of a display node, calculating the number of vnc services corresponding to the display node according to the hardware configuration data of the display node, and configuring vnc resources for the computing node and the control node based on the number of vnc services, so that the check before the allocation of the vnc resources is realized, and the foundation for the control node to schedule jobs is laid.

[0033] In a second aspect, the present application provides a device for allocating vnc resources in a supercomputing cluster, which comprises a supercomputing cluster, the supercomputing cluster comprising a computing node, a control node and a display node, the computing node, the control node and the display node being connected to each other.

[0034] The control node is configured to splice a job script to obtain a job script file, and compare the computing resource of the computing node and the vnc resource data of the display node with a preset scheduling condition, and if the vnc resource data and the computing resource meet the preset scheduling condition, send the job script file to the computing node.

[0035] The computing node is configured to execute the job script file.

[0036] The display node is configured to start a vnc service by using the job script file.

[0037] The computing node is configured to obtain and execute a user application program after the execution of the job script file is completed.

[0038] The control node is configured to call a job state in the computing node, and send a vnc service stop request to the display node based on the job state.

[0039] The display node is configured to receive the vnc service stop request, and stop the vnc service based on the vnc service stop request.

[0040] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to thereby execute the VNC resource allocation method within a supercomputing cluster according to the first aspect or any corresponding embodiment thereof.

[0041] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for allocating VNC resources within a supercomputing cluster according to the first aspect or any corresponding embodiment thereof.

[0042] In a fifth aspect, the present invention provides a computer program product comprising computer instructions, the computer instructions being used to enable a computer to execute the method for allocating VNC resources within a supercomputing cluster according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 is a structural block diagram of a VNC resource allocation device within a supercomputing cluster according to an embodiment of the present invention;

[0045] Figure 2 This is a flow chart of a method for allocating VNC resources within a supercomputing cluster according to an embodiment of the present invention;

[0046] Figure 3 1 is a flow chart of another method for allocating VNC resources within a supercomputing cluster according to an embodiment of the present invention;

[0047] Figure 4 1 is a flow chart of another method for allocating VNC resources within a supercomputing cluster according to an embodiment of the present invention;

[0048] Figure 5 This is a flow chart of a method for allocating VNC resources within a supercomputing cluster according to an embodiment of the present invention.

[0049] Figure 6 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0051] Supercomputing refers to the use of aggregated computing power to handle data-intensive computing jobs that cannot be completed by standard workstations, including simulation, modeling, and rendering. Data-intensive jobs require a large amount of calculations, and a general-purpose computer cannot complete the work within a reasonable time, or the job cannot be executed due to the large amount of data required and limited available resources. Supercomputing can effectively overcome time and resource limitations by integrating the computing power of multiple units.

[0052] Slurm (Simple Linux Utility for Resource Management) is an open-source cluster resource management and job scheduling system widely used on supercomputers. Slurm manages multiple resources, including CPUs (Central Processing Units), GPUs (Graphics Processing Units), memory, and bandwidth, allocating resources to jobs based on their needs.

[0053] VNC is a remote desktop sharing technology used to remotely access and control computers. It does this by transmitting the remote computer's screen to the local computer and simultaneously transmitting input to the remote computer. The remote computer screen can be viewed through a VNC viewer on the local computer, enabling remote control and viewing.

[0054] When submitting a job using a supercomputing cluster, you need to write a job script to specify the CPU (central processing unit), GPU (graphic processing unit), memory and other resources required by the job. At the same time, you also need to configure environment variables and set the application that the user wants to run. Taking the cluster with the Slurm scheduler installed as an example, after completing the job script writing, the user can submit the job script file to the Slurm queue. If the cluster's idle resources meet the job requirements, Slurm will allocate resources to the job and start executing the job. If the cluster's idle resources cannot temporarily meet the job requirements, Slurm will schedule the job to the waiting queue until the cluster's idle resources meet the job requirements.

[0055] There are two application scenarios for the graphical display of jobs in a supercomputing cluster:

[0056] The first application scenario is before or after the submission of a job. Before the submission of a job, the user can adjust the parameters of the job and process the input files through a visual method. After the execution of a job, the user can view the execution results of the job through a visual method. In this application scenario, the running of a job and the graphical display of an application program are separate and independent. Before submitting a job, the cluster starts a vnc service, and the user connects the vnc of the cluster through a vnc client. The user can preprocess the input data of the job and save the preprocessing results. After completing the preprocessing, the user closes the vnc service and submits the job to slurm, wherein the input of the job is the saved preprocessing results. After submitting the job, the user waits for the job to be scheduled and executed, and at the same time, the graphical interface is not displayed during the execution of the job.

[0057] In the second application scenario, the supercomputing cluster performs simulation calculation while realizing graphical display. In this application scenario, the running process of a job includes starting a vnc service, performing simulation calculation, and closing the vnc service. Taking an industrial simulation job as an example, the specific process is as follows: first, start a vnc service before starting the simulation calculation program; then, use the vnc service to display the graphical interface of the simulation calculation program, and the user can view the graphical interface in real time through a vnc client; finally, close the vnc service when the simulation calculation program ends.

[0058] For the second scenario, the related vnc resource allocation method in a supercomputing cluster realizes the graphical display of an application program by modifying a job script file. Before running a user application program, a vnc service is started. When slurm executes a job, it first starts a vnc service on a display node, then runs the user's application program on a computing node, and outputs the graphical display of the application program to the vnc service. Finally, the user can operate and view the application program locally through a vnc client. The related vnc resource allocation method in a supercomputing cluster schedules the CPU, GPU, and memory of the computing node as resources required by the job, and executes the job when the required resources meet the conditions. However, starting a vnc service on a display node requires GPU and memory resources, so the number of display nodes that can start a vnc service is limited.

[0059] However, slrum or other supercomputing schedulers do not consider the number of display nodes that can start a vnc service when allocating resources, resulting in too many vnc services being started, which leads to poor display effect of application program graphics and display node crashes.

[0060] To solve the above technical problems, the embodiment of the present application provides a vnc resource allocation method in a supercomputing cluster, as shown in the figure Figure 1 The supercomputing cluster includes a computing node 101, a control node 102 and a display node 103, and the computing node 101, the control node 102 and the display node 103 are connected to each other; the control node 102 includes a manager service and a slurmctld service; the computing node includes a slurmd service; and the display node includes an agent service and a vnc server service.

[0061] The supercomputing cluster is a cluster composed of multiple computers, which is composed of one control node 102, multiple computing nodes 101 and multiple display nodes 103, and the control node 102 is responsible for managing the cluster; the computing node 101 is responsible for running an application program, and the display node 103 is responsible for graphical display of the application program; the slurmd is an execution service of slurm, which is responsible for executing a job; the slurmctld service is a scheduling service of slurm, which is responsible for managing CPU, GPU and memory resources of the cluster and allocating resources for the job; the manager service is responsible for managing vnc resources, submitting a job and monitoring a job state; the agent service is responsible for executing a command issued by the manager service; and the vnc server service is responsible for starting a vnc service.

[0062] According to the embodiment of the present application, a vnc resource allocation method in a supercomputing cluster is provided, and it should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0063] In the embodiment, a vnc resource allocation method in a supercomputing cluster is provided, which can be used in the supercomputing cluster, Figure 2 The flowchart of the vnc resource allocation method in the supercomputing cluster according to the embodiment of the present application is shown in the figure Figure 2 The flowchart includes the following steps:

[0064] In step S201, the control node splices a job script to obtain a job script file, and compares computing resources of the computing node and vnc resource data of the display node with preset scheduling conditions, and if the vnc resource data and the computing resources meet the preset scheduling conditions, the job script file is sent to the computing node.

[0065] Specifically, the vnc service is abstracted as a system resource for management and allocation, so that the vnc service can be a system resource that can be uniformly managed in the supercomputing cluster, and is associated with CPU and other resources to a certain extent.

[0066] Furthermore, hardware configuration data of the display node is obtained, the number of VNC service startups corresponding to the display node is calculated according to the hardware configuration data of the display node, and VNC resources are configured for the computing node and the control node based on the number of VNC service startups.

[0067] Furthermore, before the supercomputing cluster is running, VNC resources are manually configured through slurm. According to the hardware configuration of the display nodes, the total number of VNC services that can be started by all display nodes is calculated, and the total number of VNC services that can be started is written into the configuration file of the slurmd service and the slurmd service is started; the IP address of the display node and the number of VNC services that can be started by each display node are recorded in the manager service.

[0068] Step S202: The computing node executes the job script file, and the display node starts the VNC service using the job script file.

[0069] Step S203: After the job script file is executed, the computing node obtains and executes the user application program.

[0070] Step S204: The control node retrieves the job status in the computing node, and sends a VNC service stop request to the display node based on the job status.

[0071] Specifically, the control node retrieves the job status in the computing node, and when the job status is the job end state, the job cancellation state, or the job failure state, a VNC service stop request is sent to the display node corresponding to the job status.

[0072] Specifically, the manager service calls the slurm interface to check the job status; when the job status is ended, canceled or failed, the manager node sends a request to stop VNC to the agent service of the display node corresponding to the job.

[0073] Furthermore, the manager service polls and checks the job status, reclaims relevant resources for jobs with a status of "ended, canceled, or failed", and promptly shuts down the unused VNC service.

[0074] Step S205: The display node receives the VNC service stop request and stops the VNC service based on the VNC service stop request.

[0075] Specifically, after the display node stops the VNC service, the computing node obtains the current available VNC number and increases the current available VNC number by one.

[0076] Furthermore, after the display node stops the VNC service, the manager service updates the data related to the display node and sends a request to stop the VNC to the agent service operating the corresponding display node; the agent service stops the corresponding VNC service.

[0077] The method for allocating vnc resources in a supercomputing cluster provided by this embodiment obtains a job script file by splicing job scripts at the control node, and compares the computing resources of the computing node and the vnc resource data of the display node with the preset scheduling conditions. If the vnc resource data and the computing resources meet the preset scheduling conditions, the job script file is sent to the computing node; when submitting a job, reasonable application of job resources is achieved by uniformly allocating vnc resources, thereby avoiding the problem of poor vnc display effect caused by excessive resource occupation and circumventing deadlock or node crash caused by loop waiting; the computing node executes the job script file, and the display node uses the job script file to start The invention starts the VNC service; further, when the job script file is executed, the computing node obtains and executes the user application; the control node calls the job status in the computing node and sends a VNC service stop request to the display node based on the job status; the display node receives the VNC service stop request and stops the VNC service based on the VNC service stop request; the VNC service that is no longer in use is closed in time to avoid wasting system resources; finally, the VNC resource allocation result within the supercomputing cluster is obtained, the reasonable allocation of VNC resources within the supercomputing cluster is realized, the node crash problem caused by unreasonable VNC resource allocation is solved, and the graphic display effect of the application is improved.

[0078] In this embodiment, a method for allocating VNC resources in a supercomputing cluster is provided, which can be used in the above-mentioned supercomputing cluster. Figure 3 Flowchart of a method for allocating vnc resources within a supercomputing cluster according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0079] In step S301, the control node assembles the job script to obtain a job script file, and compares the computing resources of the computing node and the VNC resource data of the display node with the preset scheduling conditions. If the VNC resource data and computing resources meet the preset scheduling conditions, the job script file is sent to the computing node.

[0080] Specifically, the above step S301 includes:

[0081] In step S3011, the manager service assembles the job scripts to obtain a job script file, and sends the job script file to the slurmctld service.

[0082] Specifically, the manager service splices a job script, and before the command for starting the user application in the job script, adds the relevant command for starting the vnc.

[0083] In step S3012, the slurmctld service adds the job script file into the waiting queue and assigns a job identification to the job script file.

[0084] Specifically, the manager service submits the job script file to the slurmctld service, the slurmctld service puts the job into the waiting queue, assigns a job id to the job, and sends the job related information to the manager service.

[0085] In step S3013, the slurmctld service judges whether the computing resources of the computing node meet the job requirements and whether the display node has vnc resources.

[0086] In step S3014, when the computing resources of the computing node meet the job requirements and the display node has vnc resources, the slurmctld service schedules the job script file in the waiting queue to the computing node.

[0087] Specifically, the slurmctld service checks whether the resources of the computing node meet the requirements of the job and whether the display node has vnc resources; when both conditions are met, the slurmctld service takes the job in the job script from the waiting queue, schedules it to the computing node, allocates resources such as CPU and memory to the job, and reduces the number of currently available vncs by 1.

[0088] In step S302, the computing node executes the job script file, and the display node starts the vnc service by using the job script file. For details, refer to Figure 2 The step S202 of the embodiment shown in the figure will not be repeated here.

[0089] In step S303, when the execution of the job script file is completed, the computing node acquires and executes the user application. For details, refer to Figure 2 The step S203 of the embodiment shown in the figure will not be repeated here.

[0090] In step S304, the control node calls the job state in the computing node and sends a vnc service stop request to the display node based on the job state. For details, refer to Figure 2 The step S204 of the embodiment shown in the figure will not be repeated here.

[0091] In step S305, the display node receives the vnc service stop request and stops the vnc service based on the vnc service stop request. For details, refer to Figure 2 The step S205 of the embodiment shown in the figure will not be repeated here.

[0092] The present embodiment provides a method for allocating VNC resources within a supercomputing cluster. The method comprises the following steps: splicing job scripts through a manager service to obtain a job script file, and sending the job script file to a slurmctld service. The slurmctld service adds the job script file to a waiting queue and allocates a job identifier to the job script file. The slurmctld service determines whether the computing resources of a computing node meet the job requirements and whether VNC resources exist on the display node. When the computing resources of the computing node meet the job requirements and VNC resources exist on the display node, the slurmctld service dispatches the job script file in the waiting queue to the computing node. When the job script file is dispatched to the computing node, reasonable application of job resources is achieved by uniformly allocating VNC resources, thereby avoiding the problem of poor VNC display effect caused by excessive resource occupation and circumventing deadlock or node crash caused by loop waiting.

[0093] In this embodiment, a method for allocating VNC resources in a supercomputing cluster is provided, which can be used for the above-mentioned electronic devices. Figure 4 Flowchart of a method for allocating vnc resources within a supercomputing cluster according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0094] Step S401: The control node assembles the job scripts to obtain a job script file, and compares the computing resources of the computing node and the VNC resource data of the display node with the preset scheduling conditions. If the VNC resource data and computing resources meet the preset scheduling conditions, the job script file is sent to the computing node. Figure 3 Step S301 of the illustrated embodiment will not be described in detail here.

[0095] Step S402: The computing node executes the job script file, and the display node starts the VNC service using the job script file.

[0096] Specifically, the above step S402 includes:

[0097] Step S4021: The computing node sends a request instruction to the manager service.

[0098] Specifically, the slurmd service of the computing node executes the job script file and executes the commands in the script file in sequence.

[0099] In step S4022, the computing node receives the vnc node information sent by the manager service, and sends the vnc node information to the display node; wherein the vnc node information is information retrieved by the manager service according to the request instruction.

[0100] Specifically, when the computing node executes the commands in the script file, the job script sends a request to the manager service to obtain the information of the display node used to start VNC; wherein, the manager service selects the display node used to start VNC through the scheduling algorithm and sends the VNC node information to the job script file in the computing node.

[0101] Furthermore, a load balancing algorithm is configured in the manager service, which is based on a weighted dynamic round-robin mechanism to make the load of multiple display nodes more evenly distributed and avoid the VNC service being started on a small number of display nodes.

[0102] Step S4023: Display the node connection VNC node information and start the VNC service based on the VNC node information.

[0103] Specifically, the job script file generates a vnc password on the display node and starts the vnc service; the job script configures the environment variable value on the computing node to be "DISPLAY (variable value)".

[0104] In step S4024, the display node obtains VNC service information during the execution of the VNC service, and sends the VNC service information to the manager service through the computing node; wherein the manager service stores the VNC service information in the job data and updates the VNC resources of the display node.

[0105] Specifically, the display node sends VNC service information such as the VNC password and port to the manager service; the manager service stores the VNC service information in the job data and updates the VNC resources of the display node.

[0106] Step S403: After the job script file is executed, the computing node obtains and executes the user application.

[0107] Specifically, after updating the VNC resources of the display node, the computing node obtains and executes the user application; the graphics of the user application will be displayed in the VNC. The user obtains VNC's IP, port, password and other information through the manager service, uses the VNC client to connect to the VNC, and can operate and view the application.

[0108] Step S404: The control node retrieves the job status from the computing node and sends a VNC service stop request to the display node based on the job status. Figure 3 Step S304 of the illustrated embodiment will not be described in detail here.

[0109] Step S405: The display node receives the vnc service stop request and stops the vnc service based on the vnc service stop request. Figure 3Step S305 of the illustrated embodiment will not be described in detail here.

[0110] The present embodiment provides a method for allocating VNC resources within a supercomputing cluster. The computing node sends a request instruction to the manager service. The computing node receives the VNC node information sent by the manager service and sends the VNC node information to the display node. The VNC node information is information retrieved by the manager service according to the request instruction. The manager service selects a display node for starting VNC through a scheduling algorithm to avoid starting the VNC service on a small number of display nodes, thereby improving the reliability of the VNC service and the operating efficiency of the display node. The display node receives the VNC node information and starts the VNC service based on the VNC node information. The display node obtains VNC service information during the execution of the VNC service and sends the VNC service information to the manager service through the computing node. The manager service stores the VNC service information in the job data and updates the VNC resources of the display node, thereby starting the VNC service in the display node and laying the foundation for the graphical display of the user application.

[0111] The following describes a method for allocating VNC resources within a supercomputing cluster using a specific embodiment.

[0112] Example 1:

[0113] like Figure 6 As shown, the specific steps of the VNC resource allocation method within the supercomputing cluster include:

[0114] (1) Initialize the control node, computing node, and display node: manually configure VNC resources; calculate the total number of VNC services that can be started by all display nodes based on the hardware configuration of the display nodes, write the total number of VNC services that can be started into the slurm configuration file, and start slurm; record the IP address of the display node, the number of VNC services that can be started by each node, and other information into the manager service.

[0115] (2) The manager service splices the job script and adds the command to start VNC before the command to start the user application in the job script.

[0116] (3) The manager service submits the job script file to the slurmctld service. The slurmctld service puts the job into the waiting queue, assigns a job ID to the job, and sends job-related information to the manager service.

[0117] (4) The slurmctld service checks whether the resources of the computing node meet the needs of the job, and checks whether the display node has vnc resources; when both conditions are met, the slurmctld service takes the job out of the waiting queue, schedules it to the computing node, allocates resources such as CPU and memory to the job, and reduces the number of currently available vncs by 1.

[0118] (5) The slurmd service in the computing node executes the job script file and executes the commands in the script file in sequence.

[0119] (6) The job script in the computing node sends a request to the manager service to obtain the VNC node information; the manager service selects the display node for starting VNC through the scheduling algorithm and sends the VNC node information to the job script file in the computing node.

[0120] (7) The job script file in the computing node generates a VNC password on the display node and starts the VNC service; sets the computing node configuration environment variable value to "DISPLAY"; and then sends the VNC password and port information to the manager service.

[0121] (8) The manager service stores the vnc service information in the job data and updates the vnc resources of the display node.

[0122] (9) After updating the VNC resources of the display node, the job script file in the computing node executes the user application; the graphics of the user application will be displayed in the VNC. The user obtains the VNC's IP, port, password and other information through the manager service, uses the VNC client to connect to the VNC, and can operate and view the application.

[0123] (10) The manager service calls the slurm interface to check the job status; when the job status is ended, canceled or failed, the manager node sends a request to stop VNC to the agent service of the display node corresponding to the job.

[0124] (11) The agent service stops the corresponding vnc service.

[0125] (12) The manager service updates and displays the data related to the node.

[0126] (13) slurm increases the number of currently available vncs by 1.

[0127] The embodiment also provides a vnc resource allocation device in a supercomputing cluster, which is used for implementing the above-mentioned embodiment and preferred implementation, and details are not repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiment is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0128] The embodiment provides a vnc resource allocation device in a supercomputing cluster, which comprises a supercomputing cluster, a control node, a computing node and a display node. Figure 1 As shown in the figure, the supercomputing cluster comprises a computing node 101, a control node 102 and a display node 103, which are connected to each other.

[0129] The control node 102 is configured to splice a job script to obtain a job script file, and compare the computing resource of the computing node and the vnc resource data of the display node with preset scheduling conditions, and if the vnc resource data and the computing resource meet the preset scheduling conditions, send the job script file to the computing node.

[0130] The computing node 101 is configured to execute the job script file.

[0131] The display node 103 is configured to start a vnc service by using the job script file.

[0132] The computing node 101 is configured to obtain and execute a user application after the execution of the job script file is completed.

[0133] The control node 102 is configured to call a job state in the computing node, and send a vnc service stop request to the display node based on the job state.

[0134] The display node 103 is configured to receive the vnc service stop request, and stop the vnc service based on the vnc service stop request.

[0135] Further function descriptions of the above-mentioned modules and units are the same as those of the corresponding embodiments, and are not repeated here.

[0136] The vnc resource allocation device in the supercomputing cluster in the embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.

[0137] The embodiment of the present application also provides a computer device with the above-mentioned Figure 1An intra-supercomputing cluster vnc resource allocation apparatus is shown.

[0138] Referring to Figure 5 , Figure 5 is a structural schematic diagram of a computer device provided by an optional embodiment of the present application, as Figure 5 shown, the computer device includes one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are communicatively connected by different buses, and can be installed on a common motherboard or in other manners as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories, if needed. Also, multiple computer devices can be connected, each providing part of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Figure 5 In the figure, a processor 10 is taken as an example.

[0139] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a generic array logic, or any combination thereof.

[0140] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.

[0141] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely arranged with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0142] The memory 20 can include a volatile memory, such as a random access memory, and / or can include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 can also include a combination of the above-mentioned types of memories.

[0143] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 can be connected by a bus or other means, Figure 5 The bus connection is taken as an example.

[0144] The input device 30 can receive inputted digital or character information and generate key signal inputs related to user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), etc. The display device includes, but is not limited to, a liquid crystal display, a light emitting diode, a display and a plasma display. In some alternative embodiments, the display device can be a touch screen.

[0145] The embodiments of the present application also provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded from a network and stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor or the hardware, the method shown in the above embodiments is implemented.

[0146] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0147] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for allocating VNC resources within a supercomputing cluster, characterized in that: The supercomputing cluster includes computing nodes, control nodes, and display nodes, which are interconnected. The method includes: The control node assembles the job scripts to obtain a job script file, compares the computing resources of the computing node and the VNC resource data of the display node with preset scheduling conditions, and sends the job script file to the computing node if the VNC resource data and computing resources meet the preset scheduling conditions; The computing node executes the job script file, and the display node starts the vnc service using the job script file; When the job script file is executed, the computing node obtains and executes the user application program; The control node retrieves the job status in the computing node, and sends a VNC service stop request to the display node based on the job status; The display node receives the VNC service stop request and stops the VNC service based on the VNC service stop request.

2. The method according to claim 1, characterized in that The control node includes a manager service and a slurmctld service; the control node splices the job script to obtain a job script file, compares the computing resources of the computing node and the VNC resource data of the display node with preset scheduling conditions, and sends the job script file to the computing node if the VNC resource data and computing resources meet the preset scheduling conditions, including: The manager service splices the job scripts to obtain the job script file, and sends the job script file to the slurmctld service; The slurmctld service adds the job script file to a waiting queue and allocates a job identifier to the job script file; The slurmctld service determines whether the computing resources of the computing node meet the job requirements and whether the display node has vnc resources; When the computing resources of the computing node meet the job requirements and the display node has VNC resources, the slurmctld service dispatches the job script file in the waiting queue to the computing node.

3. The method according to claim 1, characterized in that The computing node executes the job script file, and the display node starts the VNC service using the job script file, including: The computing node sends a request instruction to the manager service; The computing node receives the vnc node information sent by the manager service, and sends the vnc node information to the display node; wherein the vnc node information is information retrieved by the manager service according to the request instruction; The display node receives the vnc node information and starts the vnc service based on the vnc node information; The display node obtains VNC service information during the execution of the VNC service, and sends the VNC service information to the manager service through the computing node; wherein the manager service stores the VNC service information in the job data and updates the VNC resources of the display node.

4. The method according to claim 1, wherein The control node retrieves the job status in the computing node, and sends a VNC service stop request to the display node based on the job status, including: The control node retrieves the job status in the computing node, and when the job status is a job end state, a job cancel state, or a job failure state, sends the VNC service stop request to the display node corresponding to the job status.

5. The method according to claim 1, wherein The control node assembles the job scripts to obtain a job script file, and compares the computing resources of the computing node and the VNC resource data of the display node with preset scheduling conditions. If the VNC resource data and the computing resources meet the preset scheduling conditions, before sending the job script file to the computing node, the method further includes: The hardware configuration data of the display node is obtained, the number of VNC service startups corresponding to the display node is calculated according to the hardware configuration data of the display node, and VNC resources are configured for the computing node and the control node based on the number of VNC service startups.

6. The method according to claim 1, characterized in that Also includes: After the display node stops the VNC service, the computing node obtains the current available VNC number and increases the current available VNC number by one.

7. A VNC resource allocation device within a supercomputing cluster, characterized in that: The device includes a supercomputing cluster, which includes computing nodes, control nodes, and display nodes, and the computing nodes, control nodes, and display nodes are interconnected; The control node is configured to assemble the job scripts to obtain a job script file, and compare the computing resources of the computing node and the VNC resource data of the display node with preset scheduling conditions, and send the job script file to the computing node if the VNC resource data and computing resources meet the preset scheduling conditions; The computing node is used to execute the job script file; The display node is used to start the vnc service using the job script file; The computing node is used to obtain and execute the user application after the job script file is executed; The control node is configured to retrieve the job status of the computing node and send a VNC service stop request to the display node based on the job status; The display node is configured to receive the VNC service stop request and stop the VNC service based on the VNC service stop request.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the VNC resource allocation method within a supercomputing cluster according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the VNC resource allocation method within a supercomputing cluster according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the VNC resource allocation method within a supercomputing cluster according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for managing and scheduling cluster MIS (Many Integrated Core) job

    CN102902589A

  • Event-based dynamic resource provisioning

    US20100269119A1