WO2022048365A1 - 一种基于数据集与节点缓存的调度方法和装置 - Google Patents

一种基于数据集与节点缓存的调度方法和装置 Download PDF

Info

Publication number
WO2022048365A1
WO2022048365A1 PCT/CN2021/109626 CN2021109626W WO2022048365A1 WO 2022048365 A1 WO2022048365 A1 WO 2022048365A1 CN 2021109626 W CN2021109626 W CN 2021109626W WO 2022048365 A1 WO2022048365 A1 WO 2022048365A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
data set
host
cache
training task
Prior art date
Application number
PCT/CN2021/109626
Other languages
English (en)
French (fr)
Inventor
王德奎
陈培
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Priority to EP21863433.5A priority Critical patent/EP4203437A4/en
Priority to KR1020237009278A priority patent/KR20230093420A/ko
Priority to US18/024,732 priority patent/US11698863B1/en
Publication of WO2022048365A1 publication Critical patent/WO2022048365A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0842Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5033Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering data affinity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/501Performance criteria
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present invention relates to the field of computer technology, and more particularly, to a scheduling method and device based on data set and node cache.
  • the training task has a strong dependence on the data set.
  • the quality of the data set will affect the accuracy of the model, and the speed at which the training script loads the data set will affect the training speed of the model.
  • the datasets used for AI training are usually open source datasets, such as ImageNet (image network) dataset, MNIST (handwritten digit recognition) dataset, etc., or industry-related datasets, such as medical care, transportation, etc., for AI resource management
  • the platform usually unable to evaluate the quality of the data set, requires the guarantee of algorithm personnel.
  • the algorithm personnel usually need to manually download the data to the node before starting the training task.
  • the manually downloaded data set is usually optimized to automatically download the data set.
  • the AI resource management platform will automatically download the required datasets for training tasks.
  • it will provide algorithm personnel with various data sets, and cache these data sets to computing nodes according to the needs of training tasks.
  • the following problems may occur:
  • All computing nodes of the cluster may cache a large number of data set caches that are no longer used at the same time, resulting in insufficient node storage resources. When resource scheduling is performed, it may be found that there are no suitable nodes for caching data sets.
  • the purpose of the embodiments of the present invention is to provide a scheduling strategy based on data set and node cache, which can achieve the effect of load balancing of storage resources of cluster nodes under the premise of using local data set cache for training tasks.
  • one aspect of the present invention provides a scheduling method based on a data set and node cache, the method comprising:
  • the method further includes:
  • a host node for executing the training task is selected among the host nodes containing the data set cache.
  • the operation information of the training task in response to receiving the training task, is obtained, and the host node that satisfies the space required by the training task is screened according to the operation information and storage resource information Also includes:
  • the host node for executing the training task is selected from the pending host nodes based on a scheduling policy.
  • acquiring the storage resource information of each host node further includes:
  • Kubernetes Kubernetes (K8s, container cluster management system) cluster in the cluster, and obtain the storage resource information of the host node based on the Kubernetes cluster.
  • the method further includes:
  • the changed storage resource information is reported in real time.
  • scoring each host node according to the storage resource information further includes:
  • scoring each host node according to the storage resource information further includes:
  • each data set cache in each host node is judged, the data set cache smaller than the preset size threshold is regarded as the discarded data set cache, and the host node is scored according to the discarded data set cache.
  • Another aspect of the embodiments of the present invention further provides a scheduling apparatus based on a data set and a node cache, the apparatus comprising:
  • the storage resource information acquisition module is configured to acquire storage resource information of each host node
  • the host node screening module is configured to obtain the operation information of the training task in response to receiving the training task, and screen the host node that meets the space required by the training task according to the operation information and storage resource information;
  • the host node scoring module is configured to score each host node according to the storage resource information in response to all the host nodes not meeting the space required for the training task;
  • the host node selection module is configured to select the to-be-executed host node for executing the training task among all the host nodes according to the scoring result;
  • the training task execution module is configured to acquire and delete the discarded dataset cache in the host node to be executed, and execute the training task in the host node to be executed.
  • the apparatus further includes:
  • the cache judgment module is configured to judge whether each host node contains the data set cache required for the training task; in response to judging that there is a data set cache in the host node, the host node containing the data set cache is selected to execute the training task host node.
  • the host node screening module is further configured to:
  • the host node for executing the training task is selected from the pending host nodes based on a scheduling policy.
  • the present invention has at least the following beneficial technical effects: the present invention is a scheduling strategy for selecting nodes based on the size of data sets required for node storage and training tasks in a cluster environment; The host node of the dataset or the host node with sufficient storage space of the node, and when the remaining space of all nodes in the cluster is insufficient, a node dataset cache deletion strategy is defined, which can run the training task on the host node whose storage space is temporarily insufficient. . Based on this node selection strategy, it can effectively reduce the time to download datasets and wait for available nodes, thereby improving the competitiveness of the AI management platform.
  • Fig. 1 shows a schematic block diagram of an embodiment of a scheduling method based on data set and node cache according to the present invention
  • FIG. 2 shows a flow chart of an embodiment of a scheduling method based on data set and node cache according to the present invention
  • Fig. 3 shows a schematic block diagram of an embodiment of a scheduling apparatus based on a data set and a node cache according to the present invention.
  • Fig. 1 shows a schematic block diagram of an embodiment of a scheduling method based on data sets and node caches according to the present invention.
  • the method at least includes the following steps:
  • FIG. 2 shows a flowchart of an embodiment of a scheduling method based on a data set and a host node (may be referred to as a node for short) cache according to the present invention.
  • the present invention It is a scheduler extension mechanism based on Kubernetes. It uses the self-developed node agent (agent) to report the status of all data sets of the node to the scheduler. At the same time, the scheduler queries the running status of the training tasks of the AI resource management platform, according to the remaining storage of the node. , data set cache size, data set cache usage times, data set cache cleaning strategy and other factors, score the nodes of the cluster, and combine the score with other scheduling strategies of Kubernetes to select the optimal node for running training tasks .
  • agent self-developed node agent
  • the storage resource information of the node is collected, including storage space node i DiskTotalSize, storage free space node i DiskFreeSize, data set node cache information list (data set unique identifier dataSet j Id, size dataSet j Size, the number of uses in the past month (dataSet j UseNumber).
  • the user submits a training task on the resource management platform, wherein the operation information of the training task includes the data set information used, including the data set name, the data set unique identifier dataSet task Id used by the task, and the data set used by the task.
  • Dataset size dataSet task Size as well as other basic resource information for running training tasks (CPU, memory, GPU (graphics processing unit, graphics processor), etc.), after the scheduler receives the resource request for the training task, first use kubernetes default algorithm to filter out nodes with sufficient CPU, memory, and GPU cards.
  • step S300 when the space node i DiskFreeSize of all nodes in the cluster does not meet the required space dataSet j Size of the data set, for the node node i , when the node cache of the data set no longer used by the node is greater than or equal to the data used by the training task set cache size, i.e.
  • step S400 a suitable host node to be executed for executing the training task is selected from all host nodes according to the scoring result.
  • step S500 after the resource scheduling module selects an appropriate node, it notifies the agent of the data set cache list to be deleted, and the agent deletes the data set cache.
  • the delete operation is to delete the node file, and the downloaded data set is downloaded from the remote end using the HTTP (Hyper Text Transfer Protocol) service, it is inevitable that the speed of deleting the data set cache is much faster than the speed of downloading the data set cache. At this point, after the training task is scheduled to this node, the download of the dataset can be started immediately.
  • HTTP Hyper Text Transfer Protocol
  • the method further includes:
  • a host node for executing the training task is selected among the host nodes containing the data set cache.
  • the host node when the host node already has the data set required by the training task (that is, the host node has the data set cache), the host node is preferentially used to run the training task, This avoids downloading the dataset again.
  • the host node select the node with the largest node i DiskFreeSize remaining space to download the dataset and run the training task.
  • the operation information of the training task is obtained, and the host nodes that satisfy the space required by the training task are screened according to the operation information and the storage resource information.
  • the host node for executing the training task is selected from the pending host nodes based on a scheduling policy.
  • the scheduler after receiving the resource request for the training task, the scheduler first uses the default algorithm of kubernetes to filter out nodes with sufficient CPU, memory, and GPU cards. Based on the scheduling strategy, the node with the largest remaining space dataSet j Size is selected to download the data set and run the training task.
  • acquiring the storage resource information of each host node further includes:
  • a Kubernetes cluster is deployed in the cluster, and a self-developed agent is deployed on each host node to collect storage resource information of the node, including storage space node i DiskTotalSize, storage free space node i DiskFreeSize , Dataset node cache information list (dataset unique identifier dataSet j Id, size dataSet j Size, usage times in the past month dataSet j UseNumber).
  • the method further includes:
  • the changed storage resource information is reported in real time.
  • the storage resource information when the storage resource information changes, the storage resource information needs to be reported to the resource scheduling module in real time, and the resource scheduling module performs node selection and data set node cache deletion policy based on these.
  • scoring each host node according to the storage resource information in response to all the host nodes not meeting the space required for the training task, scoring each host node according to the storage resource information further includes:
  • the node cache of the data set that is no longer used by the node is greater than or equal to
  • the size of the dataset cache used by the training task i.e. Use this node as an alternative node; for node i , select which dataset node caches need to be deleted, and build a model for the node dataset cache:
  • scoring each host node according to the storage resource information in response to all the host nodes not meeting the space required for the training task, scoring each host node according to the storage resource information further includes:
  • each data set cache in each host node is judged, the data set cache smaller than the preset size threshold is regarded as the discarded data set cache, and the host node is scored according to the discarded data set cache.
  • FIG. 3 shows a schematic block diagram of an embodiment of a scheduling apparatus based on data set and node cache according to the present invention.
  • the apparatus 101 includes:
  • Storage resource information acquisition module 11 the storage resource information acquisition module is configured to acquire storage resource information of each host node
  • the host node screening module 12 the host node screening module is configured to obtain the operation information of the training task in response to receiving the training task, and screen the host nodes that meet the space required by the training task according to the operation information and storage resource information;
  • the host node scoring module 13 the host node scoring module is configured to score each host node according to the storage resource information in response to all the host nodes not meeting the space required for the training task;
  • the host node selection module 14 the host node selection module is configured to select the host node to be executed for executing the training task among all the host nodes according to the scoring result;
  • the training task execution module 15 is configured to acquire and delete the discarded data set cache in the host node to be executed, and execute the training task in the host node to be executed.
  • the apparatus 101 further includes:
  • a cache judgment module (not shown), the cache judgment module is configured to judge whether each host node contains the data set cache required for the training task; in response to judging that there is a data set cache in the host node, the host node containing the data set cache Select the host node on which to execute the training task.
  • the host node screening module 12 is further configured to:
  • the host node for executing the training task is selected from the pending host nodes based on a scheduling policy.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本发明公开了一种基于数据集与节点缓存的调度方法,包括:获取每个主机节点的存储资源信息;响应于接收到训练任务,获取训练任务的运行信息,根据运行信息和存储资源信息筛选满足训练任务所需空间的主机节点;响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分;根据打分的结果在所有主机节点中选择用于执行训练任务的待执行主机节点;获取并删除待执行主机节点中的废弃数据集缓存,并在待执行主机节点中执行训练任务。本发明还公开了一种相应的装置。本发明可以有效地将训练任务运行在存储空间暂时不足的节点。

Description

一种基于数据集与节点缓存的调度方法和装置
本申请要求于2020年09月04日提交中国国家知识产权局,申请号为202010923074.8,发明名称为“一种基于数据集与节点缓存的调度方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,更具体地,特别是指一种基于数据集与节点缓存的调度方法和装置。
背景技术
在AI(Artificial Intelligence,人工智能)场景下,训练任务对数据集有很强的依赖,例如数据集的质量会影响模型的准确度,训练脚本加载数据集的速度会影响模型的训练速度。AI训练使用的数据集通常为开源的数据集,例如ImageNet(图像网络)数据集、MNIST(手写数字识别)数据集等,或者是行业相关的数据集,例如医疗、交通等,对于AI资源管理平台,通常无法对数据集的质量进行评估,需要算法人员保证。通常算法人员在启动训练任务时,通常需要手动将这些数据下载到节点,才能启动训练任务,但是对于AI资源管理平台通常会将手动下载数据集优化为自动下载数据集,在启动训练任务时,AI的资源管理平台都会为训练任务自动下载需要的数据集。作为AI资源管理平台,会为算法人员提供多种数据集,并将这些数据集根据训练任务的需要缓存到计算节点,但是由于节点的存储资源有限,可能会出现以下问题:
问题1、进行资源调度时,如果将较多的使用大数据集的任务调度到相 同的节点,会导致节点的存储资源不足,可能会出现节点存储资源较少,但是CPU(central processing unit,中央处理器)、内存空闲较多的问题;
问题2、集群的全部计算节点可能同时缓存了大量的不再使用的数据集缓存,导致节点存储资源不足,当进行资源调度的时候,可能发现没有合适的节点用于缓存数据集。
发明内容
有鉴于此,本发明实施例的目的在于提供一种基于数据集与节点缓存的调度策略,在满足训练任务使用本地数据集缓存的前提下,可以达到集群节点存储资源负载均衡的效果。
基于上述目的,本发明一方面提供了一种基于数据集与节点缓存的调度方法,该方法包括:
获取每个主机节点的存储资源信息;
响应于接收到训练任务,获取训练任务的运行信息,根据运行信息和存储资源信息筛选满足训练任务所需空间的主机节点;
响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分;
根据打分的结果在所有主机节点中选择用于执行训练任务的待执行主机节点;
获取并删除待执行主机节点中的废弃数据集缓存,并在待执行主机节点中执行训练任务。
在本发明的基于数据集与节点缓存的调度方法的一些实施方式中,方法还包括:
判断各个主机节点中是否包含训练任务所需的数据集缓存;
响应于判断有主机节点中存在数据集缓存,在包含数据集缓存的主机节点中选择执行训练任务的主机节点。
在本发明的基于数据集与节点缓存的调度方法的一些实施方式中,响应于接收到训练任务,获取训练任务的运行信息,根据运行信息和存储资源信息筛选满足训练任务所需空间的主机节点还包括:
响应于在主机节点中筛选出若干满足训练任务所需的空间的待定主机节点,基于调度策略在待定主机节点中选择执行训练任务的主机节点。
在本发明的基于数据集与节点缓存的调度方法的一些实施方式中,获取每个主机节点的存储资源信息还包括:
在集群内部署Kubernetes(K8s,容器集群管理系统)集群,基于Kubernetes集群获取主机节点的存储资源信息。
在本发明的基于数据集与节点缓存的调度方法的一些实施方式中,方法还包括:
监测主机节点中的存储资源信息是否发生变化;
响应于监测到主机节点中的存储资源信息发生变化,实时上报变化后的存储资源信息。
在本发明的基于数据集与节点缓存的调度方法的一些实施方式中,响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分还包括:
获取每个主机节点中所有数据集缓存的使用频率,根据使用频率获取所有数据集缓存中的废弃数据集缓存,根据废弃数据集缓存对主机节点打分。
在本发明的基于数据集与节点缓存的调度方法的一些实施方式中,响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分还包括:
判断每个主机节点中的每个数据集缓存的大小,将小于预设大小阈值的数据集缓存作为废弃数据集缓存,根据废弃数据集缓存对主机节点打分。
本发明实施例的另一方面,还提供了一种基于数据集与节点缓存的调度装置,该装置包括:
存储资源信息获取模块,存储资源信息获取模块配置为获取每个主机节点的存储资源信息;
主机节点筛选模块,主机节点筛选模块配置为响应于接收到训练任务,获取训练任务的运行信息,根据运行信息和存储资源信息筛选满足训练任务所需空间的主机节点;
主机节点打分模块,主机节点打分模块配置为响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分;
主机节点选定模块,主机节点选定模块配置为根据打分的结果在所有主机节点中选择用于执行训练任务的待执行主机节点;
训练任务执行模块,训练任务执行模块配置为获取并删除待执行主机节点中的废弃数据集缓存,并在待执行主机节点中执行训练任务。
在本发明的基于数据集与节点缓存的调度装置的一些实施方式中,装置还包括:
缓存判断模块,缓存判断模块配置为判断各个主机节点中是否包含训练任务所需的数据集缓存;响应于判断有主机节点中存在数据集缓存,在包含数据集缓存的主机节点中选择执行训练任务的主机节点。
在本发明的基于数据集与节点缓存的调度装置的一些实施方式中,主机节点筛选模块还配置为:
响应于在主机节点中筛选出若干满足训练任务所需的空间的待定主机节点,基于调度策略在待定主机节点中选择执行训练任务的主机节点。
本发明至少具有以下有益技术效果:本发明是在集群环境下,基于节点存储与训练任务所需数据集大小选择节点的一种调度策略,基于本发明,AI训练任务可以优先运行在存在所需数据集的主机节点或者节点存储空间充足的主机节点,同时在集群全部节点的剩余空间不足的时候,定义了一 种节点数据集缓存删除策略,可以将训练任务运行在存储空间暂时不足的主机节点。基于这种节点选择策略,可以有效降低下载数据集时间以及等待可用节点的实际,从而提高AI管理平台的竞争力。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1示出了根据本发明的基于数据集与节点缓存的调度方法的实施例的示意性框图;
图2示出了根据本发明的基于数据集与节点缓存的调度方法的实施例的流程图;
图3示出了根据本发明的基于数据集与节点缓存的调度装置的实施例的示意性框图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。
需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”和“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。
基于上述目的,本发明实施例的第一个方面,提出了一种基于数据集与节点缓存的调度方法的实施例。图1示出的是根据本发明的基于数据集 与节点缓存的调度方法的实施例的示意性框图。如图1所示的实施例中,该方法至少包括如下步骤:
S100、获取每个主机节点的存储资源信息;
S200、响应于接收到训练任务,获取训练任务的运行信息,根据运行信息和存储资源信息筛选满足训练任务所需空间的主机节点;
S300、响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分;
S400、根据打分的结果在所有主机节点中选择用于执行训练任务的待执行主机节点;
S500、获取并删除待执行主机节点中的废弃数据集缓存,并在待执行主机节点中执行训练任务。
在本发明的一些实施例中,图2示出的是根据本发明的基于数据集与主机节点(可简称为节点)缓存的调度方法的实施例的流程图,如图2所示,本发明是基于Kubernetes的调度器扩展机制,使用自研的节点agent(代理),将节点的全部数据集状态上报到调度器,同时调度器查询到AI资源管理平台的训练任务运行情况,根据节点剩余存储、数据集缓存大小、数据集缓存使用次数、数据集缓存清理策略等因素,对集群的节点进行打分,并将该打分与Kubernetes其他调度策略结合,从而选择最优的节点,用于运行训练任务。
在本发明的一些实施例中,根据步骤S100,采集节点的存储资源信息,包括存储空间node iDiskTotalSize、存储空闲空间node iDiskFreeSize、数据集节点缓存信息列表(数据集唯一标识dataSet jId、大小dataSet jSize、近一个月内的使用次数dataSet jUseNumber)。根据步骤S200,用户在资源管理平台提交训练任务,其中该训练任务的运行信息包括使用的数据集信息包括数据集名称、该任务(task)使用的数据集唯一标识dataSet taskId、该任务使用的数据 集大小dataSet taskSize,以及其他运行训练任务的基础资源信息(CPU、内存、GPU(graphics processing unit,图形处理器)等),调度器收到该训练任务的资源请求后,首先使用kubernetes默认的算法,筛选出CPU、内存、GPU卡充足的节点。根据步骤S300,当集群中全部节点的空间node iDiskFreeSize都不满足数据集所需空间dataSet jSize时,对于节点node i,当该节点不再使用的数据集节点缓存大于等于训练任务使用的数据集缓存大小时,即
Figure PCTCN2021109626-appb-000001
将该节点作为备选节点;对于节点node i上,选择需要删除哪些数据集节点缓存,对节点数据集缓存建立模型,根据模型对每个主机节点打分。根据步骤S400,根据打分的结果在所有主机节点中选择用于执行训练任务的合适的待执行主机节点。根据步骤S500,当资源调度模块选择到合适的节点后,将需要删除的数据集缓存列表通知到agent,agent进行数据集缓存的删除。由于删除操作为删除节点文件,下载数据集为从远端使用http(Hyper Text Transfer Protocol,超文本传输协议)服务下载,必然出现删除数据集缓存的速度远大于下载数据集缓存的速度。此时,将训练任务调度到该节点后,可以立即开始数据集的下载。
根据本发明的基于数据集与节点缓存的调度方法的一些实施方式,方法还包括:
判断各个主机节点中是否包含训练任务所需的数据集缓存;
响应于判断有主机节点中存在数据集缓存,在包含数据集缓存的主机节点中选择执行训练任务的主机节点。
在本发明的一些实施例中,对于集群中的主机节点,当主机节点已经存在该训练任务所需要的数据集(即主机节点存在该数据集缓存)时,优先使用该主机节点运行训练任务,从而避免再次下载数据集。当集群中全部节点都不存在该数据集的节点缓存时,选择节点剩余空间node iDiskFreeSize最大的节点下载数据集,并运行训练任务。
根据本发明的基于数据集与节点缓存的调度方法的一些实施方式,响应于接收到训练任务,获取训练任务的运行信息,根据运行信息和存储资源信息筛选满足训练任务所需空间的主机节点还包括:
响应于在主机节点中筛选出若干满足训练任务所需的空间的待定主机节点,基于调度策略在待定主机节点中选择执行训练任务的主机节点。
在本发明的一些实施例中,调度器收到该训练任务的资源请求后,首先使用kubernetes默认的算法,筛选出CPU、内存、GPU卡充足的节点。基于调度策略选择节点剩余空间dataSet jSize最大的节点下载数据集,并运行训练任务。
根据本发明的基于数据集与节点缓存的调度方法的一些实施方式,获取每个主机节点的存储资源信息还包括:
在集群内部署Kubernetes集群,基于Kubernetes集群获取主机节点的存储资源信息。
在本发明的一些实施例中,在集群内部署Kubernetes集群,并在每个主机节点部署自研的agent,用于采集节点的存储资源信息,包括存储空间node iDiskTotalSize、存储空闲空间node iDiskFreeSize、数据集节点缓存信息列表(数据集唯一标识dataSet jId、大小dataSet jSize、近一个月内的使用次数dataSet jUseNumber)。
根据本发明的基于数据集与节点缓存的调度方法的一些实施方式,方法还包括:
监测主机节点中的存储资源信息是否发生变化;
响应于监测到主机节点中的存储资源信息发生变化,实时上报变化后的存储资源信息。
在本发明的一些实施例中,在存储资源信息发生变化时,需要实时的将存储资源信息上报到资源调度模块,资源调度模块基于这些进行节点选 择以及数据集节点缓存删除策略。
根据本发明的基于数据集与节点缓存的调度方法的一些实施方式,响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分还包括:
获取每个主机节点中所有数据集缓存的使用频率,根据使用频率获取所有数据集缓存中的废弃数据集缓存,根据废弃数据集缓存对主机节点打分。
在本发明的一些实施例中,当集群中全部节点的空间node iDiskFreeSize都不满足数据集所需空间dataSet jSize时,对于节点node i,当该节点不再使用的数据集节点缓存大于等于训练任务使用的数据集缓存大小时,即
Figure PCTCN2021109626-appb-000002
将该节点作为备选节点;对于节点node i上,选择需要删除哪些数据集节点缓存,对节点数据集缓存建立模型:
当节点的数据集缓存dataset j近一个月的使用次数越多,表示该数据集未来一段时间被其他训练任务使用的可能性比较大,为了避免新的训练任务使用该数据集时,再次进行下载,因此在本次调度规则中,我们尽量不选择删除该数据集缓存,我们定义选择该数据集删除的权重值如下所示:
Figure PCTCN2021109626-appb-000003
根据本发明的基于数据集与节点缓存的调度方法的一些实施方式,响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分还包括:
判断每个主机节点中的每个数据集缓存的大小,将小于预设大小阈值的数据集缓存作为废弃数据集缓存,根据废弃数据集缓存对主机节点打分。
在本发明的一些实施例中,当数据集节点缓存的大小越大,为了降低 删除数据集节点缓存的时间,我们尽量不选择大的数据集缓存进行删除,即删除该大数据集缓存的可能性低,我们定义选择该数据集删除的权重值如下所示:
Figure PCTCN2021109626-appb-000004
在本发明的一些实施例中,对于节点数据集,我们按照以下公式进行计算,并排序:
Figure PCTCN2021109626-appb-000005
选择最小数量的前M个数据集,其中M满足以下条件:
Figure PCTCN2021109626-appb-000006
建立以节点待删除数据集缓存为因子的节点打分标准,优先选择使用分值较大的节点,如下所示:
Figure PCTCN2021109626-appb-000007
本发明实施例的另一方面,提出了一种基于数据集与节点缓存的调度装置的实施例。图3示出的是根据本发明的基于数据集与节点缓存的调度装置的实施例的示意性框图,如图3所示,该装置101包括:
存储资源信息获取模块11,存储资源信息获取模块配置为获取每个主机节点的存储资源信息;
主机节点筛选模块12,主机节点筛选模块配置为响应于接收到训练任务,获取训练任务的运行信息,根据运行信息和存储资源信息筛选满足训练任务所需空间的主机节点;
主机节点打分模块13,主机节点打分模块配置为响应于所有主机节点都不满足训练任务所需的空间,根据存储资源信息对每个主机节点打分;
主机节点选定模块14,主机节点选定模块配置为根据打分的结果在所有主机节点中选择用于执行训练任务的待执行主机节点;
训练任务执行模块15,训练任务执行模块配置为获取并删除待执行主机节点中的废弃数据集缓存,并在待执行主机节点中执行训练任务。
根据本发明的基于数据集与节点缓存的调度装置的一些实施方式,装置101还包括:
缓存判断模块(未示出),缓存判断模块配置为判断各个主机节点中是否包含训练任务所需的数据集缓存;响应于判断有主机节点中存在数据集缓存,在包含数据集缓存的主机节点中选择执行训练任务的主机节点。
根据本发明的基于数据集与节点缓存的调度装置的一些实施方式,主机节点筛选模块12还配置为:
响应于在主机节点中筛选出若干满足训练任务所需的空间的待定主机节点,基于调度策略在待定主机节点中选择执行训练任务的主机节点。
同样地,本领域技术人员应当理解,以上针对根据本发明的基于数据集与节点缓存的调度方法阐述的所有实施方式、特征和优势同样地适用于根据本发明的装置。为了本公开的简洁起见,在此不再重复阐述。
需要特别指出的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,基于数据集与节点缓存的调度方法的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,程序的存储介质可为磁碟、光盘、只读存储记忆体(ROM,Read-Only Memory)或随机存储记忆体(RAM,Random Access Memory)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现的功能,但是这种实现决定不应被解释为导致脱离本发明实施例公开的范围。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本发明实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。

Claims (10)

  1. 一种基于数据集与节点缓存的调度方法,其特征在于,所述方法包括:
    获取每个主机节点的存储资源信息;
    响应于接收到训练任务,获取所述训练任务的运行信息,根据所述运行信息和所述存储资源信息筛选满足所述训练任务所需空间的主机节点;
    响应于所有所述主机节点都不满足所述训练任务所需的空间,根据所述存储资源信息对每个所述主机节点打分;
    根据所述打分的结果在所有所述主机节点中选择用于执行所述训练任务的待执行主机节点;
    获取并删除所述待执行主机节点中的废弃数据集缓存,并在所述待执行主机节点中执行所述训练任务。
  2. 根据权利要求1所述的基于数据集与节点缓存的调度方法,其特征在于,所述方法还包括:
    判断各个所述主机节点中是否包含所述训练任务所需的数据集缓存;
    响应于判断有所述主机节点中存在所述数据集缓存,在包含所述数据集缓存的所述主机节点中选择执行所述训练任务的所述主机节点。
  3. 根据权利要求1所述的基于数据集与节点缓存的调度方法,其特征在于,所述响应于接收到训练任务,获取所述训练任务的运行信息,根据所述运行信息和所述存储资源信息筛选满足所述训练任务所需空间的主机节点还包括:
    响应于在所述主机节点中筛选出若干满足所述训练任务所需的空间的待定主机节点,基于调度策略在所述待定主机节点中选择执行所述训练任务的所述主机节点。
  4. 根据权利要求1所述的基于数据集与节点缓存的调度方法,其特征在 于,所述获取每个主机节点的存储资源信息还包括:
    在集群内部署Kubernetes集群,基于Kubernetes集群获取所述主机节点的存储资源信息。
  5. 根据权利要求1所述的基于数据集与节点缓存的调度方法,其特征在于,所述方法还包括:
    监测所述主机节点中的所述存储资源信息是否发生变化;
    响应于监测到所述主机节点中的所述存储资源信息发生变化,实时上报变化后的所述存储资源信息。
  6. 根据权利要求1所述的基于数据集与节点缓存的调度方法,其特征在于,所述响应于所有所述主机节点都不满足所述训练任务所需的空间,根据所述存储资源信息对每个所述主机节点打分还包括:
    获取每个所述主机节点中所有数据集缓存的使用频率,根据所述使用频率获取所有所述数据集缓存中的所述废弃数据集缓存,根据所述废弃数据集缓存对所述主机节点打分。
  7. 根据权利要求1所述的基于数据集与节点缓存的调度方法,其特征在于,所述响应于所有所述主机节点都不满足所述训练任务所需的空间,根据所述存储资源信息对每个所述主机节点打分还包括:
    判断每个所述主机节点中的每个数据集缓存的大小,将小于预设大小阈值的所述数据集缓存作为所述废弃数据集缓存,根据所述废弃数据集缓存对所述主机节点打分。
  8. 一种基于数据集与节点缓存的调度装置,其特征在于,所述装置包括:
    存储资源信息获取模块,所述存储资源信息获取模块配置为获取每个主机节点的存储资源信息;
    主机节点筛选模块,所述主机节点筛选模块配置为响应于接收到训练任务,获取所述训练任务的运行信息,根据所述运行信息和所述存储资源信息筛选满足所述训练任务所需空间的主机节点;
    主机节点打分模块,所述主机节点打分模块配置为响应于所有所述主机节点都不满足所述训练任务所需的空间,根据所述存储资源信息对每个所述主机节点打分;
    主机节点选定模块,所述主机节点选定模块配置为根据所述打分的结果在所有所述主机节点中选择用于执行所述训练任务的待执行主机节点;
    训练任务执行模块,所述训练任务执行模块配置为获取并删除所述待执行主机节点中的废弃数据集缓存,并在所述待执行主机节点中执行所述训练任务。
  9. 根据权利要求8所述的基于数据集与节点缓存的调度装置,其特征在于,所述装置还包括:
    缓存判断模块,所述缓存判断模块配置为判断各个所述主机节点中是否包含所述训练任务所需的数据集缓存;响应于判断有所述主机节点中存在所述数据集缓存,在包含所述数据集缓存的所述主机节点中选择执行所述训练任务的所述主机节点。
  10. 根据权利要求8所述的基于数据集与节点缓存的调度装置,其特征在于,所述主机节点筛选模块还配置为:
    响应于在所述主机节点中筛选出若干满足所述训练任务所需的空间的待定主机节点,
    基于调度策略在所述待定主机节点中选择执行所述训练任务的所述主机节点。
PCT/CN2021/109626 2020-09-04 2021-07-30 一种基于数据集与节点缓存的调度方法和装置 WO2022048365A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP21863433.5A EP4203437A4 (en) 2020-09-04 2021-07-30 DATASET AND NODE CACH-BASED PLANNING METHOD AND APPARATUS
KR1020237009278A KR20230093420A (ko) 2020-09-04 2021-07-30 데이터 세트 및 노드 캐시 기반의 스케줄링 방법 및 장치
US18/024,732 US11698863B1 (en) 2020-09-04 2021-07-30 Data set and node cache-based scheduling method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010923074.8 2020-09-04
CN202010923074.8A CN112202837B (zh) 2020-09-04 2020-09-04 一种基于数据集与节点缓存的调度方法和装置

Publications (1)

Publication Number Publication Date
WO2022048365A1 true WO2022048365A1 (zh) 2022-03-10

Family

ID=74006276

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/109626 WO2022048365A1 (zh) 2020-09-04 2021-07-30 一种基于数据集与节点缓存的调度方法和装置

Country Status (5)

Country Link
US (1) US11698863B1 (zh)
EP (1) EP4203437A4 (zh)
KR (1) KR20230093420A (zh)
CN (1) CN112202837B (zh)
WO (1) WO2022048365A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112202837B (zh) 2020-09-04 2022-05-17 苏州浪潮智能科技有限公司 一种基于数据集与节点缓存的调度方法和装置
CN112905325B (zh) * 2021-02-10 2023-01-10 山东英信计算机技术有限公司 一种分布式数据缓存加速训练的方法、系统及介质
CN112925640A (zh) * 2021-02-10 2021-06-08 杭州幻方人工智能基础研究有限公司 一种集群训练节点分配方法、电子设备
CN113094183B (zh) * 2021-06-09 2021-09-17 苏州浪潮智能科技有限公司 Ai训练平台的训练任务创建方法、装置、系统及介质
CN116339968A (zh) * 2021-12-24 2023-06-27 华为云计算技术有限公司 一种计算资源和缓存资源调度方法、装置及系统
CN115904673B (zh) * 2023-03-09 2023-06-27 华南师范大学 云计算资源并发调度方法、装置、系统、设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502487A (zh) * 2019-08-09 2019-11-26 苏州浪潮智能科技有限公司 一种缓存管理方法与装置
WO2020010251A1 (en) * 2018-07-06 2020-01-09 Big Squid Inc. Automated machine learning system
CN110795217A (zh) * 2019-09-27 2020-02-14 广东浪潮大数据研究有限公司 一种基于资源管理平台的任务分配方法及系统
CN111158852A (zh) * 2019-12-14 2020-05-15 苏州浪潮智能科技有限公司 一种训练资源动态分配方法、系统、终端及存储介质
CN111444019A (zh) * 2020-03-31 2020-07-24 中国科学院自动化研究所 云端协同的深度学习模型分布式训练方法及系统
CN112202837A (zh) * 2020-09-04 2021-01-08 苏州浪潮智能科技有限公司 一种基于数据集与节点缓存的调度方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10666730B2 (en) * 2017-10-28 2020-05-26 Tusimple, Inc. Storage architecture for heterogeneous multimedia data
US10893120B2 (en) * 2018-09-19 2021-01-12 International Business Machines Corporation Data caching and data-aware placement to accelerate machine learning applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020010251A1 (en) * 2018-07-06 2020-01-09 Big Squid Inc. Automated machine learning system
CN110502487A (zh) * 2019-08-09 2019-11-26 苏州浪潮智能科技有限公司 一种缓存管理方法与装置
CN110795217A (zh) * 2019-09-27 2020-02-14 广东浪潮大数据研究有限公司 一种基于资源管理平台的任务分配方法及系统
CN111158852A (zh) * 2019-12-14 2020-05-15 苏州浪潮智能科技有限公司 一种训练资源动态分配方法、系统、终端及存储介质
CN111444019A (zh) * 2020-03-31 2020-07-24 中国科学院自动化研究所 云端协同的深度学习模型分布式训练方法及系统
CN112202837A (zh) * 2020-09-04 2021-01-08 苏州浪潮智能科技有限公司 一种基于数据集与节点缓存的调度方法和装置

Also Published As

Publication number Publication date
CN112202837B (zh) 2022-05-17
KR20230093420A (ko) 2023-06-27
CN112202837A (zh) 2021-01-08
EP4203437A1 (en) 2023-06-28
EP4203437A4 (en) 2023-09-20
US11698863B1 (en) 2023-07-11
US20230244605A1 (en) 2023-08-03

Similar Documents

Publication Publication Date Title
WO2022048365A1 (zh) 一种基于数据集与节点缓存的调度方法和装置
US10216741B2 (en) Managing a computerized database using a volatile database table attribute
US20080052331A1 (en) Data arrangement management system, method, and program
CN107197053A (zh) 一种负载均衡方法和装置
WO2023109015A1 (zh) 一种容器应用调度方法、装置、电子设备及存储介质
RU2571562C2 (ru) Способ, устройство и система для переноса ресурса
US11093496B1 (en) Performance-based query plan caching
WO2022095427A1 (zh) Redis缓存管理的方法、装置、计算机设备及存储介质
WO2022052659A1 (zh) 一种限速队列提交训练任务的方法和装置
US20230153100A1 (en) Method and apparatus for managing model file in inference application
US11429629B1 (en) Data driven indexing in a spreadsheet based data store
US9749180B2 (en) Tuning LDAP server and directory database
Zhang et al. Zeus: Improving resource efficiency via workload colocation for massive kubernetes clusters
US8922828B2 (en) Determining scan priority of documents
JP2009217463A (ja) 情報処理装置、情報処理プログラム及び方法
WO2020211363A1 (zh) 提高程序加载效率的方法、装置、计算机设备和存储介质
US10885038B2 (en) System and method for adaptive information storage management
CN112905325B (zh) 一种分布式数据缓存加速训练的方法、系统及介质
CN114356714A (zh) 基于Kubernetes智能板卡集群的资源集成监控与调度装置
WO2021210123A1 (ja) スケジューリング方法、スケジューラ、gpuクラスタシステムおよびプログラム
CN113110804A (zh) 重复图片删除方法、装置、设备及存储介质
CN114365112A (zh) 标签数据的更新方法、装置、电子设备及存储介质
WO2024119793A1 (zh) 基于缓存亲和的调度方法、系统、设备及介质
CN115840770B (zh) 基于分布式环境下的本地缓存数据处理方法和相关设备
JP6799501B2 (ja) 計算機システム及びデータの分析方法

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021863433

Country of ref document: EP

Effective date: 20230321

NENP Non-entry into the national phase

Ref country code: DE