Resource allocation method and device and cluster system

文档序号:1470059 发布日期:2020-02-21 浏览:23次 中文

阅读说明:本技术 资源分配方法及装置、集群系统 (Resource allocation method and device and cluster system ) 是由 林江彬 徐映 于 2018-08-10 设计创作,主要内容包括:本申请公开了一种资源分配方法及装置、集群系统。其中,该方法包括:监测集群系统中对至少一个业务的服务性能指标,其中,业务的服务性能指标基于业务的业务请求计算得到,业务的服务性能指标包括延迟时间;在业务的延迟时间大于业务对应的预设延迟阈值的情况下,根据业务的优先级调整集群系统分配给业务的资源,其中,资源为对业务的业务请求进行响应所占用的资源。本申请解决了相关技术中对于云存储技术中,在进行分散存储时,造成存储资源的大量浪费的技术问题。(The application discloses a resource allocation method and device and a cluster system. Wherein, the method comprises the following steps: monitoring a service performance index of at least one service in a cluster system, wherein the service performance index of the service is obtained by calculation based on a service request of the service, and the service performance index of the service comprises delay time; and under the condition that the delay time of the service is greater than a preset delay threshold corresponding to the service, adjusting the resources distributed to the service by the cluster system according to the priority of the service, wherein the resources are occupied by responding to the service request of the service. The cloud storage method and the cloud storage system solve the technical problem that in the related technology, in the cloud storage technology, a large amount of storage resources are wasted when the cloud storage technology is used for performing dispersed storage.)

1. A method for resource allocation, comprising:

monitoring a service performance index of at least one service in a cluster system, wherein the service performance index of the service is calculated based on a service request of the service, and the service performance index of the service comprises delay time;

and under the condition that the delay time of the service is greater than a preset delay threshold corresponding to the service, adjusting the resources distributed to the service by the cluster system according to the priority of the service, wherein the resources are occupied by responding to the service request of the service.

2. The method of claim 1, wherein the service corresponding to the service request is determined by:

determining a sender of a service request in the cluster system;

and determining the service corresponding to the service request according to the sender, wherein different senders correspond to different services.

3. The method of claim 1, wherein adjusting the resources allocated to the service by the cluster system according to the priority of the service comprises:

and when the delay time of the service is greater than the corresponding preset delay threshold and the priority of the service is higher priority, increasing the proportion of the resources allocated to the service, wherein the proportion of the resources is the proportion of the allocated resources in the total resources of the cluster system.

4. The method of claim 3, further comprising:

and when the delay time of the service is lower than a first threshold value, increasing the proportion of resources allocated to other services.

5. The method of claim 3 or 4, wherein the service performance indicators further comprise: throughput, the method further comprising:

and when the throughput of the service is higher than a second threshold value, increasing the proportion of resources allocated to other services.

6. The method of claim 1, wherein after adjusting the resources allocated to the service by the cluster system according to the priority of the service, the method further comprises:

judging whether the reduced resource proportion is smaller than the minimum value of the resource proportion corresponding to the service or not; and/or

And judging whether the increased resource proportion is larger than the maximum value of the resource proportion corresponding to the service.

7. The method of claim 1, wherein the resources further comprise: network bandwidth.

8. The method of claim 1, wherein the resources are adjusted by:

and adjusting the resources allocated to the service by using a flow control technology.

9. The method of claim 1, further comprising:

and performing resource scheduling on the service request of the at least one service by utilizing a Lyapunov optimization algorithm.

10. The method according to any one of claims 1 to 9, wherein the services include a first type of service and a second type of service, the cluster system stores service data related to the first type of service in an online storage manner and stores service data related to the second type of service in an offline storage manner, and the priority of the first type of service is higher than the priority of the second type of service.

11. A resource allocation apparatus, comprising:

the system comprises a monitoring module, a service request processing module and a service processing module, wherein the monitoring module is used for monitoring a service performance index of at least one service in a cluster system, the service performance index of the service is obtained by calculation based on a service request of the service, and the service performance index of the service comprises delay time;

and the adjusting module is used for adjusting the resources distributed to the service by the cluster system according to the priority of the service under the condition that the delay time of the service is greater than the preset delay threshold corresponding to the service, wherein the resources are occupied by responding to the service request of the service.

12. A cluster system, comprising:

the system comprises a plurality of front-end servers, a plurality of service servers and a plurality of service servers, wherein the front-end servers are used for sending service requests of services corresponding to the front-end servers to a back-end server;

the system comprises at least one back-end server and a server, wherein the back-end server is used for processing service requests of different services and adjusting resources distributed to the services according to the priority of the services under the condition that the delay time of the services is greater than a preset delay threshold corresponding to the services, and the resources are occupied by responding to the service requests of the services.

13. A system, comprising:

a processor; and

a memory coupled to the processor for providing instructions to the processor for processing the method of any of claims 1 to 10.

Technical Field

The present application relates to the field of network technologies, and in particular, to a resource allocation method and apparatus, and a cluster system.

Background

In the related art, the cloud storage technology is a new concept extending and developing from the cloud computing concept, and is an emerging storage technology, that is, devices of different storage types are combined through a distributed file system through functions of multiple clusters, the distributed file system, a network service and the like, so as to provide online storage services for governments and enterprises. In the current cloud storage technology, a plurality of storage systems or a plurality of storage devices are generally used to store each file in a scattered manner, and this scattered storage manner causes a great deal of waste of storage resources, i.e. a great deal of storage or servers need to be laid out, and a great deal of time and resources need to be spent to maintain these storage devices. Meanwhile, in the cloud storage process, if the storage systems are mixed, problems of uneven resource allocation, too high delay of access requests and the like occur.

In view of the above problem in the related art that a large amount of storage resources are wasted when performing the distributed storage in the cloud storage technology, no effective solution is proposed at present.

Disclosure of Invention

The embodiment of the application provides a resource allocation method, a resource allocation device and a cluster system, so as to at least solve the technical problem that in the cloud storage technology in the related art, a large amount of storage resources are wasted when dispersed storage is performed.

According to an aspect of an embodiment of the present application, there is provided a resource allocation method, including: monitoring a service performance index of at least one service in a cluster system, wherein the service performance index of the service is calculated based on a service request of the service, and the service performance index of the service comprises delay time; and under the condition that the delay time of the service is greater than a preset delay threshold corresponding to the service, adjusting the resources distributed to the service by the cluster system according to the priority of the service, wherein the resources are occupied by responding to the service request of the service.

According to another aspect of the embodiments of the present application, there is also provided a resource allocation apparatus, including: the system comprises a monitoring module, a service request processing module and a service processing module, wherein the monitoring module is used for monitoring a service performance index of at least one service in a cluster system, the service performance index of the service is obtained by calculation based on a service request of the service, and the service performance index of the service comprises delay time; and the adjusting module is used for adjusting the resources distributed to the service by the cluster system according to the priority of the service under the condition that the delay time of the service is greater than the preset delay threshold corresponding to the service, wherein the resources are occupied by responding to the service request of the service.

According to another aspect of the embodiments of the present application, there is also provided a cluster system, including: the system comprises a plurality of front-end servers, a plurality of service servers and a plurality of service servers, wherein the front-end servers are used for sending service requests of services corresponding to the front-end servers to a back-end server; at least one back-end server, which is used to process the service requests of different services and adjust the resources allocated to the services according to the priority of the services when the delay time of the services is greater than the preset delay threshold corresponding to the services, wherein the resources are the resources occupied by responding to the service requests of the services

According to another aspect of the embodiments of the present application, there is also provided a system, including: a processor; and a memory, connected to the processor, for providing the processor with instructions to process any of the above resource allocation methods.

In this embodiment of the present application, a service performance index of at least one service in a cluster system may be monitored, where the service performance index of the service is calculated based on a service request of the service, and the service performance index of the service includes a delay time, and then a resource allocated to the service by the cluster system may be adjusted according to a priority of the service when the delay time of the service is greater than a preset delay threshold corresponding to the service, where the resource is a resource occupied by responding to the service request of the service. In the embodiment, the service performance index of the cluster system for each service can be calculated in real time, the adjustment mode of the resources allocated to the service is determined according to the service performance index of a certain service, and different resources are allocated to different services.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:

fig. 1 is a block diagram of a hardware structure of a mobile terminal according to an embodiment of the present application;

fig. 2 is a flowchart of a resource allocation method according to a first embodiment of the present application;

fig. 3 is a flowchart of an optional method for determining a service corresponding to a service request according to an embodiment of the present application;

FIG. 4 is a first flowchart of an alternative method for adjusting access request resources according to an embodiment of the present application;

FIG. 5 is a schematic diagram of an alternative resource allocation apparatus according to an embodiment of the present application;

FIG. 6 is a schematic diagram of an alternative clustering system in accordance with an embodiment of the present application;

FIG. 7 is a schematic diagram of an alternative system according to embodiments of the present application.

Detailed Description

In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

First, some terms or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:

cloud storage is a new concept extended and developed on the cloud computing concept, and refers to a system which integrates a large number of storage devices of different types in a network through application software to cooperatively work through functions such as cluster application, a grid technology or a distributed file system and provides data storage and service access functions to the outside.

The request delay number refers to the number of delays for processing all requests, wherein the delay refers to the time length required for processing a certain service.

The average delay time is the ratio of the sum of the delay times of the services to the number of the services.

A 99.9% delay is defined as sorting all delays and selecting a particular delay, for example, the 999 th delay of 1000 delays.

And the distributed token bucket, called HTB for short, supports flow lease, and when the flow of the child node is insufficient or the bandwidth is insufficient but the flow of the father node is redundant, the child node and the supernode use the bandwidth resource of the father node in a supersending mode. Which can control the amount of data sent onto the network and allow the sending of bursts of data. The transmission speed of the data packet sent to the network can be controlled by the token bucket, the token can be used for representing the size of the network data packet, and the number of tokens consumed by different data packets is different.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:启用存储介质上的虚拟功能

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!