CN113296717A - Optimization method of object storage distributed service quality, server and storage equipment - Google Patents

Optimization method of object storage distributed service quality, server and storage equipment Download PDF

Info

Publication number
CN113296717A
CN113296717A CN202110846520.4A CN202110846520A CN113296717A CN 113296717 A CN113296717 A CN 113296717A CN 202110846520 A CN202110846520 A CN 202110846520A CN 113296717 A CN113296717 A CN 113296717A
Authority
CN
China
Prior art keywords
token bucket
weight
qos
gateway
token
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
CN202110846520.4A
Other languages
Chinese (zh)
Other versions
CN113296717B (en
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.)
Ziguang Hengyue Technology Co Ltd
Original Assignee
Ziguang Hengyue Technology Co Ltd
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 Ziguang Hengyue Technology Co Ltd filed Critical Ziguang Hengyue Technology Co Ltd
Priority to CN202110846520.4A priority Critical patent/CN113296717B/en
Publication of CN113296717A publication Critical patent/CN113296717A/en
Application granted granted Critical
Publication of CN113296717B publication Critical patent/CN113296717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5003Managing SLA; Interaction between SLA and QoS

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides an optimization method of distributed service quality of object storage, a server and storage equipment, and relates to the technical field of distributed storage. The method comprises the following steps: the object gateway periodically acquires the completed quantity and the uncompleted quantity of the first operation; determining a first weight of the first operation of the object gateway based on the completed amount and the weight coefficient thereof, and the uncompleted amount and the weight coefficient thereof of the first operation; writing the first weight into a corresponding distributed object storage system, and reading second weights of the first operation of other object gateways from the distributed object storage system; the maximum capacity of the token bucket corresponding to the first operation of the object gateway is determined according to the preset parameters, the speed limit parameters of the first operation, the weight of the first operation of all the object gateways in the distributed object storage system and the first weight, and the problem that the bandwidth and TPS of other object gateways cannot be sensed among all the object gateways in the distributed object storage system, so that the object gateways cannot realize overall QoS control is solved.

Description

Optimization method of object storage distributed service quality, server and storage equipment
Technical Field
The application relates to the technical field of distributed storage, in particular to an optimization method, a server and storage equipment for distributed service quality of object storage.
Background
The object storage system needs not only a large number of disk IO but also network IO, however, the network bandwidth is necessarily limited, and the limited resources are necessarily reasonably allocated. If a user continuously reads and writes and seizes a large amount of IO bandwidth, performance of other users is inevitably reduced, and even starvation occurs. Therefore, to fairly control the IO resource usage of users and buckets, QoS is introduced.
QoS is an abbreviation of Quality of Service, originating from network technology, and is used to solve problems such as network delay and congestion, and provide better Service capability for specified network communication. In the storage system, the QoS is used to implement scheduling allocation of the system IOPS, and ensure a certain storage service quality.
The multiple object gateways running in the distributed object storage system cannot mutually sense the bandwidth and the TPS of other object gateways, so that the object gateways cannot realize the whole QoS control, and meanwhile, the service of a user is distributed at each client end, so that a QoS algorithm cannot be performed at the client end.
Disclosure of Invention
The application provides an optimization method of distributed service quality of object storage, a server, object gateways and storage equipment, which are used for solving the problem that the bandwidth and TPS of other object gateways cannot be sensed by each object gateway in a distributed storage system, so that the object gateways cannot realize integral QoS control.
In a first aspect, a method for optimizing distributed quality of service of an object storage is provided, where the method includes:
the first object gateway periodically acquires the completed amount and the uncompleted amount of the first operation;
determining a first weight of the first operation of the first object gateway based on the completed amount of the first operation and a weight coefficient thereof, and the uncompleted amount of the first operation and a weight coefficient thereof;
writing the first weight into a distributed object storage system corresponding to the first object gateway, and reading second weights of the first operation of other object gateways in the distributed object storage system;
determining the maximum capacity of a token bucket corresponding to the first operation of the first object gateway according to preset parameters, the speed limit parameter of the first operation, the weight of the first operation of all object gateways in the distributed object storage system and the first weight.
In a second aspect, a server is provided, including:
the acquisition module is used for the first object gateway to periodically acquire the completed quantity and the uncompleted quantity of the first operation;
a determining module, configured to determine a first weight of the first operation of the first object gateway based on the completed amount of the first operation and a weight coefficient thereof, and the uncompleted amount of the first operation and a weight coefficient thereof;
the read-write module is used for writing the first weight into a distributed object storage system corresponding to the first object gateway and reading a second weight of the first operation of other object gateways in the distributed object storage system;
the determining module is further configured to determine, according to preset parameters, the speed limit parameter of the first operation, the weight of the first operation of all object gateways in the distributed object storage system, and the first weight, a maximum capacity of a token bucket corresponding to the first operation of the first object gateway.
In a third aspect, an object gateway device is provided, including:
a memory for storing a computer program;
a processor for reading the computer program in the memory and executing the method for optimizing the distributed quality of service of the object storage shown in the first aspect of the present application.
In a fourth aspect, a storage device is provided, where the storage device is configured to store computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the method for optimizing the distributed quality of service of the object storage shown in the first aspect of the present application.
The beneficial effect that technical scheme that this application provided brought is:
aiming at a distributed QoS scene, the distributed QoS is divided into the QoS of a single machine by adopting a weight mode, and the QoS of the single machine is performed on a single object gateway, so that the problem that the bandwidth and TPS of other object gateways cannot be sensed by each object gateway in a distributed storage system, and then the integral QoS control of the object gateways cannot be realized is solved, and the problem that the QoS algorithm cannot be performed at client ends because the service of a user is distributed at client ends is also solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic flowchart of an optimization method for distributed quality of service of object storage according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an object gateway according to an embodiment of the present application;
fig. 4 is a schematic page diagram illustrating QoS lower limit configuration performed through a Handy page in the embodiment of the present application;
FIG. 5 is a schematic diagram of a page for creating a QoS policy through a Handy page in an embodiment of the present application;
FIG. 6 is another schematic diagram of another page for creating a QoS policy through a Handy page in the embodiment of the present application;
FIG. 7 is a schematic diagram of a page for creating an IP network segment speed limit through a Handy page in the embodiment of the present application;
FIG. 8 is another schematic diagram of a page for creating an IP network segment speed limit through a Handy page in the embodiment of the present application;
FIG. 9 is a page diagram illustrating QoS policies for setting buckets via the Handy page in an embodiment of the present application;
FIG. 10 is another page diagram illustrating a QoS policy for setting buckets via the Handy page in the embodiment of the present application;
fig. 11 is a schematic page diagram illustrating setting of a QoS policy of an object user through a Handy page in an embodiment of the present application;
fig. 12 is another schematic page diagram illustrating setting of QoS policy of an object user through a Handy page in the embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
The object storage system needs not only a large number of disk IO but also network IO, however, the network bandwidth is necessarily limited, and the limited resources are necessarily reasonably allocated. If a user continuously reads and writes and seizes a large amount of IO bandwidth, performance of other users is inevitably reduced, and even starvation occurs. Therefore, it is required to fairly control the IO resource usage of users and buckets, and thus QoS is introduced.
QoS is an abbreviation of Quality of Service, originating from network technology, and is used to solve problems such as network delay and congestion, and provide better Service capability for specified network communication. In a storage system, QoS is used to guarantee a certain storage service quality, and generally refers to:
1. higher quality of service (including IOPS, bandwidth, latency, etc. data access services) is provided for high priority traffic. The system has limited service capability, configures higher QoS for high-priority service, configures lower QoS for low-priority service, reasonably distributes resources and meets the requirements of different levels of service.
2. Controlling resource robbery: for example, when the storage system fails and recovers, resources are prevented from being robbed by the recovery inside the cluster, and the user service is guaranteed not to be affected.
If all the services enter the system through one inlet, the system can sense the usage of each service to the system resource, and the control of the resource access can be realized by carrying out flow control on the inlet. The H3C object storage is distributed storage, a set of distributed storage system runs a plurality of object gateways, the bandwidth and TPS of other object gateways cannot be sensed mutually, the object gateways cannot realize the whole QoS control, and meanwhile, the user service is distributed in each client, so that the QoS algorithm cannot be performed at the client.
The nodes of the object storage are distributed, service data are initiated from different client terminals and directly flow to different storage node nodes, and the scene is called as a distributed QoS scene. Aiming at the scene, the distributed QoS is divided into the single-machine QoS in a weight mode, the single-machine QoS is made on a single object gateway, and the QoS weight of each object gateway is obtained through calculation, so that the scheduling distribution of the IOPS of the system is realized, the IOPS and IO bandwidth of a user/bucket are limited, and a certain user/bucket cannot monopolize the IOPS and IO bandwidth of the whole system.
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 a part of the embodiments of the present application, and not all of the 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. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
The embodiment of the application provides an optimization method of distributed service quality of object storage, a server, an object gateway and a storage device, which are used for solving the problem that the bandwidth and TPS of other object gateways cannot be sensed by each object gateway in a distributed storage system, so that the object gateways cannot realize integral QoS control.
The method and the device are based on the same application concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
An embodiment of the present application provides a method for optimizing distributed quality of service of object storage, as shown in fig. 1, the method includes:
s101, the first object gateway periodically acquires the completed quantity and the uncompleted quantity of the first operation.
Specifically, in this embodiment, the first object gateway may periodically count the completed amount and the uncompleted amount of the first operation within a first preset time period by using the token bucket corresponding to the first operation.
Wherein the first operation is an operation of any one of the following objects: user, bucket, IP.
The first operation is any one of the following operations: write IOPS, read IOPS, write bandwidth, read bandwidth, delete IOPS, traverse IOPS, IO concurrency;
the token bucket corresponding to the first operation is as follows: write IOPS token bucket, read IOPS token bucket, write bandwidth token bucket, read bandwidth token bucket, delete IOPS token bucket, traverse IOPS token bucket, IO concurrency token bucket.
That is, in this embodiment, one object gateway may configure QoS for a user or a bucket or an IP object, and specifically may configure 7 operations of write IOPS, read IOPS, write bandwidth, read bandwidth, delete IOPS, traverse IOPS, and IO concurrency. The object gateway may count the completed amount and the uncompleted amount of the first operation within a first preset time period for each of the 7 operations of one of the user, the bucket, and the IP object.
For example: 1) completed amount for IOPS and bandwidth:
the completion amount of the IOPS is consistent with the completion amount of the bandwidth, and the completion number within 2 seconds (i.e., the first preset time duration) can be counted, and a queue record can be used. Such as: the completion count is counted every 100ms in a unit time of 2s, and the completion count counted every time is recorded in a queue, so that the length of the queue is 20.
2) Incomplete amount for IOPS:
the length of the speed limit queue is taken as the amount of IOPS outstanding.
3) For outstanding amount of bandwidth:
the total size of the object is accumulated in the incomplete information for the first time, and after the partial token is acquired, the number of the acquired tokens is subtracted from the incomplete token to obtain the incomplete amount of the bandwidth. If the upload or download of objects is terminated, the size of the non-upload or download is subtracted.
4) Incomplete amount for concurrency:
counting the number of rejected requests within 1 second (i.e., the first preset duration), a queue record may be used. Such as: the number of rejected requests is counted every 100ms in a unit time of 1s, and the counted number of incompletions is recorded in a queue, so that the length of the queue is 10.
5) Completed amount for concurrency:
counting the number of passing requests within 1 second (i.e., the first preset duration), a queue record may be used. Such as: the number of requests that have passed through once is counted every 100ms in a unit time of 1s, and the number of completions counted every time is recorded in a queue, so that the length of the queue is 10.
S102, determining a first weight of the first operation of the first object gateway based on the completed amount of the first operation and the weight coefficient thereof, and the uncompleted amount of the first operation and the weight coefficient thereof.
Specifically, in this embodiment, a write IOPS in which the first operation of the first object gateway is the user1 is described as an example, for example: if the unit time is finished as w _ iops _ done, the finished weight coefficient is c _ done, the finished weight coefficient is not finished as w _ iops _ done, and the unfinished weight coefficient is c _ done, then: the first object gateway weights the IOPS for user1 write as:
Figure 427163DEST_PATH_IMAGE001
s103, writing the first weight into a distributed object storage system corresponding to the first object gateway, and reading second weights of the first operation of other object gateways in the distributed object storage system.
Specifically, in this embodiment, the first weight may be written into a rados object corresponding to the first object gateway, and the second weight of the first operation of the other object gateway may be read from the rados object. The first object gateway is any object gateway in the distributed object storage system, that is, Qos optimization can be performed on each object gateway in the distributed object storage system by using the method of the present application.
In this embodiment, the two read/write requests are encapsulated into a cls request and sent to the OSD, so that the read/write performance can be improved. Meanwhile, in order to reduce the influence of the maximum capacity of the token bucket obtained by QoS weight calculation on the performance of the object gateway, an asynchronous mode is adopted.
S104, determining the maximum capacity of a token bucket corresponding to the first operation of the first object gateway according to preset parameters, the speed limit parameters of the first operation, the weight of the first operation of all object gateways in the distributed object storage system and the first weight.
Specifically, in this embodiment, when the speed limit parameter of the first operation is greater than the product of the preset parameter and the number of valid object gateways on the distributed object storage system, the maximum capacity T of the token bucket of the first operation of the first object gateway is calculated according to the following formula:
Figure 343035DEST_PATH_IMAGE002
wherein C is the preset parameter, S is the speed limit parameter of the first operation, N1 is the number of valid object gateways on the distributed object storage system, W1 is the first weight, and W is the weight of the first operation of all object gateways on the distributed object storage system.
It should be noted that, in order to prevent that the maximum capacity of the token bucket is obtained by weight calculation, so that the token capacity in the token bucket of a certain object gateway is always 0 and a request of the certain object gateway is always blocked, a preset parameter min _ size (i.e. C in the foregoing) is introduced in the weight calculation to ensure the minimum value of the token bucket capacity, where min _ size of the IOPS is 1, min _ size of the bandwidth operation is 16KB, and min _ size of the concurrency degree is 1.
And if the speed limit parameter of the first operation is greater than the product of the preset parameter and the number of the effective object gateways in the distributed object storage system, allocating the capacity of the token bucket for the object gateways according to a preset mode.
It should be appreciated that in this embodiment, the weight of the first operation of all object gateways in the distributed object storage system is the cumulative sum of the first weight and the at least one second weight. The number of the effective object gateways in the distributed object storage system is the sum of the number of the object gateways receiving the IO request.
In summary, in the method in this embodiment of the present application, an object gateway periodically obtains a completed amount and an uncompleted amount of a first operation, determines a first weight of the first operation of the object gateway based on the completed amount and a weight coefficient thereof, and the uncompleted amount and a weight coefficient thereof of the first operation, writes the first weight into a corresponding distributed object storage system, reads a second weight of the first operation of another object gateway in the distributed object storage system, determines a maximum capacity of a token bucket corresponding to the first operation of the first object gateway according to a preset parameter, a speed limit parameter of the first operation, weights of the first operations of all object gateways in the distributed object storage system, and the first weight, so as to split the distributed QoS into a stand-alone QoS by adopting a weight manner for a distributed QoS scenario, and perform stand-alone QoS on a single object gateway, the problem that the bandwidth and TPS of other object gateways cannot be sensed mutually by all object gateways in the distributed storage system, so that the object gateways cannot realize overall QoS control is solved, and the problem that the QoS algorithm cannot be performed at a client end due to the fact that the service of a user is distributed at each client end is also solved.
In some embodiments, the writing the first weight to the distributed object storage system corresponding to the first object gateway includes:
when finding out a token bucket corresponding to the first operation of the first object gateway from the nested map, updating the weight of the first operation of the first object gateway by using the first weight;
alternatively, the first and second electrodes may be,
when the token bucket corresponding to the first operation of the first object gateway is not found in a nested map, inserting the first weight into the nested map;
and the nested map is used for recording the weight of each object gateway under the token bucket.
That is, in this embodiment, in order to avoid IO pressure on the rados platform (i.e. the distributed object storage system in the foregoing), the interface of the rados is not called in the cls request, but the weight information of each object gateway under the token bucket is recorded through the global nested map, and the logic is basically consistent with the original logic, but is obtained through the rados interface before, and is currently directly searched from the map.
Basic logic:
static map < string, map < string (object gateway), rgw _ cls _ QoS _ info _ entry (weight information) > > QoS _ weight _ info;
and firstly finding a corresponding token bucket from the map, and if the token bucket does not exist, inserting the weight information of the object gateway. And if the weight information exists, updating the weight information of the updated gateway, acquiring the weight information of other gateways, and calculating the capacity of the weight update token bucket.
In this embodiment, each object gateway writes request information of a user corresponding to each object gateway through the nested map, and operates with different nested map items through a rados object, thereby avoiding the use of locks.
Since cls _ rgw is loaded into the OSD through a dynamic library, the above method can be implemented using the constructors and destructors of the library:
void __attribute__ ((constructor)) QoS_init(void);
void __attribute__ ((destructor)) QoS_fini(void);
a thread is started in QoS _ init, and the map is traversed periodically (e.g., every 2 hours), and the weight information that has not been updated for a long time (30 minutes) is deleted.
The thread is closed in QoS _ fini.
In some embodiments, the method may further include:
periodically updating the number of tokens in a token bucket corresponding to the first operation of the first object gateway based on the maximum capacity of the token bucket corresponding to the first operation of the first object gateway.
Specifically, in this embodiment, after determining the maximum capacity of the token bucket corresponding to one operation of each object gateway, the capacity of the token bucket may be updated periodically (e.g., every 2 s).
In one embodiment, the process of updating the token bucket may be as follows:
adding tokens to a token bucket corresponding to the first operation of the first object gateway at preset intervals in an updating period until the number of the added tokens is the maximum capacity;
and repeatedly executing the step of adding tokens to the token bucket corresponding to the first operation of the first object gateway at preset time intervals until the number of the added tokens is the maximum capacity until the time of the updating period is reached.
Specifically, in this embodiment, for example: at intervals of 250ms (i.e., a preset duration) within a 2s update period, tokens are added to the token bucket corresponding to the first operation of the first object gateway, for example: the token bucket corresponding to the first operation is the write IOPS token bucket of the user1, the maximum capacity of the token bucket is 200, and the process of adding tokens within 2s is as follows:
Figure 625112DEST_PATH_IMAGE003
from the above table, it can be seen that: and adding 50 tokens into the token bucket at the interval of the 1 st preset time length, adding 50 tokens into the token bucket at the interval of the 2 nd preset time length, and repeating the steps until the 1s updating period is finished, and adding 200 tokens into the token bucket in total. The next second is similar.
The token is a mark for controlling whether read-write IO operation is executed in the distributed system, and the token bucket is a storage pool for storing the token.
In some embodiments, before periodically updating the number of tokens of the token bucket corresponding to the first operation of the first object gateway, the method further comprises:
judging whether the number of tokens in the token bucket is updated within a second preset time, if so, determining to send an update request to a distributed object storage system so as to update the number of tokens in the token bucket; otherwise, not sending an updating request to the distributed object storage system;
and when the number of tokens in the token bucket exceeds a third preset time length and is not updated, determining to delete the token bucket, wherein the third preset time length is far greater than the second preset time length.
That is, in an object gateway, there are 7 token buckets for one user or one bucket or one IP. If a large number of users or buckets or IP sets QoS, the object gateway issues a large number of IO reads and writes to the rados platform within 2s, which results in a very large pressure on the rados platform. For this situation, before issuing an update request to the rados platform to update the capacity of the token bucket, the token update time in the token bucket is determined, and if the update time exceeds 120s (i.e., the second preset duration) and the token bucket is not updated, the update request is not issued to the rados platform to update the capacity of the token bucket, and the token bucket is skipped. That is, for a token bucket, if the time difference between the time when the token is acquired this time and the time when the token is acquired last time exceeds 120s, the capacity of the token bucket is not updated. If the token bucket is not updated for more than 30 minutes (i.e., the third preset time period), the token bucket is deleted, so that the IO pressure on the rados platform can be effectively reduced.
In this embodiment, the updating of the token is triggered by the acquisition of the token, reducing the use of the thread.
In some embodiments, the above method further comprises:
and acquiring the token number required by the IO request from a corresponding token bucket according to the received IO request.
Specifically, in this embodiment, when the current time of obtaining the token is later than the end time of a preset time duration, the token is added to the token bucket in the next preset time duration to update the token bucket, and the token is obtained from the updated token bucket.
Specifically, in this embodiment, for example: the current time of receiving the token obtaining request is 800ms, the content in the table is referred, and the current time is later than the end time of the 3 rd preset duration, namely 750ms, so that the token is obtained after the token is added into the token bucket by the 4 th preset duration.
In some embodiments, the above method further comprises:
when the number of tokens in the token bucket is smaller than that required by the IO request, requesting to block, and obtaining the tokens after waiting for a first time length;
the first duration is the smaller value of the preset duration and a second duration, wherein the second duration is determined based on the current time, the preset duration and the next updating time.
Specifically, in this embodiment, the second duration = the next update time + the preset duration-the current time, and when the duration is greater than the preset duration, the first duration is the preset duration, otherwise, the first duration is the second duration.
For example: the current time is 900ms, the preset duration is 250ms, the next updating time is 1000ms, the second duration is 350ms, and the second duration is greater than the preset duration of 250ms, so the first duration is the preset duration, that is: the token can be acquired 250ms after the request is blocked.
Specifically, in one embodiment, after each IO request arrives, the object gateway processes the request through the thread pool, and each request is assigned to one thread for processing. When processing the request, it will be judged whether the request has QoS, if so, the flow limitation will be carried out.
When the current limiting operation is carried out, if n tokens are needed, whether n tokens exist in the token bucket or not is judged firstly, if the number of the tokens in the current token bucket is less than n, the IO is blocked, and the thread enters a speed-limiting queue. And if the tokens in the current token bucket are equal to or exceed n, taking n tokens out of the current token bucket, and allowing the IO execution.
1) Speed-limiting enqueue
Each request comprises information such as the size of the request message and the data of the message, and the request is enqueued in sequence according to the information and finally hung at the tail of the request queue.
2) Speed-limiting dequeue
And in order to prevent overtime caused by that some requests are not processed all the time, a first-in first-out strategy is adopted to ensure that the requests are processed in sequence.
When a request is dequeued, the number of tokens equivalent to the size of the request is removed from the token bucket.
And during the current limiting, the token adding process in the token bucket is to judge the token updating time of the token bucket when requesting the token each time, and if the token updating time is exceeded, the token of the token bucket is updated first.
1. Concurrency degree current limiting (special treatment):
the degree of concurrency is not placed in the rate-limited queue, and errors are returned directly when the degree of concurrency is EXCEEDED (e.g., return-ERR _ CON _ REQ _ EXCEEDED)
2. Current limit queue length limit:
each request is allocated with a thread processing, the threads of the object gateway are limited, in order to avoid all the threads from entering the limit queue to cause other requests to be processed by wireless threads, when the length of the limit queue exceeds 200, an error (for example, return-ERR _ QOS _ SLOW _ DOWN) is directly returned.
Because a plurality of speed limit queues exist, the length of each speed limit queue is 200 at most, and the threads of the object gateway can be occupied by the speed limit requests, so that other non-speed limit requests have no threads to process, the following mechanism is introduced:
if the total thread number in the speed limit queue exceeds 90 percent of the total thread number, the new QoS speed limit request cannot be added into the speed limit queue and an error is directly returned, so that the request without the speed limit can be ensured.
That is, in this embodiment, after each request is sent to the target gateway, the target gateway enters the target execution stage after authentication and access right confirmation, and then determines whether QoS is set. If the QoS is set, the corresponding token is taken. And if the token quantity meets the requirement, processing according to a normal flow. And if the token quantity does not meet the requirement, requesting blocking and entering a QoS waiting queue.
According to three action objects, namely, a user, a bucket and an IP, each action object has 7 QoS queues according to operation types, namely, a put IOPS queue, a put bw queue, a get IOPS queue, a get bw queue, a delete IOPS queue, a list IOPS queue and a current request queue, and has 21 QoS waiting queues.
The first request of the QoS waiting queue can always acquire the token, after enough tokens are acquired, the first request can be out of the queue, the first request in the waiting queue is awakened, the first request starts to always acquire the token, and the previous operation is repeated.
In the execution stage, QoS is detected, concurrency QoS is checked, if the concurrency QoS is detected, a token is acquired, if the concurrency QoS is not detected, the queue is entered, if the token is sufficient, IOPS QoS is checked, if the token is acquired, if the token is insufficient, the queue is entered, if the token is sufficient, bandwidth QoS (put object/get object) is checked, if the token is acquired, the queue is entered, if the token is insufficient, the queue is entered, and the next processing is entered.
In addition, for a write IO request (requesting an upload object, namely, writing data into an object for storage) or a read IO request (downloading an object, namely, acquiring data stored in a previous write object into a client), when a token is acquired, the required number of tokens is acquired from the corresponding token bucket according to a preset size.
Specifically, in this embodiment, the bandwidth when the object is uploaded is sliced according to 4MB, and in order to ensure that data can be processed in time and all requests can be processed, the token is not acquired according to 4MB, but acquired according to 16KB, and the data of 16KB is acquired from the client, and the data of 4MB is written into the rados object until the data is acquired.
When acquiring the token, if the token in the bucket is larger than or equal to 16KB, the token of 16KB is acquired at one time. If less than 16KB, all tokens are acquired and the remaining tokens wait for the next cycle to acquire.
It should be appreciated that the download object will send data to the client, again following 16KB to obtain the token. The process of obtaining the token is similar to that of uploading the object, and for brevity of description, the description is omitted here.
According to the method, for a scene with high read/write concurrency (namely, a plurality of read/write requests are received simultaneously), 16KB bandwidth is sequentially allocated for each read/write request to acquire the token and the data until the 4MB data is acquired, so that the problem that under the condition of high concurrency, a certain read/write IO request always occupies the token in the token bucket, and other requests cannot acquire the token can be avoided.
In addition, it should be noted that, in the above embodiment, the speed limit parameter for the first operation is pre-configured by the user according to the requirement, and the specific implementation process is as follows:
QoS supports Handy page and CLI (command) configuration management. The object gateway provides a command line (radosgw-admin) for configuring and managing the object storage QoS, and the Handy page calls the radosgw-admin command of the object gateway for configuring and managing the QoS.
The configuration on the Handy page is the same as the storage characteristic of a common object, and the page configuration QoS operation is provided.
If the user needs to configure the QoS in the CLI manner, the user can directly and remotely access to the storage node, such as: SSH, etc., to perform QoS command configuration and access.
Specifically, the process of configuration through the Handy page is as follows:
1. and (3) QoS lower limit configuration:
the lower limit value of the flow control is set through QoS lower limit configuration, and the lower limit value is not lower than when the barrel, the target user and the client are set to access IP flow control.
Adding 'QoS lower limit configuration' in 'object storage' — 'advanced configuration', and supporting the presentation information comprises: GET request TPS lower limit, PUT request TPS lower limit, DELETE request TPS lower limit, List request TPS lower limit, GET request bandwidth lower limit, PUT request bandwidth lower limit, request concurrence lower limit. An example is shown in figure 4.
Clicking an "edit" button in the page shown in fig. 4, entering an edit page, and supporting input: GET request TPS lower limit, PUT request TPS lower limit, DELETE request TPS lower limit, List request TPS lower limit, GET request bandwidth lower limit, PUT request bandwidth lower limit, request concurrence lower limit. The parameters only support integers, and the value range is 0-922337203684775807.
2. And (3) QoS management:
and adding 'QoS management' in the 'object storage', wherein the QoS management comprises a QoS strategy and IP network segment speed limit management.
When the QoS lower limit value has been configured, the upper limit value of the QoS is set not to be lower than the set lower limit value. Prompt "XX Upper bound value is lower than lower bound value in QoS policy, please reset! ".
And if the object gateway is not configured in the cluster, clicking the QoS management to prompt that the current cluster has no object gateway and please create the object gateway first.
3. QoS strategy:
1) specification:
10000 QoS policies are supported at maximum;
each QoS policy supports maximally 10000 associations (user \ bucket \ IP segment).
2) And (3) QoS strategy display:
the QoS strategy list shows information including: name, TPS upper limit, bandwidth upper limit, request concurrency upper limit, number of associations, description, status, examples are shown in fig. 5.
3) And (3) creating a QoS policy:
clicking a 'new' button on a QoS strategy list page in a page shown in FIG. 5, and entering a QoS strategy creation page. Example as shown in fig. 6, the "ok" button in the create QoS policy page in the page shown in fig. 6 is clicked to complete the creation of the QoS policy.
Wherein the parameters include:
name: the QoS strategy name can only input 1-1024-bit letters, numbers, middle lines and underlines, and can only start with letters and numbers.
The measurement type is as follows: IOPS is selected by default, IOPS, bandwidth and concurrency selection are supported, and at least one item is configured for each metric type.
The IOPS includes: GET request TPS lower limit, PUT request TPS lower limit, DELETE request TPS lower limit and Lsite request TPS lower limit; only supporting integers, the value range is 0-922337203684775807, and if the lower limit value is not set, the default is unlimited.
The bandwidth comprises: a GET request bandwidth lower limit and a PUT request bandwidth lower limit; only supporting integers, wherein the value range is 0-922337203684775807; if the lower limit value is not set, the default is unlimited.
Request concurrency lower bound: only integers are supported, and the value range is 0-922337203684775807.
The following steps are described: and the QoS description information is supported to be input, and the maximum input is 120 characters.
Remarks explanation: please reasonably plan the relevant parameters of the QoS policy according to the actual conditions of the services, so as to improve the overall service quality of the storage system.
4) And modifying the QoS strategy:
when the QoS strategy has associated users, buckets and IP network segments, the name modification is not supported, and the modification of the IOPS upper limit value, the bandwidth upper limit value, the concurrency upper limit value and the description are supported.
When the QoS strategy is not associated with users, buckets and IP network segments, the modification name, the IOPS upper limit value, the bandwidth upper limit value, the concurrency upper limit value and the description are supported.
And clicking a 'confirm' button in the QoS strategy modification page to finish the modification of the QoS strategy.
5) Deleting the QoS policy:
when the QoS strategy has associated users, buckets and IP network segments, the QoS strategy is not supported to be deleted, and the QoS strategy is deleted after the association is cancelled.
Delete QoS policies, prompt "do you determine to delete selected QoS policies
Figure 388668DEST_PATH_IMAGE004
And clicking a confirm button in the QoS strategy deletion page to finish the deletion operation.
6) And (3) disassociation:
and selecting a QoS strategy, clicking a 'correlation canceling' button, and supporting the correlation of the barrel, the user and the IP network segment of the client. Popup prompt "you decide to cancel QoS policy" xxx "association with all object users, buckets and client IP network segments
Figure 848731DEST_PATH_IMAGE004
And clicking a 'determination' button in the pop-up page to finish the deleting operation.
7) Repairing:
aiming at the QoS strategy with abnormal state, the method supports clicking a 'repair' button, executes repair operation, and prompts 'do you determine to repair QoS strategy' xxx
Figure 737053DEST_PATH_IMAGE004
And clicking a 'determination' button in the pop-up page to finish the repairing operation.
8) And (3) QoS strategy retrieval:
name and description retrieval is supported.
4. Limiting the speed of the IP network section:
1) and (3) IP network segment speed limit display:
the IP network segment speed limit list shows information including: an example of an IP segment and QoS policies is shown in FIG. 7.
2) Establishing an IP network segment speed limit:
clicking a 'new' button on an IP network segment speed limit list page shown in the figure 7 to enter into an IP network segment speed limit creating page, an example of which is shown in the figure 8. Clicking the "OK" button on the page shown in FIG. 8 completes the creation of the QoS policy.
Wherein the parameters include:
IP network segment: and the method supports an input IP network segment, and supports input IPv4 and IPv6 address segments.
QoS strategy: and the default opening state supports the opening or closing of the QoS strategy.
Selecting a QoS strategy: when the QoS strategy switch is turned on, the selection of the QoS strategy is supported.
Remarks explanation: please reasonably plan the relevant parameters of the QoS policy according to the actual conditions of the services, so as to improve the overall service quality of the storage system.
3) Modifying the IP network segment speed limit:
and opening or closing the QoS strategy is supported, and modification of the QoS strategy is supported when the QoS strategy is opened.
And clicking a 'confirm' button in the speed limiting page of the modified IP network segment to finish the modification of the QoS strategy.
4) Deleting the IP network segment speed limit:
deleting the IP network segment speed limit and prompting' do you determine to delete the selected IP network segment speed limit
Figure 275350DEST_PATH_IMAGE004
And clicking a 'confirm' button in the speed-limiting page of the IP network segment to delete, thereby finishing the deletion operation.
5. Bucket QoS policy:
the QoS policy operation supporting the set bucket is added while the bucket list is added with a "QoS policy" name exposure, an example of which is shown in fig. 9. Selecting a bucket to be set with the QoS policy in the page shown in FIG. 9, clicking a "QoS policy" button in the "more" operation, opening a set QoS policy popup window, for example, as shown in FIG. 10, clicking an "OK" button in the page shown in FIG. 10, and completing QoS policy modification.
Wherein the parameters include:
QoS strategy: and the default opening state supports the opening or closing of the QoS strategy.
Selecting a QoS strategy: when the QoS strategy switch is turned on, the selection of the QoS strategy is supported.
Remarks explanation: please reasonably plan the relevant parameters of the QoS policy according to the actual conditions of the services, so as to improve the overall service quality of the storage system.
6. Target user QoS policy:
the QoS policy operation supporting the setting of the target user is added, and meanwhile, the "QoS policy" status presentation is added to the target user list, an example of which is shown in fig. 11. The target user to be set with the QoS policy is selected in the page shown in fig. 11, and the "QoS policy" button in the "more" operation is clicked to open the set QoS policy popup, for example, as shown in fig. 12. Clicking the "ok" button in the page as shown in fig. 12 completes the QoS policy modification.
Wherein the parameters include:
QoS strategy: and the default opening state supports the opening or closing of the QoS strategy.
Selecting a QoS strategy: when the QoS strategy switch is turned on, the selection of the QoS strategy is supported.
Remarks explanation: please reasonably plan the relevant parameters of the QoS policy according to the actual conditions of the services, so as to improve the overall service quality of the storage system.
The configuration process by CLI is as follows:
1. QoS on/off:
[ COMMAND ]
QoS for user/bucket/IP segment is turned on:
radosgw-admin QoS user enable [--uid=user_name]
radosgw-admin QoS bucket enable [--bucket=bucket_name]
radosgw-admin QoS ipRange enable [--ip=ipv4_range]
QoS for user/bucket/IP segment is closed:
radosgw-admin QoS user disable [--uid=user_name]
radosgw-admin QoS bucket disable [--bucket=bucket_name]
radosgw-admin QoS ipRange disable [--ip=ipv4_range]
[ parameters ]
Figure 831096DEST_PATH_IMAGE005
[ EXAMPLES ]
And starting QoS of the user testuser:
radosgw-admin QoS user enable --uid=testuser
and starting QoS of a user testuser1 under tenant testa:
radosgw-admin QoS user enable --uid=testuser --tenant=testa
QoS of close bucket 1:
radosgw-admin QoS bucket disable --bucket=bucket1
opening QoS for bucket2 of tenant extension 1:
radosgw-admin QoS bucket disable --bucket=bucket2 --tenant=tenant1
open QoS for segment 192.168.1.0/24:
radosgw-admin QoS ipRange enable --ip=192.168.1.0/24
2. setting the lower limit of QoS:
[ COMMAND ]
Setting the minimum value of the QoS limit value:
radosgw-admin QoS limit set --lower-limit=0
[ parameters ]
Figure 39224DEST_PATH_IMAGE007
[ EXAMPLES ]
Setting the QoS lower bound to 200
radosgw-admin QoS limit set --lower-limit=20
3. User QoS setting:
[ COMMAND ]
radosgw-admin QoS user set [--uid=user_name] [--]
[ parameters ]
Figure 434083DEST_PATH_IMAGE008
[ EXAMPLES ]
Setting GET request TPS of a user testa as 100, request concurrency as 20, list request Bps as 200:
radosgw-admin QoS user set --uid=testa --get-tps=100 --concurrent-req=20 --list-bps=200
setting a user testb GET request TPS under tenant1 as 100, a request concurrency as 20, and a list request Bps as 200:
radosgw-admin QoS user set --uid=testb --tenant=tenant1 --get-tps=100 --concurrent-req=20 --list-bps=200
4. bucket QoS setup:
[ COMMAND ]
radosgw-admin QoS bucket set [--bucket=bucket_name] [--]
[ parameters ]
Figure 995645DEST_PATH_IMAGE009
[ EXAMPLES ]
Setting GET request TPS of a bucket testa to be 100, request concurrency to be 20, list request Bps to be 200:
radosgw-admin QoS bucket set --bucket=testa --get-tps=100 --concurrent-req=20 --list-bps=200
setting GET request TPS of bucket testb under tenant1 as 100, request concurrency as 20, list request Bps as 200:
radosgw-admin QoS bucket set --bucket=testb --tenant=tenant1 --get-tps=100 --concurrent-req=20 --list-bps=200
5. IP section QoS setting:
[ COMMAND ]
radosgw-admin QoS ipRange set [--ip=ipv4_range] [--]
[ parameters ]
Figure 999373DEST_PATH_IMAGE010
[ EXAMPLES ]
Setting the GET request TPS of 192.168.1.0/24 as 100, the request concurrency as 20, and the list request Bps as 200:
radosgw-admin QoS ipRange set --ip=192.168.1.0/24 --get-tps=100
--concurrent-req=20 --list-bps=200
6. QoS deletion (IP segment):
[ COMMAND ]
radosgw-admin QoS rm –QoS-scope=ip [--ip=ipv4_range]
[ parameters ]
Figure 565353DEST_PATH_IMAGE012
[ EXAMPLES ]
Delete 192.168.1.0/24 QoS:
radosgw-admin QoS rm –QoS-scope=ip --ip=192.168.1.0/24
7. QoS inquiry:
[ COMMAND ]
radosgw-admin QoS user info [--]
radosgw-admin QoS bucket info [--]
radosgw-admin QoS ipRange info [--]
[ parameters ]
Figure 631529DEST_PATH_IMAGE013
[ EXAMPLES ]
Acquiring all QoS configurations:
radosgw-admin QoS stats
acquiring the QoS of the test user:
radosgw-admin QoS user info --uid=test
get bucket1 bucket QoS:
radosgw-admin QoS bucket info --bucket=bucket1
obtaining 192.168.1.0/24 network segment QoS:
radosgw-admin QoS ipRange info --ip=192.168.1.0/24
it should be noted that the QoS setting is set by the platform user, and the target gateway user cannot set the QoS. Wherein the IP QoS setting is performed by the platform user: admin is set, user and bucket QoS is set by platform user: and setting by a tenant administrator.
Based on the same inventive concept, the embodiment of the present application provides a server, in which an optimization apparatus for implementing the foregoing method for optimizing the quality of distributed service of object storage may be integrated, as shown in fig. 2, the apparatus 30 may include: an obtaining module 301, a determining module 302, and a reading and writing module 303, wherein,
an obtaining module 301, configured to periodically obtain a completed amount and an uncompleted amount of a first operation by a first object gateway;
a determining module 302, configured to determine a first weight of the first operation of the first object gateway based on the completed amount of the first operation and its weight coefficient, and the uncompleted amount of the first operation and its weight coefficient;
a read-write module 303, configured to write the first weight into a distributed object storage system corresponding to the first object gateway, and read a second weight of the first operation of another object gateway in the distributed object storage system;
the determining module 302 is further configured to determine, according to preset parameters, the speed limit parameter of the first operation, the weight of the first operation of all object gateways in the distributed object storage system, and the first weight, the maximum capacity of a token bucket corresponding to the first operation of the first object gateway.
In some embodiments, the obtaining module 301 is specifically configured to periodically count the completed amount and the uncompleted amount of the first operation within a first preset time period by using the token bucket corresponding to the first operation by the first object gateway.
Specifically, in this embodiment, the first operation is any one of the following operations: write IOPS, read IOPS, write bandwidth, read bandwidth, delete IOPS, traverse IOPS, IO concurrency;
the token bucket corresponding to the first operation is as follows: write IOPS token bucket, read IOPS token bucket, write bandwidth token bucket, read bandwidth token bucket, delete IOPS token bucket, traverse IOPS token bucket, IO concurrency token bucket.
The first operation is an operation of any one of the following objects: user, bucket, IP.
In some embodiments, the determining module 302, when determining the maximum capacity of the token bucket for the first operation of the first object gateway, is specifically configured to:
when the speed limit parameter of the first operation is greater than the product of the preset parameter and the number of effective object gateways in the distributed object storage system, calculating the maximum capacity T of the token bucket of the first operation of the first object gateway according to the following formula:
Figure DEST_PATH_IMAGE014
wherein C is the preset parameter, S is the speed limit parameter of the first operation, N1 is the number of valid object gateways in the distributed object storage system, W1 is the first weight, and W is the weight of the first operation of all object gateways in the distributed object storage system.
In some embodiments, the read-write module 303 is specifically configured to, when finding the token bucket corresponding to the first operation of the first object gateway from the nested map, update the weight of the first operation of the first object gateway by using the first weight;
alternatively, the first and second electrodes may be,
when the token bucket corresponding to the first operation of the first object gateway is not found in a nested map, inserting the first weight into the nested map;
and the nested map is used for recording the weight of each object gateway under the token bucket.
In some embodiments, it may further include: an update module to:
periodically updating the number of tokens in a token bucket corresponding to the first operation of the first object gateway based on the maximum capacity of the token bucket corresponding to the first operation of the first object gateway.
Specifically, in this embodiment, the processing module is further configured to:
judging whether the number of tokens in the token bucket is updated within a second preset time, if so, determining to send an update request to a distributed object storage system so as to update the number of tokens in the token bucket; otherwise, not sending an updating request to the distributed object storage system;
and when the number of tokens in the token bucket exceeds a third preset time length and is not updated, determining to delete the token bucket, wherein the third preset time length is far greater than the second preset time length.
In some embodiments, the update module is specifically configured to:
adding tokens to a token bucket corresponding to the first operation of the first object gateway at preset intervals in an updating period until the number of the added tokens is the maximum capacity;
and repeatedly executing the step of adding tokens to the token bucket corresponding to the first operation of the first object gateway at preset time intervals until the number of the added tokens is the maximum capacity until the time of the updating period is reached.
In some embodiments, further comprising: a processing module to:
and acquiring the token number required by the IO request from a corresponding token bucket according to the received IO request.
In some embodiments, the processing module is further to:
and when the current time for obtaining the token is later than the end time of one preset time length, adding the token to the token bucket in the next preset time length to update the token bucket, and obtaining the token from the updated token bucket.
In some embodiments, the processing module is further to:
when the number of tokens in the token bucket is smaller than that required by the IO request, requesting to block, and obtaining the tokens after waiting for a first time length;
the first duration is the smaller value of the preset duration and a second duration, wherein the second duration is determined based on the current time, the preset duration and the next updating time.
In some embodiments, when the IO request is a read IO request or a write IO request, the processing module is specifically configured to: and acquiring the required token number from the corresponding token bucket according to the preset size.
It should be noted that, the apparatus 30 provided in the embodiment of the present invention can implement all the method steps implemented by the method embodiment shown in fig. 1, and can achieve the same technical effect, and details of the same parts and beneficial effects as those of the method embodiment in this embodiment are not described herein again.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a processor readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In addition, an embodiment of the present application further provides an electronic device, where the electronic device includes: a memory and a processor; at least one program stored in the memory for execution by the processor, which when executed by the processor, implements:
the first object gateway periodically acquires the completed amount and the uncompleted amount of the first operation;
determining a first weight of the first operation of the first object gateway based on the completed amount of the first operation and a weight coefficient thereof, and the uncompleted amount of the first operation and a weight coefficient thereof;
writing the first weight into a distributed object storage system corresponding to the first object gateway, and reading second weights of the first operation of other object gateways in the distributed object storage system;
determining the maximum capacity of a token bucket corresponding to the first operation of the first object gateway according to preset parameters, the speed limit parameter of the first operation, the weight of the first operation of all object gateways in the distributed object storage system and the first weight.
In an alternative embodiment, an object gateway device is provided, as shown in fig. 3, and the electronic device 50 shown in fig. 3 includes: a processor 501 and a memory 503. Wherein the processor 501 is coupled to the memory 503, such as via the bus 502.
The Processor 501 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (ApplicatIOn Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 501 may also be a combination of implementing computing functionality, e.g., comprising one or more microprocessors, a combination of DSPs and microprocessors, and the like.
Bus 502 may include a path that transfers information between the above components. The bus 502 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 502 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
The Memory 503 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
The memory 503 is used for storing application program codes for executing the scheme of the application, and the processor 501 controls the execution. The processor 501 is configured to execute the application program code stored in the memory 503 to implement the content shown in the foregoing method embodiment shown in fig. 1.
The embodiment of the present application provides a storage device, which is used for storing computer instructions, and when the computer instructions are run on a computer, the computer can execute the corresponding contents in the foregoing method embodiments.
The present application provides a computer-readable storage medium, on which a computer program is stored, which, when running on a computer, enables the computer to execute the corresponding content in the foregoing method embodiments.
In summary, according to the optimization method, the server, the object gateway and the storage device for the object storage distributed service quality provided by the embodiment of the present application, the distributed QoS is split into the QoS of a single object by using a weighting method for a distributed QoS scenario, and the single object QoS is performed on a single object gateway, so that not only is the problem that the bandwidth and TPS of other object gateways cannot be sensed by each object gateway in the distributed storage system, which leads to the problem that the object gateways cannot realize the overall QoS control, but also the problem that the service of a user is distributed at each client end, which leads to the failure of performing the QoS algorithm at the client end, solved.
The computer-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including but not limited to magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the processor-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These processor-executable instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (16)

1. A method for optimizing distributed service quality of object storage is characterized by comprising the following steps:
the first object gateway periodically acquires the completed amount and the uncompleted amount of the first operation;
determining a first weight of the first operation of the first object gateway based on the completed amount of the first operation and a weight coefficient thereof, and the uncompleted amount of the first operation and a weight coefficient thereof;
writing the first weight into a distributed object storage system corresponding to the first object gateway, and reading second weights of the first operation of other object gateways in the distributed object storage system;
determining the maximum capacity of a token bucket corresponding to the first operation of the first object gateway according to preset parameters, the speed limit parameter of the first operation, the weight of the first operation of all object gateways in the distributed object storage system and the first weight.
2. The method of claim 1, wherein the first object gateway periodically acquiring the completed amount and the uncompleted amount of the first operation within a preset time period comprises:
and the first object gateway periodically counts the finished quantity and the unfinished quantity of the first operation within a first preset time length by using the token bucket corresponding to the first operation.
3. The method of claim 2, wherein the first operation is any one of:
write IOPS, read IOPS, write bandwidth, read bandwidth, delete IOPS, traverse IOPS, IO concurrency;
the token bucket corresponding to the first operation is as follows: write IOPS token bucket, read IOPS token bucket, write bandwidth token bucket, read bandwidth token bucket, delete IOPS token bucket, traverse IOPS token bucket, IO concurrency token bucket.
4. The method according to any one of claims 1-3, wherein the first operation is an operation of any one of the following objects:
user, bucket, IP.
5. The method according to any one of claims 1-3, wherein the determining a maximum capacity of a token bucket for the first operation of the first object gateway according to preset parameters, a speed limit parameter for the first operation, a weight for the first operation of all object gateways in the distributed object storage system, and the first weight comprises:
when the speed limit parameter of the first operation is greater than the product of the preset parameter and the number of effective object gateways in the distributed object storage system, calculating the maximum capacity T of the token bucket of the first operation of the first object gateway according to the following formula:
Figure DEST_PATH_IMAGE001
wherein C is the preset parameter, S is the speed limit parameter of the first operation, N1 is the number of valid object gateways in the distributed object storage system, W1 is the first weight, and W is the weight of the first operation of all object gateways in the distributed object storage system.
6. The method of claim 1, wherein writing the first weight to the distributed object storage system corresponding to the first object gateway comprises:
when finding out a token bucket corresponding to the first operation of the first object gateway from the nested map, updating the weight of the first operation of the first object gateway by using the first weight;
alternatively, the first and second electrodes may be,
when the token bucket corresponding to the first operation of the first object gateway is not found in a nested map, inserting the first weight into the nested map;
and the nested map is used for recording the weight of each object gateway under the token bucket.
7. The method of claim 1, further comprising:
periodically updating the number of tokens in a token bucket corresponding to the first operation of the first object gateway based on the maximum capacity of the token bucket corresponding to the first operation of the first object gateway.
8. The method of claim 7, wherein periodically updating the number of tokens in the token bucket corresponding to the first operation of the first object gateway based on the maximum capacity of the token bucket corresponding to the first operation of the first object gateway comprises:
adding tokens to a token bucket corresponding to the first operation of the first object gateway at preset intervals in an updating period until the number of the added tokens is the maximum capacity;
and repeatedly executing the step of adding tokens to the token bucket corresponding to the first operation of the first object gateway at preset time intervals until the number of the added tokens is the maximum capacity until the time of the updating period is reached.
9. The method of claim 7, wherein before periodically updating the number of tokens in the token bucket corresponding to the first operation of the first object gateway based on the maximum capacity of the token bucket corresponding to the first operation of the first object gateway, further comprising:
judging whether the number of tokens in the token bucket is updated within a second preset time length, if so, determining to send an update request to the distributed object storage system so as to update the number of tokens in the token bucket; otherwise, not sending the update request to the distributed object storage system;
and when the number of tokens in the token bucket exceeds a third preset time length and is not updated, determining to delete the token bucket, wherein the third preset time length is far greater than the second preset time length.
10. The method of claim 1, further comprising:
and acquiring the token number required by the IO request from a corresponding token bucket according to the received IO request.
11. The method of claim 10, wherein obtaining the number of tokens required for the IO request from a corresponding token bucket according to the received IO request comprises:
and when the current time for obtaining the token is later than the end time of one preset time length, adding the token to the token bucket in the next preset time length to update the token bucket, and obtaining the token from the updated token bucket.
12. The method of claim 11, further comprising:
when the number of tokens in the token bucket is smaller than that required by the IO request, requesting to block, and obtaining the tokens after waiting for a first time length;
the first duration is the smaller value of the preset duration and a second duration, wherein the second duration is determined based on the current time, the preset duration and the next updating time.
13. The method according to any one of claims 10 to 12, wherein when the IO request is a read IO request or a write IO request, a required number of tokens is obtained from a corresponding token bucket according to a predetermined size.
14. A server, comprising:
the acquisition module is used for the first object gateway to periodically acquire the completed quantity and the uncompleted quantity of the first operation;
a determining module, configured to determine a first weight of the first operation of the first object gateway based on the completed amount of the first operation and a weight coefficient thereof, and the uncompleted amount of the first operation and a weight coefficient thereof;
the read-write module is used for writing the first weight into a distributed object storage system corresponding to the first object gateway and reading a second weight of the first operation of other object gateways in the distributed object storage system;
the determining module is further configured to determine, according to preset parameters, the speed limit parameter of the first operation, the weight of the first operation of all object gateways in the distributed object storage system, and the first weight, a maximum capacity of a token bucket corresponding to the first operation of the first object gateway.
15. An object gateway, comprising:
a memory for storing a computer program;
a processor for reading the computer program in the memory and executing the method of optimizing the quality of service of an object store distribution according to any one of claims 1 to 13.
16. A storage device for storing computer instructions which, when run on a computer, cause the computer to perform a method of optimizing quality of service of an object store distribution according to any one of claims 1 to 13.
CN202110846520.4A 2021-07-26 2021-07-26 Optimization method of object storage distributed service quality, server and storage equipment Active CN113296717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110846520.4A CN113296717B (en) 2021-07-26 2021-07-26 Optimization method of object storage distributed service quality, server and storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110846520.4A CN113296717B (en) 2021-07-26 2021-07-26 Optimization method of object storage distributed service quality, server and storage equipment

Publications (2)

Publication Number Publication Date
CN113296717A true CN113296717A (en) 2021-08-24
CN113296717B CN113296717B (en) 2021-10-29

Family

ID=77331073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110846520.4A Active CN113296717B (en) 2021-07-26 2021-07-26 Optimization method of object storage distributed service quality, server and storage equipment

Country Status (1)

Country Link
CN (1) CN113296717B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113839996A (en) * 2021-09-10 2021-12-24 星辰天合(北京)数据科技有限公司 Method and device for object storage distributed quality service
CN115396377A (en) * 2022-07-29 2022-11-25 天翼云科技有限公司 Method, device and equipment for optimizing service quality of object storage and storage medium
CN117608502A (en) * 2024-01-24 2024-02-27 济南浪潮数据技术有限公司 Data reconstruction management method, device, equipment and medium for distributed storage system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6829649B1 (en) * 2000-11-10 2004-12-07 International Business Machines Corporation Method an congestion control system to allocate bandwidth of a link to dataflows
CN107579926A (en) * 2017-10-20 2018-01-12 南京易捷思达软件科技有限公司 The QoS methods to set up of Ceph cloud storage systems based on token bucket algorithm
CN108092915A (en) * 2017-12-01 2018-05-29 顺丰科技有限公司 A kind of QoS of customer flow control methods and device
CN110858808A (en) * 2018-08-23 2020-03-03 阿里巴巴集团控股有限公司 Method, system and device for realizing speed limit
CN111385214A (en) * 2018-12-27 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN112383486A (en) * 2020-11-05 2021-02-19 北京同有飞骥科技股份有限公司 Lease-based distributed object storage service quality assurance method and system
CN112422610A (en) * 2020-09-11 2021-02-26 深圳市证通电子股份有限公司 Intelligent gateway method and system based on distributed object storage

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6829649B1 (en) * 2000-11-10 2004-12-07 International Business Machines Corporation Method an congestion control system to allocate bandwidth of a link to dataflows
CN107579926A (en) * 2017-10-20 2018-01-12 南京易捷思达软件科技有限公司 The QoS methods to set up of Ceph cloud storage systems based on token bucket algorithm
CN108092915A (en) * 2017-12-01 2018-05-29 顺丰科技有限公司 A kind of QoS of customer flow control methods and device
CN110858808A (en) * 2018-08-23 2020-03-03 阿里巴巴集团控股有限公司 Method, system and device for realizing speed limit
CN111385214A (en) * 2018-12-27 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device and equipment
CN112422610A (en) * 2020-09-11 2021-02-26 深圳市证通电子股份有限公司 Intelligent gateway method and system based on distributed object storage
CN112383486A (en) * 2020-11-05 2021-02-19 北京同有飞骥科技股份有限公司 Lease-based distributed object storage service quality assurance method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YUHAN PENG ETC.: "Scalable QoS for Distributed Storage Clusters using Dynamic Token Allocation", 《2019 35TH SYMPOSIUM ON MASS STORAGE SYSTEMS AND TECHNOLOGIES (MSST)》 *
赵晋南等: "动态令牌分配的TCSN多级令牌桶流量监管算法", 《计算机工程》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113839996A (en) * 2021-09-10 2021-12-24 星辰天合(北京)数据科技有限公司 Method and device for object storage distributed quality service
CN113839996B (en) * 2021-09-10 2024-04-09 北京星辰天合科技股份有限公司 Method and device for storing distributed quality service by object
CN115396377A (en) * 2022-07-29 2022-11-25 天翼云科技有限公司 Method, device and equipment for optimizing service quality of object storage and storage medium
CN115396377B (en) * 2022-07-29 2024-03-12 天翼云科技有限公司 Method, device, equipment and storage medium for optimizing service quality of object storage
CN117608502A (en) * 2024-01-24 2024-02-27 济南浪潮数据技术有限公司 Data reconstruction management method, device, equipment and medium for distributed storage system

Also Published As

Publication number Publication date
CN113296717B (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN113296717B (en) Optimization method of object storage distributed service quality, server and storage equipment
CN107276827B (en) Method and device for realizing Qos in distributed storage system
CN106708608B (en) Distributed lock service method, acquisition method and corresponding device
CN109064327B (en) Intelligent contract processing method, device and equipment
US20180167326A1 (en) Method and system for limiting data traffic
CN113965519B (en) Flow control and cluster resource guarantee method, equipment and storage medium
CN111245732B (en) Flow control method, device and equipment
CN110659137A (en) Processing resource allocation method and system for offline tasks
WO2023071969A1 (en) Manycore system-based task scheduling method and system, electronic device, and medium
CN111124304A (en) Data migration method and device, electronic equipment and storage medium
CN108241535B (en) Resource management method and device and server equipment
CN113328957B (en) Flow control method and device and electronic equipment
CN116866167A (en) Network card hybrid nucleophilic hardware binding method, device and storage medium
CN110968406A (en) Method, device, storage medium and processor for processing task
CN110908790B (en) Memory storage device and operation method thereof
CA2371978A1 (en) Packet switch
CN110554922A (en) System resource allocation method and device
CN117093345B (en) Task linked list execution method and device, terminal equipment and storage medium
CN111757386B (en) Download control method and device
US11050627B2 (en) Method and network device for enabling in-place policy updates
US11520638B1 (en) Combined active and preinitialized resource management for rapid autoscaling
WO2023165559A1 (en) Asset information collection method, electronic device and computer-readable storage medium
WO2024098770A1 (en) Application program management method and system, electronic device, and computer readable medium
US11481262B1 (en) Rapid autoscaling with preinitialized instance quantity based on historical scale up rate
WO2024001282A1 (en) Acl rule processing method, apparatus, and storage medium

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