Method and apparatus for acquiring input / output information of a task

By using a distributed file system to monitor processes and task management processes in HPC computers, the I/O information of jobs can be accurately aggregated and stored, solving the problem of storage system overload in HPC computers and improving the accuracy and efficiency of information retrieval.

CN114201272BActive Publication Date: 2025-10-28HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010985364.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-18
Publication Date
2025-10-28
Estimated Expiration
2040-09-18

AI Technical Summary

Technical Problem

When existing HPC computers execute jobs that consume a large amount of storage system I/O resources, they cannot accurately obtain the job's I/O information, leading to storage system overload and delays in other job execution.

Method used

By running a distributed file system monitoring process and a task management process on the first node, I/O information of each process is obtained, and I/O information of the same job is aggregated according to preset environment variable information and stored in a storage file. The task management process deletes the storage file when the job terminates to ensure the accuracy and efficiency of the information.

Benefits of technology

It improves the accuracy and efficiency of job I/O information acquisition, avoids resource waste and redundant information collection, and ensures the continuity and reliability of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114201272B_ABST
    Figure CN114201272B_ABST
Patent Text Reader

Abstract

This application provides a method and apparatus for acquiring input / output information of a job. The method is applied to a first node, which runs a distributed file system monitoring process and a task management process. The method includes: calling the distributed file system monitoring process to acquire input / output (I / O) information of each process; acquiring I / O information of at least one job corresponding to each process based on the I / O information of each process; and storing the I / O information of at least one job in at least one storage file; calling at least one task management process to read the I / O information of the at least one job from the at least one storage file; and sending the I / O information of the at least one job to a second node. The at least one task management process corresponds one-to-one with at least one job. This application embodiment can accurately acquire the I / O information of a job.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method and apparatus for acquiring input / output information for a task. Background Technology

[0002] The primary purpose of High Performance Computing (HPC) services is to improve computing speed and capacity, achieving trillions of calculations per second. It can solve large-scale scientific problems and process massive amounts of data, such as weather forecasting, automotive simulation, military research, biopharmaceuticals, gene sequencing, and nuclear explosion simulation. Computers that can provide high-performance computing services are called "high-performance computers" or "HPC computers."

[0003] Currently, if an HPC computer is executing a job that consumes a large amount of input / output (I / O) resources from the storage system, other jobs on that HPC computer may not be able to obtain sufficient I / O resources and may fail to execute or experience significant delays. Therefore, HPC computers need to obtain I / O information from currently executing jobs to identify jobs consuming excessive I / O resources from the storage system and control their access to the storage system to prevent storage overload. However, the I / O information from currently executing jobs obtained by HPC computers is not accurate enough. Summary of the Invention

[0004] This application provides a method and apparatus for acquiring job input / output information, which can accurately acquire job I / O information.

[0005] In a first aspect, embodiments of this application provide a method for obtaining input / output information of a job. The method is applied to a first node, which runs a distributed file system monitoring process and a task management process. The method includes: calling the distributed file system monitoring process to obtain input / output I / O information of each process; obtaining I / O information of at least one job corresponding to each process based on the I / O information of each process; and storing the I / O information of the at least one job in at least one storage file; calling at least one task management process to read the I / O information of the at least one job from the at least one storage file; and sending the I / O information of the at least one job to a second node, wherein the at least one task management process corresponds one-to-one with the at least one job.

[0006] The I / O information may include at least one of the following: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

[0007] In this solution, the first node calls the distributed file system monitoring process to aggregate the I / O information of each process belonging to the same job, thus obtaining the job's I / O information. There is no need to call other processes to obtain the job's I / O information based on the I / O information of each process belonging to the same job. Since the accuracy of the distributed file system monitoring process aggregating the I / O information of each process belonging to the same job is higher than that of other processes aggregating the I / O information of each process belonging to the same job, this solution can improve the accuracy of the obtained job's I / O information.

[0008] In one possible implementation, the process is associated with preset environment variable information, which includes the identifier of the job corresponding to the process. Where jobs belonging to different clusters have the same identifier, the preset environment variable information may further include the identifier of the cluster to which the job corresponding to the process belongs.

[0009] In this scheme, when the process called by the compute node to obtain I / O information by the distributed file system monitoring process is a process associated with preset environment variable information, firstly, it ensures that the distributed file system monitoring process only collects I / O information from processes associated with preset environment variable information, avoiding the collection of redundant information and saving resources of the first node; secondly, it allows the distributed file system monitoring process to determine the corresponding job process based on the processes associated with the same preset environment variable information without needing to know the correspondence between jobs and processes. This enables the distributed file system monitoring process to obtain the I / O information of at least one job corresponding to each process based on the I / O information of each process, improving the efficiency of obtaining the I / O information of at least one job.

[0010] In one possible implementation, each of the at least one job corresponds to a storage file. In this scheme, when each job corresponds to a storage file, the lifecycle of the storage file can reflect the lifecycle of the job, allowing the distributed file system monitoring process to accurately determine when the job will terminate.

[0011] In one possible implementation, the method further includes: invoking a first storage file created by a first task management process within the at least one task management process. For example, invoking the first task management process to create the first storage file in a first directory. Optionally, a creation process also runs on the first node, and the method further includes: invoking the creation process to create the first directory according to a received first directory creation instruction.

[0012] In this scheme, at least one storage file is created by the task management process called by the first node. It will not disappear when the distributed file system monitoring process is abnormally shut down. Therefore, even if the distributed file system monitoring process is abnormally shut down and then restarted, the I / O information of at least one job obtained by the compute node before calling the distributed file system monitoring process will not be lost, thus ensuring the continuity and reliability of job I / O information acquisition.

[0013] In one possible implementation, the method further includes: when the first job in at least one job terminates, invoking the first task management process to read the I / O information in the first storage file that has not been read, and deleting the first storage file; the first storage file is used to store the I / O information of the first job; and invoking the distributed file system monitoring process to release the I / O information of each process corresponding to the first job stored in memory.

[0014] In other words, this solution deletes the first storage file after the first job terminates, allowing the distributed file system monitoring process to know that the first job has terminated and eliminating the need to continue collecting I / O information from the processes corresponding to the first job. Conversely, if the first storage file persists, it indicates that the processes corresponding to the first job are still running, and it is necessary to continue collecting I / O information from these processes. This method allows the distributed file system monitoring process to accurately determine when to stop collecting I / O information from the processes corresponding to a job, preventing the discarding of I / O information from processes that have been mistakenly identified as having terminated, thus further improving the accuracy of the obtained job I / O information.

[0015] Secondly, embodiments of this application provide a device for acquiring input / output information of a job. This device runs a distributed file system monitoring process and a task management process. The device includes: a processing module, configured to invoke the distributed file system monitoring process to acquire input / output I / O information of each process, acquire I / O information of at least one job corresponding to each process based on the I / O information of each process, and store the I / O information of the at least one job in at least one storage file; the processing module is further configured to invoke at least one task management process to read the I / O information of the at least one job from the at least one storage file; and a sending module, configured to send the I / O information of the at least one job to a second node, wherein the at least one task management process corresponds one-to-one with the at least one job.

[0016] In one possible implementation, the process is associated with preset environment variable information, which includes the identifier of the job corresponding to the process.

[0017] In one possible implementation, the preset environment variable information may also include the identifier of the cluster to which the job corresponding to the process belongs.

[0018] In one possible implementation, each of the at least one job corresponds to a storage file.

[0019] In one possible implementation, the processing module is further configured to: invoke a first task management process in the at least one task management process to create a first storage file in the at least one storage file.

[0020] In one possible implementation, the processing module is further configured to: when the first job in at least one job terminates, invoke the first task management process to read the I / O information in the first storage file that has not been read, and delete the first storage file; the first storage file is used to store the I / O information of the first job; and invoke the distributed file system monitoring process to release the I / O information of each process corresponding to the first job stored in memory.

[0021] In one possible implementation, the processing module is specifically used to: invoke the first task management process to create the first storage file in the first directory.

[0022] In one possible implementation, the device also runs a creation process, and the processing module is further configured to: invoke the creation process to create the first directory according to the received first directory creation instruction.

[0023] In one possible implementation, the I / O information includes at least one of the following: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

[0024] Thirdly, embodiments of this application provide an electronic device, including: a memory, a processor, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to perform the method as described in the first aspect or any possible implementation of the first aspect.

[0025] Fourthly, embodiments of this application provide a system for acquiring input / output information of a job, including: a first node and a second node;

[0026] The first node runs a distributed file system monitoring process and a task management process. The first node is used to: call the distributed file system monitoring process to obtain the input / output I / O information of each process, obtain the I / O information of at least one job corresponding to each process based on the I / O information of each process, and store the I / O information of the at least one job in at least one storage file; the first node is also used to call at least one task management process to read the I / O information of the at least one job from the at least one storage file, and send the I / O information of the at least one job to the second node, wherein the at least one task management process corresponds one-to-one with the at least one job.

[0027] In one possible implementation, the process is associated with preset environment variable information, which includes the identifier of the job corresponding to the process.

[0028] In one possible implementation, the preset environment variable information may also include the identifier of the cluster to which the job corresponding to the process belongs.

[0029] In one possible implementation, each of the at least one job corresponds to a storage file.

[0030] In one possible implementation, the first node is further configured to: invoke a first task management process in the at least one task management process to create a first storage file in the at least one storage file.

[0031] In one possible implementation, the first node is further configured to: when the first job in at least one job terminates, invoke the first task management process to read the I / O information in the first storage file that has not been read, and delete the first storage file; the first storage file is used to store the I / O information of the first job; and invoke the distributed file system monitoring process to release the I / O information of each process corresponding to the first job stored in memory.

[0032] In one possible implementation, the first node is specifically used to: invoke the first task management process to create the first storage file in the first directory.

[0033] In one possible implementation, a creation process also runs on the first node, and the first node is further configured to: invoke the creation process to create the first directory according to the received first directory creation instruction.

[0034] In one possible implementation, the I / O information includes at least one of the following: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

[0035] Fifthly, embodiments of this application provide a storage medium including a computer program for implementing the method as described in the first aspect or any possible implementation of the first aspect.

[0036] In a sixth aspect, embodiments of this application provide a chip including a processor, a memory, and a communication interface. The processor, the memory, and the communication interface are connected. The processor is used to read and execute a computer program stored in the memory to perform the method described in the first aspect or any possible implementation of the first aspect. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of a current process for obtaining I / O information for a job;

[0038] Figure 2 This is a schematic diagram of another current process for obtaining I / O information for a job;

[0039] Figure 3 A system architecture diagram provided for an embodiment of this application;

[0040] Figure 4 The flowchart of the method for obtaining I / O information provided in the embodiments of this application Figure 1 ;

[0041] Figure 5 The flowchart of the method for obtaining I / O information provided in the embodiments of this application Figure 2 ;

[0042] Figure 6 A schematic diagram illustrating the process of a method for obtaining I / O information of a job as provided in an embodiment of this application;

[0043] Figure 7 A schematic diagram of a device for acquiring input / output information of a job provided in an embodiment of this application;

[0044] Figure 8 This is a schematic block diagram illustrating one implementation of the electronic device according to an embodiment of this application;

[0045] Figure 9 A schematic block diagram of a system for acquiring input / output information of a job, as provided in an embodiment of this application. Detailed Implementation

[0046] First, the elements involved in this application will be explained.

[0047] 1. Distributed Computing System: A distributed computing system comprises multiple computers interconnected via a network, such as multiple HPC computers interconnected via a network. These computers may include at least one management node and multiple compute nodes. The management node receives jobs submitted by users and distributes the jobs to the compute nodes, which then execute the jobs distributed by the management node. A job may be assigned to one or more compute nodes for execution.

[0048] 2. Container: A virtualization technology in computer operating systems. This technology allows processes to run in relatively independent and isolated environments (including independent file systems, namespaces, resource views, etc.), thereby simplifying software deployment processes, enhancing software portability and security, and improving system resource utilization. Container technology is widely used in service-oriented scenarios in the cloud computing field. Simply put, a container can be considered a resource-constrained process that is isolated from other processes.

[0049] 3. Job: A job is a collection of program instances that need to be executed for a specific computing task. It typically corresponds to a set of processes, containers, or other running entities on one or more computers. Since containers are also processes, one job can be considered to correspond to multiple processes.

[0050] From another perspective, a job can be divided into one or more stages, each stage containing one or more concurrently executed tasks. In other words, each job is divided into multiple tasks, and each task corresponds to a process.

[0051] 4. Process: A process is a running activity of a program on a certain set of data in a computer. It is the basic unit for system resource allocation and scheduling and is the foundation of the operating system structure.

[0052] 5. A distributed file system (DFS) refers to a file system whose managed physical storage resources are not necessarily directly connected to the local node, but are connected to the node through a computer network; or it is a complete hierarchical file system formed by combining several different logical disk partitions or volume labels. Among them, the General Parallel File System (GPFS), developed by IBM, is typically used in HPC clusters. It ensures that all nodes within an HPC cluster can access the entire file system in parallel. GPFS allows clients to share files, which may be distributed across different hard drives on different nodes. Lustre is an open-source parallel distributed file system similar to GPFS, also typically used in HPC clusters.

[0053] 6. Input / output (I / O) typically refers to the input and output of data between memory or other peripheral devices.

[0054] To better understand this application, the existing problems are explained below.

[0055] One current approach used in distributed computing systems to obtain job I / O information is as follows: Figure 1 As shown, after the compute node powers on, it starts the scheduler agent process. Upon receiving a job from the management node, the compute node starts the job, with each job corresponding to one or more processes. During execution, these processes access the storage system via GPFS, generating I / O statistics.

[0056] See also Figure 1 The compute nodes invoke the GPFS system monitoring process to collect I / O information at the process level, and periodically back up the collected I / O information of each process to a memory file. Then, the compute nodes invoke the scheduler agent process to periodically read the I / O information of each process in the memory file, and aggregate the I / O information of processes belonging to the same job according to the correspondence between jobs and processes, to obtain the job-level I / O information. For example, if job a includes processes 1 to 5, then the I / O information of processes 1 to 5 will be aggregated to obtain the I / O information of job a.

[0057] This approach has the following drawbacks: (1) The compute node calls the GPFS system monitoring process to collect I / O information of all processes on the compute node. These processes include some non-job-related processes, meaning the compute node may collect a large amount of redundant information, such as... Figure 2 The GPFS system monitoring process also collects I / O information of "system processes" that are not corresponding to the job. At the same time, when the compute node calls the scheduler agent process to read the file storing the I / O information of each process, it also reads this redundant information. Therefore, it is necessary to remove this redundant information, which wastes the compute node's resources and increases the compute node's power consumption.

[0058] (2) When the computing node calls the scheduler agent process to aggregate the I / O information of processes belonging to the same job based on the correspondence between the job and the process, it is easy to make mistakes, resulting in inaccurate job I / O information.

[0059] (3) The GPFS system monitoring process does not know when to stop collecting I / O information for a particular process; it can only determine this by setting a timeout. When a process has not performed any I / O operations for a certain period, it is considered to have exited and no longer needs to be collected, thus discarding the previously collected I / O information from memory. However, in reality, many processes perform a large number of I / O operations during initialization and termination, while performing very few I / O operations during execution. Therefore, the GPFS system monitoring process may collect only some of the I / O information for the processes corresponding to the job, ultimately resulting in inaccurate I / O information for the job.

[0060] Another approach currently used in distributed computing systems to obtain job I / O information is as follows: Figure 2 As shown, after the compute node powers on, it starts the scheduler agent process. Upon receiving a job from the management node, the compute node calls the task management process to set an environment variable (JOB_ID) for the process corresponding to that job, and then starts the job. Each job, once started, has one or more processes associated with it. During execution, these processes access the storage system using Lustre, generating I / O statistics.

[0061] See also Figure 2 The compute node triggers the Lustre system monitoring process to collect I / O information of processes associated with environment variables by invoking the scheduler agent process to read the memory file used to store process I / O information (e.g., the / proc / xxx file). After obtaining the I / O information associated with JOB_ID, the scheduler agent process aggregates the I / O information of processes belonging to the same job according to the correspondence between jobs and processes, thus obtaining job-level I / O information.

[0062] In this approach, the Lustre system monitoring process only collects I / O information from processes associated with a JOB_ID, excluding I / O information from processes not associated with jobs. This solves the problem of... Figure 1 The shortcomings described in scheme (1) are also present. Figure 1 The technical problem is that the I / O information of the job obtained in the schemes (2) and (3) shown is inaccurate.

[0063] In addition, this approach has the following drawbacks: the Lustre system monitoring process collects I / O information of processes associated with environment variables by calling the scheduler agent process to read the memory file used to store the process's I / O information. Since the collection time of the Lustre system monitoring process increases with the number of Job processes, if the scheduler agent process does not read I / O information from the file for a long time, the scheduler agent process cannot determine whether the Lustre system monitoring process has not finished collecting or has crashed.

[0064] Therefore, current methods for obtaining job I / O information suffer from the technical problem of inaccurate I / O information. To address this problem, the method for obtaining job I / O information as described in this application is proposed.

[0065] Figure 3 A system architecture diagram provided for an embodiment of this application. See also... Figure 3 The system architecture includes at least one second node and at least one first node. The second node can be a management node in the distributed system architecture, a terminal device, or another type of server. The first node can be a computing node or cloud server in the distributed system architecture, or another type of server, such as a cloud server or application server. For example, when the second node is a management node in the distributed system architecture, the first node can be a computing node or cloud server in the distributed system architecture, and there can be multiple first nodes.

[0066] The first node runs jobs, which can be assigned by the second node or generated based on requests sent by other nodes.

[0067] Specifically, the first node invokes a distributed file system monitoring process to obtain the input / output I / O information of each process, obtains the I / O information of at least one job corresponding to each process based on the I / O information of each process, and stores the I / O information of at least one job in at least one storage file; the first node invokes at least one task management process to read the I / O information of at least one job from at least one storage file, and sends the I / O information of at least one job to the second node, wherein at least one task management process corresponds one-to-one with at least one job. In this application, the first node invokes the distributed file system monitoring process to aggregate the I / O information of each process belonging to the same job to obtain the I / O information of that job. Since the accuracy of the distributed file system monitoring process in aggregating the I / O information of each process belonging to the same job is higher than that of other processes aggregating the I / O information of each process belonging to the same job, this application can improve the accuracy of the obtained job I / O information.

[0068] The method for obtaining I / O information in this application will be described below using specific embodiments.

[0069] Figure 4 The flowchart of the method for obtaining I / O information provided in the embodiments of this application Figure 1 In this implementation, the execution entity is the first node, which runs a distributed file system monitoring process and a task management process. See also... Figure 4 The method in this embodiment includes:

[0070] Step S401: The first node calls the distributed file system monitoring process to obtain the input / output I / O information of each process, obtains the I / O information of at least one job corresponding to each process based on the I / O information of each process, and stores the I / O information of the at least one job in at least one storage file.

[0071] In this embodiment, the distributed file system monitoring process can be the GPFS system monitoring process, the Lustre system monitoring process, or other distributed file system monitoring processes; this embodiment does not limit the types of processes.

[0072] The first node periodically calls the distributed file system monitoring process to obtain I / O information for each process. The I / O information may include at least one of the following at multiple points in time during the monitoring period: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

[0073] After the first node calls the distributed file system monitoring process to obtain the I / O information of each process, the distributed file system monitoring process obtains the I / O information of at least one job corresponding to each process based on the I / O information of each process. Each process here can correspond to at least one job. For example, process 1 and process 2 are the processes corresponding to job 1, process 3 and process 4 are the processes corresponding to job 2, and process 1, process 2, process 3 and process 4 correspond to two jobs: job 1 and job 2.

[0074] In one approach, the compute node invoking the distributed file system monitoring process to obtain the I / O information of at least one job corresponding to each process based on the I / O information of each process may include: the compute node invoking the distributed file system monitoring process to obtain the I / O information of the job based on the I / O information of processes corresponding to the same job. Here, "obtaining the I / O information of the job based on the I / O information of processes corresponding to the same job" can also be referred to as "aggregating the I / O information of processes corresponding to the same job to obtain the I / O information of the job". Optionally, the compute node may invoke other processes to send the job-process mapping relationship to the distributed file system monitoring process, or the compute node may invoke the distributed file system monitoring process to obtain the job-process mapping relationship from the relevant storage device.

[0075] For example, process 1 and process 2 are the processes corresponding to job 1. The I / O information of process 1 includes the accumulated read byte 1, accumulated write byte 1, read bandwidth 1, write bandwidth 1, read latency 1, and write latency 1 at time 1, and the accumulated read byte 2, accumulated write byte 2, read bandwidth 2, write bandwidth 2, read latency 2, and write latency 2 at time 2. The I / O information of process 2 includes the accumulated read byte 3, accumulated write byte 3, read bandwidth 3, write bandwidth 3, read latency 3, and write latency 3 at time 1, and the accumulated read byte 4, accumulated write byte 4, read bandwidth 4, write bandwidth 4, read latency 4, and write latency 4 at time 2. The accumulated read bytes 1 and accumulated read bytes 3 are added together to obtain the total accumulated read bytes at time 1. The accumulated write bytes 1 and accumulated write bytes 3 are added together to obtain the total accumulated write bytes at time 1. The read bandwidth 1 and read bandwidth 3 are added together to obtain the total read bandwidth at time 1. The write bandwidth 1 and write bandwidth 3 are added together to obtain the total write bandwidth at time 1. The read latency 1 and read latency 3 are added together to obtain the total read latency at time 1. The write latency 1 and write latency 3 are added together to obtain the total write latency at time 1. The total accumulated read bytes, total accumulated write bytes, total read bandwidth, total write bandwidth, total read latency, and total write latency at time 1 constitute the I / O information of job 1 at time 1. Using a similar method, the I / O information of job 1 at time 2 is obtained, i.e., the I / O information of job 1: the I / O information of job 1 at time 1 and the I / O information of job 1 at time 2.

[0076] Optionally, in this embodiment, the process that the compute node calls the distributed file system monitoring process to obtain I / O information is a process associated with preset environment variable information. The preset environment variable information may include the identifier (JOB_ID) of the job corresponding to the process. If the identifier of a job in different clusters may be the same, the preset environment variable information may also include the identifier (CLUSTER_ID) of the cluster to which the job belongs. It is understood that processes corresponding to the same job are associated with the same preset environment variable information, while processes corresponding to different jobs are associated with different preset environment variable information. For example, in at least one of the first jobs, after receiving the first job, the first node calls the task management process to set the first preset environment variable information. The first preset environment variable information includes the identifier of the first job; optionally, the first preset environment variable information may also include the identifier of the cluster to which the first job belongs. After the first job begins execution, the process corresponding to the first job inherits this first preset environment variable information, meaning the first job is associated with this first preset environment variable.

[0077] In this embodiment, when the process whose I / O information is obtained by the computing node calling the distributed file system monitoring process is a process associated with preset environment variable information, firstly, the distributed file system monitoring process can only collect I / O information of processes associated with preset environment variable information, avoiding the collection of redundant information and saving resources of the first node; secondly, the distributed file system monitoring process does not need to know the correspondence between jobs and processes (i.e., the computing node does not need to call other processes to send the correspondence between jobs and processes to the distributed file system monitoring process, nor does it need to call the distributed file system monitoring process to obtain the correspondence between jobs and processes from the relevant storage devices). It can determine the corresponding job process based on the process associated with the same preset environment variable information, so that the distributed file system monitoring process can obtain the I / O information of at least one job corresponding to each process based on the I / O information of each process, thereby improving the efficiency of obtaining the I / O information of at least one job.

[0078] After obtaining I / O information for at least one job corresponding to each process, the distributed file system monitoring process stores the I / O information of at least one job in at least one storage file.

[0079] In this context, each of the at least one job may correspond to a storage file. For example, if the I / O information of any first job in the at least one job is stored in the first storage file of the at least one storage file, then the first job corresponds to the first storage file. Alternatively, at least one job may correspond to one storage file.

[0080] In one implementation, at least one storage file is created by the first node invoking the task management process. In a specific implementation, the first node invokes the task management process to create at least one storage file in a first directory; that is, the first directory is used to store at least one storage file. If each job in at least one job corresponds to one storage file, for any first job in at least one job, after receiving the first job, the first node creates a first storage file in the first directory. The method for obtaining the first directory can be as follows: after the first node starts, the first node can invoke a creation process to create the first directory according to the received first directory creation instruction.

[0081] When at least one storage file is created by the task management process called by the first node, even if the distributed file system monitoring process is abnormally shut down and restarted, the I / O information of at least one job obtained by the compute node before calling the distributed file system monitoring will not be lost, ensuring the continuity and reliability of job I / O information acquisition.

[0082] In another implementation, at least one storage file is a memory file.

[0083] Step S402: The first node calls at least one task management process to read the I / O information of at least one job from at least one storage file, and sends the I / O information of at least one job to the second node. At least one task management process corresponds one-to-one with at least one job.

[0084] In other words, each time the first node receives a job, it starts a corresponding task management process for that job. For the first task management process in at least one task management process, the first node can periodically call the first task management process to read the I / O information of the first job from at least one storage file. That is, the first task management process is started by the compute node after it receives the first job.

[0085] In a distributed computing system, the process of a first node invoking at least one task management process to send at least one job I / O information to a second node includes: the first node invoking at least one task management process to send at least one job I / O information to a scheduler agent process running on the first node, and the first node invoking the scheduler agent process to send at least one job I / O information to the second node.

[0086] Upon receiving I / O information from at least one job, the second node can display this information on a monitor, allowing the management user to access the I / O data for each job. If the management user discovers that at least one job is consuming a significant amount of I / O resources from the storage system—for example, if the cumulative write bytes of the target job exceed a preset limit—the second node can receive an instruction to terminate the target job and send this instruction to the first node. The first node then terminates the target job based on this instruction.

[0087] In this embodiment, the first node calls the distributed file system monitoring process to aggregate the I / O information of each process belonging to the same job, thereby obtaining the job's I / O information. There is no need to call other processes to obtain the job's I / O information based on the I / O information of each process belonging to the same job. Since the accuracy of the distributed file system monitoring process aggregating the I / O information of each process belonging to the same job is higher than that of other processes aggregating the I / O information of each process belonging to the same job, this application can improve the accuracy of the obtained job's I / O information.

[0088] Furthermore, in this embodiment, when each process is associated with preset environment variable information, it can also save resources of the first node and improve the efficiency of obtaining I / O information for at least one job.

[0089] To further improve the efficiency of acquiring I / O information for at least one job, this embodiment makes further improvements based on the previous embodiment. In the method of this embodiment, each job in at least one job corresponds to a storage file. See also Figure 5 The method in this embodiment, based on the previous embodiment, further includes:

[0090] Step S501: When the first job in at least one job terminates, the first node calls the first task management process to read the I / O information in the first storage file that has not been read. The first storage file is used to store the I / O information of the first job.

[0091] It is understandable that if the first job in at least one job terminates and the first file does not contain I / O information that has not been read by the first task management process called by the first node, then step S501 does not exist.

[0092] Step S502: The first node calls the first task management process to delete the first storage file.

[0093] In other words, the first task management process can monitor the running status of the first job on the first node. After monitoring the termination of the first job, the first task management process determines whether there is any unread I / O information in the first storage file. If not, the first storage file is deleted; if it exists, the first storage file is deleted after reading the unread I / O information. That is, the lifecycle of the first storage file is used to indicate the lifecycle of the process corresponding to the first job.

[0094] Step S503: The first node calls the distributed file system monitoring process to release the I / O information of each process corresponding to the first job stored in memory.

[0095] After the distributed file system monitoring process determines that the first storage file has been deleted, it determines that the process corresponding to the first job has terminated. The distributed file system monitoring process releases the I / O information of each process corresponding to the first job stored in memory, that is, it no longer collects the I / O information of each process corresponding to the first job, or in other words, it no longer collects the I / O information of processes associated with the first preset environment information.

[0096] In other words, the method of this implementation deletes the first storage file after the first job terminates, so that the distributed file system monitoring process knows that the first job has terminated and there is no need to continue collecting I / O information of each process corresponding to the first job. Conversely, if the first storage file continues to exist, it means that the process corresponding to the first job is running, and it is necessary to continue collecting I / O information of each process corresponding to the first job. That is, the method of this implementation enables the distributed file system monitoring process to accurately know when to stop collecting I / O information of the process corresponding to the job, and will not cause the phenomenon of discarding the I / O information of some processes due to misjudgment that some processes of the job have terminated, thus further improving the accuracy of the obtained job I / O information.

[0097] The following example illustrates the method for obtaining I / O information of a job in the above embodiments.

[0098] Figure 6 A schematic diagram illustrating the process of obtaining I / O information for a job as provided in this application embodiment is shown below. Figure 6 This example applies to compute nodes in a distributed computing system. After receiving jobs 1, 2, and 3, the compute node starts task management processes 1, 2, and 3 respectively. The compute node calls task management process 1 to create storage file 1 for job 1 in the first directory, task management process 2 to create storage file 2 for job 1 in the first directory, and task management process 3 to create storage file 3 for job 3 in the first directory. The compute node calls task management process 1 to set environment variables for job 1: job 1's identifier 11 and the identifier 22 of the cluster to which job 1 belongs. The compute node calls task management process 2 to set environment variables for job 2: job 2's identifier 10 and the identifier 21 of the cluster to which job 1 belongs. The compute node calls task management process 3 to set environment variables for job 3: job 3's identifier 00 and the identifier 20 of the cluster to which job 1 belongs. After job 1 starts, the process corresponding to job 1 is associated with identifiers 11 and 22; the process corresponding to job 2 is associated with identifiers 10 and 21; and the process corresponding to job 3 is associated with identifiers 00 and 20. The compute node invokes the distributed file system monitoring process to collect I / O information for processes associated with identifiers 11 and 22, 10 and 21, and 00 and 20 within the current monitoring period. The I / O information for job 1 is obtained by aggregating the I / O information of processes associated with identifiers 11 and 22. The I / O information for job 1 is stored in storage file 1, the I / O information for job 2 is stored in storage file 2, and the I / O information for job 3 is stored in storage file 3.

[0099] The compute node invokes task management process 1 to read the unread I / O information of job 1 from storage file 1 and sends the read I / O information of job 1 to the scheduler agent process, so that the scheduler agent process sends the read I / O information of job 1 to the management node. The compute node invokes task management process 2 to read the unread I / O information of job 2 from storage file 2 and sends the read I / O information of job 2 to the scheduler agent process, so that the scheduler agent process sends the read I / O information of job 2 to the management node. The compute node invokes task management process 3 to read the unread I / O information of job 3 from storage file 3 and sends the read I / O information of job 3 to the scheduler agent process, so that the scheduler agent process sends the read I / O information of job 3 to the management node.

[0100] The methods involved in this application have been described above. The apparatus and system involved in this application will be described below.

[0101] Figure 7 A schematic diagram of the device for acquiring input / output information of a job provided in an embodiment of this application is shown below. Figure 7 The apparatus in this embodiment includes a processing module 701 and a sending module 702.

[0102] The device runs a distributed file system monitoring process and a task management process. Processing module 701 is used to invoke the distributed file system monitoring process to obtain input / output I / O information of each process, obtain I / O information of at least one job corresponding to each process based on the I / O information of each process, and store the I / O information of the at least one job in at least one storage file; processing module 701 is also used to invoke at least one task management process to read the I / O information of the at least one job from the at least one storage file; sending module 702 is used to send the I / O information of the at least one job to the second node, wherein the at least one task management process corresponds one-to-one with the at least one job.

[0103] Optionally, the process is associated with preset environment variable information, which includes the identifier of the job corresponding to the process.

[0104] Optionally, the preset environment variable information may also include the identifier of the cluster to which the job corresponding to the process belongs.

[0105] Optionally, each of the at least one job corresponds to a storage file.

[0106] Optionally, the processing module 701 is further configured to: invoke the first task management process in the at least one task management process to create the first storage file in the at least one storage file.

[0107] Optionally, the processing module 701 is further configured to: when the first job in at least one job terminates, call the first task management process to read the I / O information in the first storage file that has not been read, and delete the first storage file; the first storage file is used to store the I / O information of the first job; and call the distributed file system monitoring process to release the I / O information of each process corresponding to the first job stored in memory.

[0108] Optionally, the processing module 701 is specifically used to: call the first task management process to create the at least one storage file in the first directory.

[0109] Optionally, the device also runs a creation process, and the processing module 701 is further configured to: call the creation process to create the first directory according to the received first directory creation instruction.

[0110] Optionally, the I / O information includes at least one of the following: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

[0111] The apparatus in this embodiment can be used to execute the technical solutions in the above method embodiments, and its implementation principle and technical effects are similar, so they will not be repeated here. The apparatus in this embodiment may be all or part of the first node.

[0112] Figure 8 This is a schematic block diagram illustrating one implementation of an electronic device according to an embodiment of this application. The electronic device in this embodiment can be the first node described above, or it can be a chip, chip system, or processor that supports the first node in implementing the above method, or it can be a chip, chip system, or processor that supports the implementation of the above method. This electronic device can be used to implement the method corresponding to the first node described in the above method embodiments; for details, please refer to the description in the above method embodiments.

[0113] The electronic device may include one or more processors 801, which may also be referred to as processing units, and can perform certain control functions. The processor 801 may be a general-purpose processor or a dedicated processor, etc.

[0114] In an alternative design, the processor 801 may also store instructions and / or data 803, which can be executed by the processor to cause the electronic device to perform the methods described in the above method embodiments.

[0115] In another alternative design, the processor 801 may include a transceiver unit for implementing receive and transmit functions. For example, this transceiver unit may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing receive and transmit functions may be separate or integrated. The aforementioned transceiver circuit, interface, or interface circuit can be used for reading and writing code / data, or it can be used for transmitting or relaying signals.

[0116] Optionally, the electronic device may include one or more memories 802, which may store instructions 804 that can be executed on the processor to cause the electronic device to perform the methods described in the above method embodiments. Optionally, the memory may also store data. Optionally, the processor may also store instructions and / or data. The processor and memory may be configured separately or integrated together. For example, the correspondence described in the above method embodiments may be stored in the memory or in the processor.

[0117] Optionally, the electronic device may further include a transceiver 805 and / or an antenna 806. The processor 801, which may be referred to as a processing unit, controls the electronic device. The transceiver 805, which may be referred to as a transceiver unit, transceiver, transceiver circuit, or transceiver, is used to implement transceiver functions.

[0118] The processor and transceiver described in this embodiment can be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), n-metal-oxide-semiconductor (NMOS), positive channel metal oxide semiconductor (PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0119] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0120] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0121] The scope of the electronic devices described in the embodiments of this application is not limited thereto, and the structure of the electronic devices may vary. Figure 8 The electronic device described in the embodiments of this application may be a standalone device or may be part of a larger device.

[0122] Figure 9 A schematic block diagram of a system for acquiring input / output information of a job, as provided in an embodiment of this application. See also... Figure 9 The system in this embodiment includes a first node 901 and a second node 902.

[0123] The first node 901 runs a distributed file system monitoring process and a task management process. The first node 901 is used to: call the distributed file system monitoring process to obtain the input / output I / O information of each process, obtain the I / O information of at least one job corresponding to each process based on the I / O information of each process, and store the I / O information of the at least one job in at least one storage file; the first node 901 is also used to call at least one task management process to read the I / O information of the at least one job from the at least one storage file, and send the I / O information of the at least one job to the second node 902, wherein the at least one task management process corresponds one-to-one with the at least one job.

[0124] Optionally, the process is associated with preset environment variable information, which includes the identifier of the job corresponding to the process.

[0125] Optionally, the preset environment variable information may also include the identifier of the cluster to which the job corresponding to the process belongs.

[0126] Optionally, each of the at least one job corresponds to a storage file.

[0127] Optionally, the first node 901 is further configured to: invoke the first task management process in the at least one task management process to create the first storage file in the at least one storage file.

[0128] Optionally, the first node 901 is further configured to: when the first job in at least one job terminates, call the first task management process to read the I / O information in the first storage file that has not been read, and delete the first storage file; the first storage file is used to store the I / O information of the first job; and call the distributed file system monitoring process to release the I / O information of each process corresponding to the first job stored in memory.

[0129] Optionally, the first node 901 is specifically used to: invoke the first task management process to create the at least one storage file in the first directory.

[0130] Optionally, a creation process also runs on the first node 901, and the first node 901 is further configured to: call the creation process to create the first directory according to the received first directory creation instruction.

[0131] Optionally, the I / O information includes at least one of the following: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

[0132] The system in this embodiment can be used to execute the technical solutions in the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0133] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a computer, implements the functions of any of the above method embodiments.

[0134] This application also provides a computer program product that, when executed by a computer, implements the functions of any of the above method embodiments.

[0135] When the above embodiments are implemented using software, they can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0136] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0137] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0138] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0139] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0140] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0141] It should be understood that the term "embodiment" used throughout the specification means that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, various embodiments throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0142] It should also be understood that in this application, “when…”, “if” and “if” all refer to the terminal device or server making a corresponding processing under certain objective circumstances, and are not time-limited, nor do they require the terminal device or server to make a judgment action, nor do they mean that there are other limitations.

[0143] In this application, the use of singular pronouns to denote "one or more" rather than "one and only one," unless otherwise specified. In this application, unless otherwise specified, "at least one" is intended to mean "one or more," and "more than" is intended to mean "two or more."

[0144] In addition, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. A can be singular or plural, and B can be singular or plural.

[0145] The character " / " generally indicates that the objects before and after it are in an "or" relationship.

[0146] In this document, the terms "at least one of..." or "at least one of..." refer to all or any combination of the listed items. For example, "at least one of A, B, and C" can mean: A exists alone, B exists alone, C exists alone, A and B exist simultaneously, B and C exist simultaneously, and A, B, and C exist simultaneously. A can be singular or plural, B can be singular or plural, and C can be singular or plural.

[0147] It should be understood that in the embodiments of this application, "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

Claims

1. A method for acquiring input / output information of a task, characterized in that, The method is applied to a first node, which runs a distributed file system monitoring process and a task management process. The method includes: The system calls a distributed file system monitoring process to obtain input / output I / O information of each process, obtains I / O information of at least one job corresponding to each process based on the I / O information of each process, and stores the I / O information of the at least one job in at least one storage file; wherein, each job corresponds to one or more processes after it is started; each job in the at least one job corresponds to one storage file; or, the at least one job corresponds to one storage file. The system invokes at least one task management process to read the I / O information of the at least one job from the at least one storage file and to send the I / O information of the at least one job to the second node. The at least one task management process corresponds one-to-one with the at least one job.

2. The method according to claim 1, characterized in that, The process is associated with preset environment variable information, which includes the identifier of the job corresponding to the process.

3. The method according to claim 2, characterized in that, The preset environment variable information also includes the identifier of the cluster to which the job corresponding to the process belongs.

4. The method according to claim 1, characterized in that, Also includes: The first storage file in the at least one storage file created by the first task management process in the at least one task management process is invoked.

5. The method according to claim 4, characterized in that, Also includes: When the first job in at least one job terminates, the first task management process is invoked to read the I / O information in the first storage file that has not been read, and to delete the first storage file; The first storage file is used to store the I / O information of the first job; The distributed file system monitoring process is invoked to release the I / O information of each process corresponding to the first job stored in memory.

6. The method according to claim 1, characterized in that, The first storage file in the at least one storage file created by the first task management process in the at least one task management process includes: The first task management process is invoked to create the first storage file in the first directory.

7. The method according to any one of claims 1 to 6, characterized in that, The I / O information includes at least one of the following: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

8. An electronic device, characterized in that, include: The method comprises a memory, a processor, and a computer program, wherein the computer program is stored in the memory and the processor executes the computer program to perform the method as described in any one of claims 1 to 7.

9. A system for acquiring input / output information of a task, characterized in that, include: First node and second node; The first node runs a distributed file system monitoring process and a task management process. The first node is used for: The system calls a distributed file system monitoring process to obtain input / output I / O information of each process, obtains I / O information of at least one job corresponding to each process based on the I / O information of each process, and stores the I / O information of the at least one job in at least one storage file; wherein, each job corresponds to one or more processes after it is started; each job in the at least one job corresponds to one storage file; or, the at least one job corresponds to one storage file. The first node is also configured to invoke at least one task management process to read the I / O information of the at least one job from the at least one storage file, and to send the I / O information of the at least one job to the second node, wherein the at least one task management process corresponds one-to-one with the at least one job.

10. The system according to claim 9, characterized in that, The process is associated with preset environment variable information, which includes the identifier of the job corresponding to the process.

11. The system according to claim 10, characterized in that, The preset environment variable information also includes the identifier of the cluster to which the job corresponding to the process belongs.

12. The system according to claim 9, characterized in that, The first node is also used to: invoke the first task management process in the at least one task management process to create the first storage file in the at least one storage file.

13. The system according to claim 12, characterized in that, The first node is also used for: When the first job in at least one job terminates, the first task management process is invoked to read the I / O information in the first storage file that has not been read, and to delete the first storage file; The first storage file is used to store the I / O information of the first job; The distributed file system monitoring process is invoked to release the I / O information of each process corresponding to the first job stored in memory.

14. The system according to claim 12, characterized in that, The first node is specifically used for: The first task management process is invoked to create at least one storage file in the first directory.

15. The system according to any one of claims 9 to 14, characterized in that, The I / O information includes at least one of the following: accumulated read bytes, accumulated write bytes, read bandwidth, write bandwidth, read latency, and write latency.

16. A storage medium, characterized in that, The storage medium includes a computer program for implementing the method as described in any one of claims 1 to 7.

17. A chip comprising a processor, a memory, and a communication interface, wherein the processor, the memory, and the communication interface are connected, characterized in that, The processor is used to read and execute the computer program stored in the memory to perform the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Task running method and device

    CN108089924A

  • Shared burst data cache-oriented competition perception-based node allocation method

    CN111338782A