Multi-threaded traffic shaper
AssigneeGraphiant, Inc.
InventorsBrian Russell, Neale Ranns
Life of this patent
Estimating the term…
Abstract
Embodiments of a computing device for traffic shaping are disclosed. In an embodiment, the computing device includes one or more processor(s) coupled to a memory. The memory includes a set of instructions which when executed causes the one or more processor(s) to divide a burst period associated with a shaper queue into a plurality of microbursts based at least on a count of worker threads corresponding to a plurality of queues and a shaper bandwidth. The plurality of queues constitutes the shaper queue.
Claims16
A computing device for traffic shaping, the computing device comprising:
- one or more processor(s) coupled to a memory, wherein the memory comprises a set of instructions which when executed causes the one or more processor(s) to:
- divide a burst period associated with a shaper queue into a plurality of microbursts based at least on a count of worker threads corresponding to a plurality of queues and a shaper bandwidth, wherein the plurality of queues constitutes the shaper queue;
- generate one or more tokens to be filled in a token bucket;
- fill the token bucket with the generated one or more tokens after every burst period in such a manner that the one or more tokens in the token bucket correspond to the shaper bandwidth, wherein the one or more tokens are used for a dequeue operation to dequeue packets from the plurality of queues;
- maintain a token balance that comprises tokens corresponding to a number of bytes that can be dequeued during a dequeue operation;
- subtract bytes dequeued during the dequeue operation from the token balance;
- and
- add bytes worth a microburst to the token balance from the token bucket.
A traffic shaping device comprising:
- a memory comprising one or more modules executable by a processor coupled to the memory, the one or more modules comprising:
- an updater configured to:
- realize a shaper queue as an aggregate of a plurality of queues, the plurality of queues corresponding to a plurality of worker threads;
- divide a burst period into a plurality of microbursts based at least on a count of the plurality of worker threads and a shaper bandwidth;
- generate one or more tokens to be filled in a token bucket;
- fill the token bucket with the generated one or more tokens after every burst period in such a manner that the one or more tokens in the token bucket correspond to the shaper bandwidth, wherein the one or more tokens are used for a dequeue operation to dequeue packets from the plurality of queues;
- maintain a token balance that comprises tokens corresponding to a number of bytes that can be dequeued during a dequeue operation;
- subtract bytes dequeued during the dequeue operation from the token balance;
- and
- add bytes worth a microburst to the token balance from the token bucket;
- an enqueuer configured to perform an enqueue operation simultaneously on the plurality of worker threads;
- and
- a dequeuer configured to perform a dequeue operation simultaneously on the plurality of worker threads, wherein the enqueue and the dequeue operations are performed once every burst period associated with the shaper queue.
A computer-implemented method for shaping of incoming traffic, the method comprising:
- implementing a shaper queue as an aggregate of a plurality of queues, the plurality of queues corresponding to a plurality of worker threads;
- dividing a burst period associated with the shaper queue into a plurality of microbursts based at least on a count of the plurality of worker threads and a shaper bandwidth;
- generating one or more tokens to be filled in a token bucket;
- filling the token bucket with the generated one or more tokens after every burst period in such a manner that the one or more tokens in the token bucket correspond to the shaper bandwidth, wherein the one or more tokens are used for a dequeue operation to dequeue packets from the plurality of queues;
- maintaining a token balance that comprises tokens corresponding to a number of bytes that can be dequeued during a dequeue operation;
- subtracting bytes dequeued during the dequeue operation from the token balance;
- and
- adding bytes worth a microburst to the token balance from the token bucket;
- performing an enqueue operation simultaneously on the plurality of worker threads;
- and
- performing a dequeue operation simultaneously on the plurality of worker threads, wherein the enqueue and the dequeue operations are performed once every burst period associated with the shaper queue.
Dependencies are inferred from the claim text.