* An AWS-compliant API: "GetTopicAttributes" was added to replace the existing "GetTopic" API. The new API
should be used to fetch information about topics used for bucket notifications.
+* librbd: The shared, read-only parent cache's config option ``immutable_object_cache_watermark`` now has been updated
+ to property reflect the upper cache utilization before space is reclaimed. The default ``immutable_object_cache_watermark``
+ now is ``0.9``. If the capacity reaches 90% the daemon will delete cold cache.
+
>=15.0.0
--------
.. important:: ``ceph-immutable-object-cache`` daemon requires the ability to
connect RADOS clusters.
-Run Daemon
-----------
+Running the Immutable Object Cache Daemon
+-----------------------------------------
``ceph-immutable-object-cache`` daemon should use a unique Ceph user ID.
To `create a Ceph user`_, with ``ceph`` specify the ``auth get-or-create``
QOS Settings
------------
-Immutable object cache supports throttle, controlled by the following settings.
+The immutable object cache supports throttling, controlled by the following settings:
``immutable_object_cache_qos_schedule_tick_min``
.set_description("immutable object cache client dedicated thread number"),
Option("immutable_object_cache_watermark", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
- .set_default(0.1)
+ .set_default(0.9)
.set_description("immutable object cache water mark"),
Option("immutable_object_cache_qos_schedule_tick_min", Option::TYPE_MILLISECS, Option::LEVEL_ADVANCED)
static void SetUpTestCase() {}
static void TearDownTestCase() {}
void SetUp() override {
- m_simple_policy = new SimplePolicy(g_ceph_context, m_cache_size, 128, 0.1);
+ m_simple_policy = new SimplePolicy(g_ceph_context, m_cache_size, 128, 0.9);
// populate 50 entries
for (uint64_t i = 0; i < m_cache_size / 2; i++, m_entry_index++) {
insert_entry_into_promoted_lru(generate_file_name(m_entry_index));
TEST_F(TestSimplePolicy, test_evict_list_0) {
std::list<std::string> evict_entry_list;
- // 0.1 is watermark
+ // the default water mark is 0.9
ASSERT_TRUE((float)m_simple_policy->get_free_size() > m_cache_size*0.1);
m_simple_policy->get_evict_list(&evict_entry_list);
ASSERT_TRUE(evict_entry_list.size() == 0);
("immutable_object_cache_qos_bps_burst_seconds"));
}
+ if ((cache_watermark <= 0) || (cache_watermark > 1)) {
+ lderr(m_cct) << "Invalid water mark provided, set it to default." << dendl;
+ cache_watermark = 0.9;
+ }
m_policy = new SimplePolicy(m_cct, cache_max_size, max_inflight_ops,
cache_watermark);
}
<< " snapshot: " << snap_id << dendl;
int ret = 0;
- std::string cache_file_name = get_cache_file_name(pool_nspace, pool_id, snap_id, object_name);
+ std::string cache_file_name =
+ get_cache_file_name(pool_nspace, pool_id, snap_id, object_name);
librados::IoCtx ioctx;
{
std::lock_guard _locker{m_ioctx_map_lock};
<< " in pool ID : " << pool_id << dendl;
int pret = -1;
- std::string cache_file_name = get_cache_file_name(pool_nspace, pool_id, snap_id, object_name);
+ std::string cache_file_name =
+ get_cache_file_name(pool_nspace, pool_id, snap_id, object_name);
cache_status_t ret = m_policy->lookup_object(cache_file_name);
std::unique_lock locker{m_cache_map_lock};
// check free ratio, pop entries from LRU
- if ((double)m_cache_size / m_max_cache_size > (1 - m_watermark)) {
+ if ((double)m_cache_size > m_max_cache_size * m_watermark) {
// TODO(dehao): make this configurable
int evict_num = m_cache_map.size() * 0.1;
for (int i = 0; i < evict_num; i++) {