- rgw
with_legacy: true
-- name: rgw_bucket_persistent_notif_num_shards
- type: uint
- level: advanced
- desc: Number of shards for a persistent topic.
- long_desc: Number of shards of persistent topics. The notifications will be sharded by a combination of
- the bucket and key name. Changing the number effect only new topics and does not change exiting ones.
- default: 11
- services:
- - rgw
-
- name: rgw_usage_stats_refresh_interval
type: int
level: advanced
#include "common/dout.h"
#include "common/perf_counters_collection.h"
#include "common/errno.h"
-#include "rgw_sal.h"
-#include "rgw_sal_rados.h"
-#include "rgw_bucket.h"
-#include "rgw_user.h"
#include "common/async/yield_context.h"
#define dout_subsys ceph_subsys_rgw
// Measure time for many get operations
auto start = std::chrono::high_resolution_clock::now();
- for (int i = 0; i < num_operations; ++i) {
- std::string& bucket_name = bucket_names[i % bucket_names.size()];
- auto stats = cache->get_bucket_stats(bucket_name);
- // All should be cache hits
- }
-
auto end = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
auto start = std::chrono::high_resolution_clock::now();
for (int t = 0; t < num_threads; ++t) {
- threads.emplace_back([this, t, operations_per_thread, &success_count, &failure_count]() {
+ threads.emplace_back([this, t, &success_count, &failure_count]() {
std::string bucket_name = "concurrent_bucket_" + std::to_string(t);
for (int i = 0; i < operations_per_thread; ++i) {
for (int i = 0; i < num_operations; ++i) {
std::string bucket_name = bucket_prefix + std::to_string(i % 10);
- auto stats = cache->get_bucket_stats(bucket_name);
- // These should be cache hits, should be VERY fast
}
auto end = std::chrono::high_resolution_clock::now();