System and method for throttling service requests using work-based tokens
First Claim
1. A method, comprising:
- performing, by a computer system that provides storage services to clients;
receiving a request to read or write data on behalf of a client;
determining whether at least one token is present in a token bucket, wherein each token in the token bucket represents a unit of work for an input/output (I/0) operation in terms of a fixed amount of data transferred;
in response to determining that at least one token is present in the token bucket;
accepting the received request for servicing;
deducting an initial number of tokens from the token bucket;
servicing the received request, wherein said servicing comprises transferring a particular amount of data, and wherein the amount of data transferred in servicing different service requests is non-uniform;
determining that the particular amount of data transferred is more or less than the transferred data amount represented by the initial number of tokens; and
in response to determining that the particular amount of data transferred is more or less than the transferred data amount represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the particular amount of data transferred and the transferred data amount represented by the initial number of tokens;
wherein said deducting an initial number of tokens from the token bucket, said determining that the particular amount of data transferred is more or less than the transferred data amount represented by the initial number of tokens, and said deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket are performed in response to selection of an admission control mechanism that includes a token bucket comprising tokens that represent a fixed amount of data transferred from among two or more admission control mechanisms supported in the system;
wherein subsequent to said deducting an additional number of tokens from the token bucket;
selecting a different one of the two or more admission control mechanisms;
receiving one or more additional service requests; and
managing the one or more additional service requests using the different admission control mechanism.
1 Assignment
0 Petitions
Accused Products
Abstract
A system that provides services to clients may receive and service requests, various ones of which may require different amounts of work. An admission control mechanism may manage requests based on tokens, each of which represents a fixed amount of work. The tokens may be added to a token bucket at rate that is dependent on a target work throughput rate while the number of tokens in the bucket does not exceed its maximum capacity. If at least a pre-determined minimum number of tokens is present in the bucket when a service request is received, it may be serviced. Servicing a request may include deducting an initial number of tokens from the bucket, determining that the amount of work performed in servicing the request is different than that represented by the initially deducted tokens, and deducting additional tokens from or replacing tokens in the bucket to reflect the difference.
-
Citations
31 Claims
-
1. A method, comprising:
-
performing, by a computer system that provides storage services to clients; receiving a request to read or write data on behalf of a client; determining whether at least one token is present in a token bucket, wherein each token in the token bucket represents a unit of work for an input/output (I/0) operation in terms of a fixed amount of data transferred; in response to determining that at least one token is present in the token bucket;
accepting the received request for servicing;
deducting an initial number of tokens from the token bucket;servicing the received request, wherein said servicing comprises transferring a particular amount of data, and wherein the amount of data transferred in servicing different service requests is non-uniform; determining that the particular amount of data transferred is more or less than the transferred data amount represented by the initial number of tokens; and in response to determining that the particular amount of data transferred is more or less than the transferred data amount represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the particular amount of data transferred and the transferred data amount represented by the initial number of tokens; wherein said deducting an initial number of tokens from the token bucket, said determining that the particular amount of data transferred is more or less than the transferred data amount represented by the initial number of tokens, and said deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket are performed in response to selection of an admission control mechanism that includes a token bucket comprising tokens that represent a fixed amount of data transferred from among two or more admission control mechanisms supported in the system; wherein subsequent to said deducting an additional number of tokens from the token bucket;
selecting a different one of the two or more admission control mechanisms;
receiving one or more additional service requests; andmanaging the one or more additional service requests using the different admission control mechanism. - View Dependent Claims (2, 3, 4)
-
-
5. A system, comprising:
-
one or more processors; and a memory coupled to the one or more processors and storing program instructions that when executed by the one or more processors cause the one or more processors to perform; receiving a service request; determining whether at least a pre-determined minimum number of tokens is present in a token bucket, wherein each token in the token bucket represents a fixed amount of work; in response to determining that at least the pre-determined minimum number of tokens is present in the token bucket; accepting the received service request for servicing; deducting an initial number of tokens from the token bucket; servicing the received service request, wherein said servicing comprises performing a particular amount of work, and wherein the amount of work performed in servicing different service requests is non-uniform; determining that the particular amount of work is greater than or less than the amount of work represented by the initial number of tokens; and in response to determining that the particular amount of work is greater than or less than the amount of work represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the particular amount of work and the amount of work represented by the initial number of tokens; wherein said deducting an initial number of tokens from the token bucket, said determining that the particular amount of work is more than the amount of work represented by the initial number of tokens, and said deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket are performed in response to selection of an admission control mechanism that includes a token bucket comprising tokens that represent a fixed amount of work from among two or more admission control mechanisms supported in the system; wherein when executed by the one or more processors the program instructions further cause the one or more processors to perform, subsequent to said deducting an additional number of tokens from the token bucket; selecting a different one of the two or more admission control mechanisms; receiving one or more additional service requests; and managing the one or more additional service requests using the different admission control mechanism. - View Dependent Claims (6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A method, comprising:
-
performing by a computer system; receiving a plurality of service requests, wherein the amount of work required to satisfy each of the service requests is non-uniform; and servicing at least a portion of the service requests, wherein said servicing comprises, for each of the service requests in the at least a portion of the service requests;
determining whether at least a pre-determined minimum number of tokens is present in a token bucket, wherein each token in the token bucket represents a fixed amount of work;in response to determining that at least the pre-determined minimum number of tokens is present in the token bucket;
accepting the received service request for servicing;
deducting an initial number of tokens from the token bucket;
performing a particular amount of work, wherein the amount of work performed in servicing different service requests is non-uniform;determining that the particular amount of work is greater than or less than the amount of work represented by the initial number of tokens; and
in response to determining that the particular amount of work is greater than or less than the amount of work represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the particular amount of work and the amount of work represented by the initial number of tokens;wherein said deducting an initial number of tokens from the token bucket, said determining that the particular amount of work is more than the amount of work represented by the initial number of tokens, and said deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket are performed in response to selection of an admission control mechanism that includes a token bucket comprising tokens that represent a fixed amount of work from among two or more admission control mechanisms supported in the system; wherein subsequent to said deducting an additional number of tokens from the token bucket; selecting a different one of the two or more admission control mechanisms;
receiving one or more additional service requests; and
managing the one or more additional service requests using the different admission control mechanism. - View Dependent Claims (18, 19, 20, 21, 22, 23)
-
-
24. A non-transitory, computer-readable storage medium storing program instructions that when executed on one or more computers cause the one or more computers to perform:
-
while the number of tokens in a token bucket is greater than or equal to a pre-determined minimum number of tokens and does not exceed a maximum capacity for the token bucket; generating tokens in the token bucket at a rate that is dependent on a target rate for performing work, wherein each token in the token bucket represents a unit of work; and servicing one or more received service requests, wherein said servicing comprises, for each of the received service requests; deducting an initial number of tokens from the token bucket;
performing a respective amount of work, wherein the amount of work performed in servicing different service requests is non-uniform;determining that the respective amount of work is greater than or less than the amount of work represented by the initial number of tokens; and in response to determining that the respective amount of work is greater than or less than the amount of work represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the respective amount of work and the amount of work represented by the initial number of tokens; wherein said deducting an initial number of tokens from the token bucket, said determining that the particular amount of work is more than the amount of work represented by the initial number of tokens, and said deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket are performed in response to selection of an admission control mechanism that includes a token bucket comprising tokens that represent a fixed amount of work from among two or more admission control mechanisms supported in the system; wherein subsequent to said deducting an additional number of tokens from the token bucket;
selecting a different one of the two or more admission control mechanisms;
receiving one or more additional service requests; and
managing the one or more additional service requests using the different admission control mechanism. - View Dependent Claims (25, 26, 27, 28, 29, 30, 31)
-
Specification