CN110308981A - 一种基于组合预测模型的Swarm集群调度算法 - Google Patents

一种基于组合预测模型的Swarm集群调度算法 Download PDF

Info

Publication number
CN110308981A
CN110308981A CN201910625563.2A CN201910625563A CN110308981A CN 110308981 A CN110308981 A CN 110308981A CN 201910625563 A CN201910625563 A CN 201910625563A CN 110308981 A CN110308981 A CN 110308981A
Authority
CN
China
Prior art keywords
model
prediction
node
linear regression
combination forecasting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910625563.2A
Other languages
English (en)
Other versions
CN110308981B (zh
Inventor
孙宁
万拥
王彬
李昌澔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changzhou Campus of Hohai University
Original Assignee
Changzhou Campus of Hohai University
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 Changzhou Campus of Hohai University filed Critical Changzhou Campus of Hohai University
Priority to CN201910625563.2A priority Critical patent/CN110308981B/zh
Publication of CN110308981A publication Critical patent/CN110308981A/zh
Application granted granted Critical
Publication of CN110308981B publication Critical patent/CN110308981B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/13Differential equations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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/505Allocation 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 the load
    • 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/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

本发明提供了一种基于组合预测模型的Swarm集群调度算法。针对传统的一元线性回归模型和灰色模型的预测准确度相对较低的缺点,综合考虑Swarm集群内置调度策略存在的问题,将两种预测模型相结合,建立一种将两个权值进行加权综合计算形成组合优化的预测模型。本发明中的组合预测模型优于传统一元线性回归模型和灰色模型,具有较高的预测准确度。

Description

一种基于组合预测模型的Swarm集群调度算法
技术领域
本发明属于集群调度领域,特别涉及一种基于组合预测模型的Swarm集群调度算法。
背景技术
Docker在云生态中占有重要地位,Swarm在云架构PaaS(平台及服务)/IaaS(基础设施及服务)层中也占有重要地位。Swarm主要完成的工作是:根据调度策略将容器运行在合适的节点上,由于节点上运行容器的不同,其资源利用率也有所差别。而每个节点的资源利用率又决定了整个集群的负载情况。因此,集群调度策略的优略就显得尤为重要。、
Swarm内置的调度策略有三种,分别是Random(随机),Spread(扩散)和Binpack(装箱),Random策略的优点是实施简单,但经常容易导致节点CPU过载和内存不足。采用Spread策略,虽然能够减少因节点故障而损坏容器数量,但这种策略过多的占用了服务器资源。Binpack的优点是能将更多的容器运行在较少的节点上,但是会造成节点负载过重。
目前Docker Swarm提供的资源调度策略比较简单,只考虑节点能否满足任务要求和节点上的容器数量,没有在节点之间进行负载比较来选出最合适的节点来部署容器,因此会出现节点上资源使用率不均衡的情况。
针对上述问题,在传统的一元线性回归模型和灰色模型基础上提出了一种基于组合预测模型的Swarm集群调度算法,使集群中节点负载更加均衡,同时提高集群的整体资源利用率。
发明内容
针对Swarm集群提供的资源调度策略比较简单,会出现节点上资源使用率不均衡的情况,提供一种基于组合预测模型的Swarm集群调度算法。
本发明这个算法不仅可以达到使集群中节点负载更加均衡,同时提高集群的整体资源利用率。
为了实现以上目的,本发明采用的技术方案为一种基于组合预测模型的Swarm集群调度算法,本发明包含以下内容:
步骤1)根据一元线性回归模型对节点的CPU和内存的预测值进行权值计算;
步骤2)根据灰色模型对节点的CPU和内存预测值求和得到节点权值;
步骤3)假定计算出一元线性回归模型和灰色预测模型的最优权值,将两个权值进行加权综合计算形成组合优化的预测模型;
步骤4)检查是否所有时刻计算完毕,如果没有则循环计算下一时刻,直至最后时刻;
步骤5)选择权值最小的节点分配容器,一次调度结束。
进一步地,所述步骤1)具体包括以下步骤:
步骤11)分别获取当前节点的CPU利用率和内存利用率的时间序列;
步骤12)由于每个真实值和预测值的随机误差相互独立,并且服从同一分布,即求得一元线性回归方程;
步骤13)通过预测时间获得预测值;
步骤14)根据一元线性回归预测模型进行精度检验,评估预测模型是否符合要求,若没有达到要求,将缩小样本集,再返回到步骤12);
步骤15)采用Swarm内置的方法对节点的CPU和内存预测至进行权值计算。
进一步地,所述步骤2)具体包括以下步骤:
步骤21)首先分别获取当前节点的CPU利用率和内存利用率的时间序列,根据n个原始数据进行累加得到一次处理的数据序列;
步骤22)根据灰色预测方法,得出GM(1,1)模型相应的一阶微分方程;
步骤23)通过最小二乘法对微分方程进行求解获得预测模型;
步骤24)根据预测模型进行累减操作得到预测值;
步骤25)对预测模型进行残差检查,判断是否达到较高要求;
步骤26)对n+1时间节点的CPU和内存预测值求和得到节点的动态权值。
进一步地,所述步骤3)具体包括如下步骤:
步骤31)设y(t)(t=1,2)为预测对象,假定y(1)为一元线性回归模型,y(2)为灰色预测模型;y1(t)表示在t时刻一元线性回归模型的预测值,y2(t)表示在t时刻灰色预测模型的预测值;
步骤32)模型在t时刻的预测误差为:
eit=y(t)-yi(t),i=1,2;t=1,2,...,n;
预测误差矩阵为:E=[(eit)m×n][(eit)m×n]T
步骤33)设一元线性回归模型和灰色预测模型的加权系数W=(w1,w2)T,w1表示为一元线性回归模型的加权系数,w2表示为灰色模型的加权系数,则组合预测模型表示为:
组合预测模型的预测误差在t时刻的值为:
即组合预测模型的误差平方和为:
步骤34)以模型的误差平方和最小为基础求得组合权值;
其中,minS=WTEW,RTW=1,RT=(1 1)1x2
求得组合预测模型的最优权系数W的最优解。
总体而言,通过本发明构思的以上技术方案与现有技术相比,具有以下技术特征及有益效果:
本发明技术使用了组合预测模型,可以根据节点的资源使用历史,预测出未来的资源使用量,使得预测结果更加逼近实测值,具有较高的准确度。
本发明技术不仅使集群中节点负载更加均衡,同时提高集群的整体资源利用率和节点效益。
附图说明
图1是本发明提供的一种基于组合预测模型的Swarm集群调度算法的流程图。
图2是一元线性回归模型预测流程图。
图3是灰色预测模型流程图。
具体实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细的说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。
如图1所示,本发明基于组合预测模型的Swarm集群调度算法包括以下步骤;
步骤1)根据一元线性回归模型对节点的CPU和内存的预测值进行权值计算;
步骤2)根据灰色模型对节点的CPU和内存预测值求和得到节点权值;
步骤3)假定计算出一元线性回归模型和灰色预测模型的最优权值,将两个权值进行加权综合计算形成组合优化的预测模型;
步骤4)检查是否所有时刻计算完毕,如果没有则循环计算下一时刻,直至最后时刻;
步骤5)选择权值最小的节点分配容器,一次调度结束。
如图2所示步骤2)具体流程,具体包括:
步骤21)首先分别获取当前节点的CPU利用率和内存利用率的时间序列,根据n个原始数据进行累加得到一次处理的数据序列;
步骤22)根据灰色预测方法,得出GM(1,1)模型相应的一阶微分方程;
步骤23)通过最小二乘法对微分方程进行求解获得预测模型;
步骤24)根据预测模型进行累减操作得到预测值;
步骤25)对预测模型进行残差检查,判断是否达到较高要求;
步骤26)对n+1时间节点的CPU和内存预测值求和得到节点的动态权值。
如图3所示步骤3)具体流程,具体包括:
步骤31)设y(t)(t=1,2)为预测对象,假定y(1)为一元线性回归模型,y(2)为灰色预测模型。
y1(t)表示在t时刻一元线性回归模型的预测值,y2(t)表示在t时刻灰色预测模型的预测值;
步骤32)模型在t时刻的预测误差为:
eit=y(t)-yi(t),i=1,2;t=1,2,...,n;
预测误差矩阵为:E=[(eit)m×n][(eit)m×n]T
步骤33)设一元线性回归模型和灰色预测模型的加权系数W=(w1,w2)T,w1表示为一元线性回归模型的加权系数,w2表示为灰色模型的加权系数,则组合预测模型表示为:
组合预测模型的预测误差在t时刻的值为;
即组合预测模型的误差平方和为:
步骤34)以模型的误差平方和最小为基础求得组合权值;
其中,minS=WTEW,RTW=1,RT=(1 1)1x2
求得组合预测模型的最优权系数W的最优解。
本发明采用了组合预测模型解决了一元回归线性模型和灰色预测模型预测准确度较低等问题,一种基于组合预测模型的Swarm集群调度算法使集群中节点负载更加均衡,同时提高集群的整体资源利用率和节点效益。

Claims (4)

1.一种基于组合预测模型的Swarm集群调度算法,其特征在于,所述方法包括以下步骤:
步骤1)根据一元线性回归模型对节点的CPU和内存的预测值进行权值计算;
步骤2)根据灰色模型对节点的CPU和内存预测值求和得到节点权值;
步骤3)假定计算出一元线性回归模型和灰色预测模型的最优权值,将两个权值进行加权综合计算形成组合优化的预测模型;
步骤4)检查是否所有时刻计算完毕,如果没有则循环计算下一时刻,直至最后时刻;
步骤5)选择权值最小的节点分配容器,一次调度结束。
2.根据权利要求1所述的一种基于组合预测模型的Swarm集群调度算法,其特征在于:所述步骤1)的具体步骤如下:
步骤11)分别获取当前节点的CPU利用率和内存利用率的时间序列;
步骤12)由于每个真实值和预测值的随机误差相互独立,并且服从同一分布,即求得一元线性回归方程;
步骤13)通过预测时间获得预测值;
步骤14)根据一元线性回归预测模型进行精度检验,评估预测模型是否符合要求,若没有达到要求,将缩小样本集,再返回到步骤12);
步骤15)采用Swarm内置的方法对节点的CPU和内存预测至进行权值计算。
3.根据权利要求1所述的一种基于组合预测模型的Swarm集群调度算法,其特征在于:所述步骤2)具体包括如下步骤:
步骤21)首先分别获取当前节点的CPU利用率和内存利用率的时间序列,根据n个原始数据进行累加得到一次处理的数据序列;
步骤22)根据灰色预测方法,得出GM(1,1)模型相应的一阶微分方程;
步骤23)通过最小二乘法对微分方程进行求解获得预测模型;
步骤24)根据预测模型进行累减操作得到预测值;
步骤25)对预测模型进行残差检查,判断是否达到较高要求;
步骤26)对n+1时间节点的CPU和内存预测值求和得到节点的动态权值。
4.根据权利要求1所述的一种基于组合预测模型的Swarm集群调度算法,其特征在于:所述步骤3)具体包括如下步骤:
步骤31)设y(t)(t=1,2)为预测对象,假定y(1)为一元线性回归模型,y(2)为灰色预测模型;y1(t)表示在t时刻一元线性回归模型的预测值,y2(t)表示在t时刻灰色预测模型的预测值;
步骤32)模型在t时刻的预测误差为:
eit=y(t)-yi(t),i=1,2;t=1,2,...,n;
预测误差矩阵为:E=[(eit)m×n][(eit)m×n]T
步骤33)设一元线性回归模型和灰色预测模型的加权系数W=(w1,w2)T,w1表示为一元线性回归模型的加权系数,w2表示为灰色模型的加权系数,则组合预测模型表示为:
组合预测模型的预测误差在t时刻的值为:
即组合预测模型的误差平方和为:
步骤34)以模型的误差平方和最小为基础求得组合权值;
其中,min S=WTEW,RTW=1,RT=(1 1)1x2
求得组合预测模型的最优权系数W的最优解。
CN201910625563.2A 2019-07-11 2019-07-11 一种基于组合预测模型的Swarm集群调度方法 Active CN110308981B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910625563.2A CN110308981B (zh) 2019-07-11 2019-07-11 一种基于组合预测模型的Swarm集群调度方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910625563.2A CN110308981B (zh) 2019-07-11 2019-07-11 一种基于组合预测模型的Swarm集群调度方法

Publications (2)

Publication Number Publication Date
CN110308981A true CN110308981A (zh) 2019-10-08
CN110308981B CN110308981B (zh) 2023-05-16

Family

ID=68080064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910625563.2A Active CN110308981B (zh) 2019-07-11 2019-07-11 一种基于组合预测模型的Swarm集群调度方法

Country Status (1)

Country Link
CN (1) CN110308981B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400045A (zh) * 2020-03-16 2020-07-10 杭州海康威视系统技术有限公司 一种负载均衡方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020434A (zh) * 2012-11-30 2013-04-03 南京航空航天大学 一种基于粒子群优化的最小二乘支持向量机组合预测方法
CN105636081A (zh) * 2016-01-26 2016-06-01 大连理工大学 基于灰色模型预测的east改进算法
CN107590562A (zh) * 2017-09-05 2018-01-16 西安交通大学 一种基于变权组合预测法的电力负荷短期预测方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020434A (zh) * 2012-11-30 2013-04-03 南京航空航天大学 一种基于粒子群优化的最小二乘支持向量机组合预测方法
CN105636081A (zh) * 2016-01-26 2016-06-01 大连理工大学 基于灰色模型预测的east改进算法
CN107590562A (zh) * 2017-09-05 2018-01-16 西安交通大学 一种基于变权组合预测法的电力负荷短期预测方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400045A (zh) * 2020-03-16 2020-07-10 杭州海康威视系统技术有限公司 一种负载均衡方法及装置
CN111400045B (zh) * 2020-03-16 2023-09-05 杭州海康威视系统技术有限公司 一种负载均衡方法及装置

Also Published As

Publication number Publication date
CN110308981B (zh) 2023-05-16

Similar Documents

Publication Publication Date Title
CN110489229B (zh) 一种多目标任务调度方法及系统
CN110110930B (zh) 一种改进鲸鱼算法的循环神经网络短期电力负荷预测方法
CN109561148A (zh) 边缘计算网络中基于有向无环图的分布式任务调度方法
CN108734355A (zh) 一种应用于电能质量综合治理场景的短期电力负荷并行预测方法及系统
CN111274036B (zh) 一种基于速度预测的深度学习任务的调度方法
CN109548031B (zh) 一种非平衡边缘云网络接入与资源分配方法
CN107426332A (zh) 一种web服务器集群的负载均衡方法及系统
CN110225096B (zh) 基于遗传算法的服务器负载均衡方法
CN110490429A (zh) 基于ssa算法智能楼宇微电网家用负荷快速调度方法
CN104899100A (zh) 一种用于云系统的资源调度方法
Budipriyanto et al. A simulation study of collaborative approach to berth allocation problem under uncertainty
CN105787603A (zh) 一种考虑需求侧资源的电网负荷预测方法和装置
CN109783235A (zh) 一种基于最大熵原理的负载均衡调度方法
CN115689069B (zh) 基于人工智能的电网调度控制方法及系统
CN110308981A (zh) 一种基于组合预测模型的Swarm集群调度算法
Zhang et al. Quantified edge server placement with quantum encoding in internet of vehicles
CN105245405B (zh) 一种面向数据交换的云迁移优化评估方法
Tungom et al. Hierarchical framework for demand prediction and iterative optimization of EV charging network infrastructure under uncertainty with cost and quality-of-service consideration
Fan et al. Energy management of renewable based power grids using artificial intelligence: Digital twin of renewables
CN111586607B (zh) 基于改进灰狼算法的智能电表无线传感器网络布局方法
CN113139639A (zh) 一种基于mombi面向智慧城市应用多目标计算迁移方法和装置
CN115576856B (zh) 能耗评估方法及装置
CN105976057A (zh) 一种基于改进灰色理论的中长期负荷预测方法
CN116384251A (zh) 一种考虑风险规避的新能源发电功率组合预测方法及系统
Ma et al. Proposed model employing ARIMA and RELM in urban energy consumption prediction

Legal Events

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