]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/PrioritizedQueue: add min cost, max tokens per bucket
authorSage Weil <sage@inktank.com>
Mon, 21 Jan 2013 23:29:28 +0000 (15:29 -0800)
committerSage Weil <sage@inktank.com>
Tue, 22 Jan 2013 22:47:41 +0000 (14:47 -0800)
commit6e3363b20e590cd9df89f2caebe71867b94cc291
tree0afcb24dfb262966d0024a2d1d168e87b206ce9f
parentc549a0cf6fae78c8418a3b4b0702fd8a1e4ce482
common/PrioritizedQueue: add min cost, max tokens per bucket

Two problems.

First, we need to cap the tokens per bucket.  Otherwise, a stream of
items at one priority over time will indefinitely inflate the tokens
available at another priority.  The cap should represent how "bursty"
we allow a given bucket to be.  Start with 4MB for now.

Second, set a floor on the item cost.  Otherwise, we can have an
infinite queue of 0 cost items that start over queues.  More
realistically, we need to balance the overhead of processing small items
with the cost of large items.  I.e., a 4 KB item is not 1/1000th as
expensive as a 4MB item.

Signed-off-by: Sage Weil <sage@inktank.com>
src/common/PrioritizedQueue.h
src/common/config_opts.h
src/msg/DispatchQueue.h
src/osd/OSD.h