CN107315643A - A kind of container resource regulating method - Google Patents
A kind of container resource regulating method Download PDFInfo
- Publication number
- CN107315643A CN107315643A CN201710485306.4A CN201710485306A CN107315643A CN 107315643 A CN107315643 A CN 107315643A CN 201710485306 A CN201710485306 A CN 201710485306A CN 107315643 A CN107315643 A CN 107315643A
- Authority
- CN
- China
- Prior art keywords
- node
- score
- judge whether
- regulating method
- container
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation 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/5044—Allocation 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Abstract
The invention provides a kind of container resource regulating method, described method comprises the following steps:S1:Node is scored;S2:Select the node of highest scoring.By above-mentioned setting, on the premise of resource allows, the time needed for the bandwidth and download mirror image of network transmission mirror image, the operational efficiency of the system of lifting, it is ensured that the service quality of system are saved.
Description
Technical field
The present invention relates to field of cloud computer technology, specifically a kind of container resource regulating method.
Background technology
With becoming increasingly popular for container technique fast development in cloud computing and container technique, increasing enterprise participates in
To among container technique, the usage amount of container increases year by year in cloud computing infrastructure and service, and container technique has triggered letter
The new round revolution of breath technology.At present, the distribution for container resource mainly uses following several ways:A kind of method of salary distribution is
Distributed according to the sequencing of instruction is connected to, the size of resource needed for this mode does not account for different vessels itself, easily
Cause the wasting of resources;Another method of salary distribution is distributed according to the difference of container perform function, under this mode, although certain
The configuration of resource is realized in degree, but container is not changeless, the function of execution is also different, therefore in money
Also there can be the problem of wasting in the configuration of source.
The content of the invention
In order to solve the above problems there is provided a kind of container resource regulating method, different container allocation phases can be directed to
The resource answered, substantially increases the utilization rate of resource.
A kind of specific embodiment of the present invention uses following technical scheme:
A kind of container resource regulating method, described method comprises the following steps:
S1:Node is scored;
S2:Select the node of highest scoring.
Further, described method also includes:
S0:The size of decision node own resource, removes the node that own resource is less than setting value.
Further, the size of setting value is 100M.
Further, the S1 process that implements is:
S11:Set mirror image higher limit max;
S12:Obtain the required mirror value X1 of application;
S13:Obtain certain node itself mirror value X2;
S14:Judge whether X1 is more than X2, if so, then node score score=0;If it is not, into S15;
S15:Judge whether X2 is more than max, if so, then node score score=100;If it is not, into S16;
S16:The node score is calculated according to formula score=100* (X2-X1)/(max-X1);
S17:Repeat step S13-S16, obtains the score of each node.
Further, described method also includes:
S3:Judge whether the number of nodes of highest scoring is more than 1, if so, into S4, if it is not, selecting the node;
S4:One of node is randomly choosed by system and carries out resource allocation.
Further, described method also includes:
S3:Judge whether the number of nodes of highest scoring is more than 1, if so, into S4, if it is not, selecting the node;
S4:Judge whether best result is equal to 100 points, if so, into S5, if it is not, by the one of section of system random selection
Point carries out resource allocation;
S5:Judge whether the node mirror value of highest scoring is identical, enter if so, randomly choosing one of node by system
Row resource allocation;If it is not, into S6;
S6:Select mirror value highest node.
A kind of beneficial effect of specific embodiment of the present invention is:
1st, the mirror image size to node is given a mark, and mirror image is bigger, and the marking of main frame is higher, and selects fraction highest node simultaneously
Carry out resource allocation.By above-mentioned setting, on the premise of resource allows, bandwidth and the download of network transmission mirror image are saved
Time needed for mirror image, the operational efficiency of the system of lifting, it is ensured that the service quality of system.
2nd, before marking, the too small node of own resource is removed in advance, the number of nodes for needing to score is reduced, improved
The efficiency of whole scoring.
3rd, by carrying out segmentation judgement to scoring step, calculative number of nodes is further reduced, at utmost
Improve the efficiency of score calculation.
4th, it is a kind of directly to randomly choose there is provided two kinds of methods selected for subsequent node, simplify setting up procedure;Separately
One kind segmentation judges that the optimal selection in final choice best result improves selection quality.
Brief description of the drawings
Fig. 1 is the method flow diagram of an embodiment of the present invention;
Fig. 2 is the method flow diagram of another embodiment of the invention.
Embodiment
In order that those skilled in the art better understood when, the present invention be realized, below by specific embodiment pair
The present invention is described in detail.
The explanation of several nouns:
Container is isolation and division to host calculating resource (CPU, internal memory, disk or network etc.), such as Docker.
Mirror image is the mirror image of similar operations system, including a system that can completely run, operating system, infrastructure component,
Application program can be packaged in a mirror image.Container relies on mirror image and could run.
Using being the program that operates in " container ".
Node, refers to the container for including some mirror images.
Embodiment 1
It is as shown in Figure 1 a kind of specific embodiment there is provided a kind of container resource regulating method, this method includes following step
Suddenly:
S1:Node is scored, the process of implementing is:
S11:Mirror image higher limit max is set, in actual applications, max can be set to 2G, that is, 2048M;
S12:Obtain the required mirror value X1 of application;
S13:Obtain certain node itself mirror value X2;
S14:Judge whether X1 is more than X2, if so, then node score score=0;If it is not, into S15;
S15:Judge whether X2 is more than max, if so, then node score score=100;If it is not, into S16;
S16:The node score is calculated according to formula score=100* (X2-X1)/(max-X1);
S17:Repeat step S13-S16, obtains the score of each node.
S2:Select the node of highest scoring.
S3:Judge whether the number of nodes of highest scoring is more than 1, if so, into S4, if it is not, selecting the node.
S4:One of node is randomly choosed by system and carries out resource allocation.
Embodiment 2
A kind of specific embodiment is illustrated in figure 2 there is provided a kind of container resource regulating method, this method includes following step
Suddenly:
S1:Node is scored, the process of implementing is:
S11:Set mirror image higher limit max in actual applications, max can be set to 2G, that is, 2048M;
S12:Obtain the required mirror value X1 of application;
S13:Obtain certain node itself mirror value X2;
S14:Judge whether X1 is more than X2, if so, then node score score=0;If it is not, into S15;
S15:Judge whether X2 is more than max, if so, then node score score=100;If it is not, into S16;
S16:The node score is calculated according to formula score=100* (X2-X1)/(max-X1);
S17:Repeat step S13-S16, obtains the score of each node.
S2:Select the node of highest scoring.
S3:Judge whether the number of nodes of highest scoring is more than 1, if so, into S4, if it is not, selecting the node.
S4:Judge whether best result is equal to 100 points, if so, into S5, if it is not, by the one of section of system random selection
Point carries out resource allocation.
S5:Judge whether the node mirror value of highest scoring is identical, enter if so, randomly choosing one of node by system
Row resource allocation;If it is not, into S6.
S6:Select mirror value highest node.
Embodiment 3
On the basis of embodiment 1, the following steps are increased before step S1:
S0:The size of decision node own resource, removes the node that own resource is less than setting value.
By setting steps S0, complete undesirable node can be removed in advance before scoring, needs are reduced and comment
The number of nodes divided, improves efficiency.In actual application, an example is given, setting value is dimensioned to 100M.
Embodiment 4
On the basis of embodiment 2, the following steps are increased before step S1:
S0:The size of decision node own resource, removes the node that own resource is less than setting value.
By setting steps S0, complete undesirable node can be removed in advance before scoring, needs are reduced and comment
The number of nodes divided, improves efficiency.In actual application, an example is given, setting value is dimensioned to 100M.
Although specification and drawings and examples have been carried out detailed description to the invention, this area skill
Art personnel should be appreciated that still can modify or equivalent substitution to the invention;And all do not depart from wound of the present invention
The technical scheme for the spirit and scope made and its improvement, it is encompassed by among the protection domain of the invention patent.
Claims (6)
1. a kind of container resource regulating method, it is characterised in that described method comprises the following steps:
S1:Node is scored;
S2:Select the node of highest scoring.
2. a kind of container resource regulating method according to claim 1, it is characterised in that described method also includes:
S0:The size of decision node own resource, removes the node that own resource is less than setting value.
3. a kind of container resource regulating method according to claim 2, it is characterised in that the size of setting value is 100M.
4. a kind of container resource regulating method according to claim 1 or 2, it is characterised in that S1's implements process
For:
S11:Set mirror image higher limit max;
S12:Obtain the required mirror value X1 of application;
S13:Obtain certain node itself mirror value X2;
S14:Judge whether X1 is more than X2, if so, then node score score=0;If it is not, into S15;
S15:Judge whether X2 is more than max, if so, then node score score=100;If it is not, into S16;
S16:The node score is calculated according to formula score=100* (X2-X1)/(max-X1);
S17:Repeat step S13-S16, obtains the score of each node.
5. a kind of container resource regulating method according to claim 4, it is characterised in that described method also includes:
S3:Judge whether the number of nodes of highest scoring is more than 1, if so, into S4, if it is not, selecting the node;
S4:One of node is randomly choosed by system and carries out resource allocation.
6. a kind of container resource regulating method according to claim 4, it is characterised in that described method also includes:
S3:Judge whether the number of nodes of highest scoring is more than 1, if so, into S4, if it is not, selecting the node;
S4:Judge whether best result is equal to 100 points, if so, into S5, entering if it is not, randomly choosing one of node by system
Row resource allocation;
S5:Judge whether the node mirror value of highest scoring is identical, provided if so, randomly choosing one of node by system
Source is distributed;If it is not, into S6;
S6:Select mirror value highest node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710485306.4A CN107315643A (en) | 2017-06-23 | 2017-06-23 | A kind of container resource regulating method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710485306.4A CN107315643A (en) | 2017-06-23 | 2017-06-23 | A kind of container resource regulating method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107315643A true CN107315643A (en) | 2017-11-03 |
Family
ID=60179601
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710485306.4A Pending CN107315643A (en) | 2017-06-23 | 2017-06-23 | A kind of container resource regulating method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107315643A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109582452A (en) * | 2018-11-27 | 2019-04-05 | 北京邮电大学 | A kind of container dispatching method, dispatching device and electronic equipment |
CN109951551A (en) * | 2019-03-21 | 2019-06-28 | 联想(北京)有限公司 | A kind of container mirror image management system and method |
CN110968424A (en) * | 2019-09-12 | 2020-04-07 | 广东浪潮大数据研究有限公司 | Resource scheduling method, device and storage medium based on K8s |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8989053B1 (en) * | 2013-11-29 | 2015-03-24 | Fedex Corporate Services, Inc. | Association management in a wireless node network |
CN105827548A (en) * | 2016-03-30 | 2016-08-03 | 乐视控股(北京)有限公司 | Resource scheduling method and apparatus |
CN106027643A (en) * | 2016-05-18 | 2016-10-12 | 无锡华云数据技术服务有限公司 | Resource scheduling method based on Kubernetes container cluster management system |
CN106664507A (en) * | 2014-05-28 | 2017-05-10 | 联邦快递服务公司 | Node-enabled delivery notification using elements of a wireless node network |
-
2017
- 2017-06-23 CN CN201710485306.4A patent/CN107315643A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8989053B1 (en) * | 2013-11-29 | 2015-03-24 | Fedex Corporate Services, Inc. | Association management in a wireless node network |
CN106664507A (en) * | 2014-05-28 | 2017-05-10 | 联邦快递服务公司 | Node-enabled delivery notification using elements of a wireless node network |
CN105827548A (en) * | 2016-03-30 | 2016-08-03 | 乐视控股(北京)有限公司 | Resource scheduling method and apparatus |
CN106027643A (en) * | 2016-05-18 | 2016-10-12 | 无锡华云数据技术服务有限公司 | Resource scheduling method based on Kubernetes container cluster management system |
Non-Patent Citations (1)
Title |
---|
刘辉扬: "基于Docker的容器监控和调度的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109582452A (en) * | 2018-11-27 | 2019-04-05 | 北京邮电大学 | A kind of container dispatching method, dispatching device and electronic equipment |
CN109951551A (en) * | 2019-03-21 | 2019-06-28 | 联想(北京)有限公司 | A kind of container mirror image management system and method |
CN109951551B (en) * | 2019-03-21 | 2021-03-19 | 联想(北京)有限公司 | Container mirror image management system and method |
CN110968424A (en) * | 2019-09-12 | 2020-04-07 | 广东浪潮大数据研究有限公司 | Resource scheduling method, device and storage medium based on K8s |
CN110968424B (en) * | 2019-09-12 | 2023-04-07 | 广东浪潮大数据研究有限公司 | Resource scheduling method, device and storage medium based on K8s |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230376347A1 (en) | Task allocation method, apparatus, storage medium, and electronic device | |
CN107347205B (en) | A kind of network slice selection method, apparatus and system | |
US20180206010A1 (en) | Computing infrastructure optimizations based on tension levels between computing infrastructure nodes | |
US20180018197A1 (en) | Virtual Machine Resource Allocation Method and Apparatus | |
CN107315643A (en) | A kind of container resource regulating method | |
CN105306241A (en) | Service deployment method and network function acceleration platform | |
CN112346833B (en) | Task processing method and processor for privacy computation and heterogeneous processing system | |
CN109819046A (en) | A kind of Internet of Things virtual computing resource dispatching method based on edge cooperation | |
CN111552550A (en) | Task scheduling method, device and medium based on GPU (graphics processing Unit) resources | |
CN109361547B (en) | Network slice link deployment method and device | |
CN109189494B (en) | Configuration gray level publishing method, device and equipment and computer readable storage medium | |
CN108021369A (en) | A kind of data integration processing method and relevant apparatus | |
CN106162507A (en) | A kind of virtualize the flexible management method of network function and device | |
CN109603149A (en) | Method of data synchronization and device | |
CN109272526B (en) | Image processing method and system and electronic equipment | |
CN106406650B (en) | A kind of icon display method and equipment | |
CN104462322B (en) | Character string comparison method and device | |
CN110544159B (en) | Map information processing method and device, readable storage medium and electronic equipment | |
CN112584422A (en) | 5G terminal performance obtaining method and device | |
CN104778411A (en) | Virus scanning method and virus scanning device | |
CN105653347A (en) | Server, resource management method and virtual machine manager | |
CN110493365A (en) | A kind of common-use tunnel method for switching network and device | |
CN110224863A (en) | A kind of file accelerates method for down loading and device | |
KR102356914B1 (en) | Method for automatically creation of metadata, and computer program recorded on record-medium for executing method therefor | |
KR102313942B1 (en) | annotation method including object tracking data, and computer program recorded on record-medium for executing method thereof |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200526 Address after: 250101 floor 27, S01, Inspur Science Park, No. 1036, Inspur Road, Jinan City, Shandong Province Applicant after: Tidal Cloud Information Technology Co.,Ltd. Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601 Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171103 |
|
RJ01 | Rejection of invention patent application after publication |