Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monitor: expose rocksdb statistics to pegasus #212

Merged
merged 12 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rdsn
Submodule rdsn updated 82 files
+0 −1 doc/examples.layer1.h
+15 −1 include/dsn/cpp/pipeline.h
+2 −0 include/dsn/cpp/rpc_holder.h
+14 −0 include/dsn/dist/fmt_logging.h
+1 −1 include/dsn/dist/replication/replica_base.h
+6 −3 include/dsn/dist/replication/replication.codes.h
+7 −4 include/dsn/tool-api/network.h
+0 −6 include/dsn/tool-api/task_queue.h
+0 −2 src/apps/skv/config.ini
+0 −2 src/apps/skv/vconfig.ini
+0 −12 src/core/core/task_engine.cpp
+6 −19 src/core/core/task_queue.cpp
+0 −1 src/core/tests/config-test-corrupt-message.ini
+0 −1 src/core/tests/config-test-posix-aio.ini
+0 −1 src/core/tests/config-test-sim.ini
+0 −3 src/core/tests/config-test.ini
+34 −0 src/core/tests/pipeline_test.cpp
+0 −1 src/dist/cli/shell/config.ini
+24 −33 src/dist/replication/lib/prepare_list.cpp
+13 −17 src/dist/replication/lib/prepare_list.h
+2 −1 src/dist/replication/lib/replica.cpp
+5 −4 src/dist/replication/lib/replica_learn.cpp
+0 −1 src/dist/replication/test/meta_test/unit_test/config-ddl-test.ini
+0 −1 src/dist/replication/test/meta_test/unit_test/config-test.ini
+0 −2 src/dist/replication/test/replica_test/unit_test/config-test.ini
+0 −2 src/dist/replication/test/simple_kv/case-000.ini
+0 −2 src/dist/replication/test/simple_kv/case-001.ini
+0 −2 src/dist/replication/test/simple_kv/case-002.ini
+0 −2 src/dist/replication/test/simple_kv/case-003.ini
+0 −2 src/dist/replication/test/simple_kv/case-004.ini
+0 −2 src/dist/replication/test/simple_kv/case-005.ini
+0 −2 src/dist/replication/test/simple_kv/case-006.ini
+0 −2 src/dist/replication/test/simple_kv/case-100.ini
+0 −2 src/dist/replication/test/simple_kv/case-101.ini
+0 −2 src/dist/replication/test/simple_kv/case-102.ini
+0 −2 src/dist/replication/test/simple_kv/case-103.ini
+0 −2 src/dist/replication/test/simple_kv/case-104.ini
+0 −2 src/dist/replication/test/simple_kv/case-105.ini
+0 −2 src/dist/replication/test/simple_kv/case-106.ini
+0 −2 src/dist/replication/test/simple_kv/case-107.ini
+0 −2 src/dist/replication/test/simple_kv/case-108.ini
+0 −2 src/dist/replication/test/simple_kv/case-109.ini
+0 −2 src/dist/replication/test/simple_kv/case-200.ini
+0 −2 src/dist/replication/test/simple_kv/case-201.ini
+0 −2 src/dist/replication/test/simple_kv/case-202-0.ini
+0 −2 src/dist/replication/test/simple_kv/case-202-1.ini
+0 −2 src/dist/replication/test/simple_kv/case-203-0.ini
+0 −2 src/dist/replication/test/simple_kv/case-203-1.ini
+0 −2 src/dist/replication/test/simple_kv/case-204.ini
+0 −2 src/dist/replication/test/simple_kv/case-205.ini
+0 −2 src/dist/replication/test/simple_kv/case-206.ini
+0 −2 src/dist/replication/test/simple_kv/case-207.ini
+0 −2 src/dist/replication/test/simple_kv/case-208.ini
+0 −2 src/dist/replication/test/simple_kv/case-209.ini
+0 −2 src/dist/replication/test/simple_kv/case-210.ini
+0 −2 src/dist/replication/test/simple_kv/case-211.ini
+0 −2 src/dist/replication/test/simple_kv/case-212.ini
+0 −2 src/dist/replication/test/simple_kv/case-213.ini
+0 −2 src/dist/replication/test/simple_kv/case-214.ini
+0 −2 src/dist/replication/test/simple_kv/case-215.ini
+0 −2 src/dist/replication/test/simple_kv/case-216.ini
+0 −2 src/dist/replication/test/simple_kv/case-300-0.ini
+0 −2 src/dist/replication/test/simple_kv/case-300-1.ini
+0 −2 src/dist/replication/test/simple_kv/case-300-2.ini
+0 −2 src/dist/replication/test/simple_kv/case-301.ini
+0 −2 src/dist/replication/test/simple_kv/case-302.ini
+0 −2 src/dist/replication/test/simple_kv/case-303.ini
+0 −2 src/dist/replication/test/simple_kv/case-304.ini
+0 −2 src/dist/replication/test/simple_kv/case-305.ini
+0 −2 src/dist/replication/test/simple_kv/case-306.ini
+0 −2 src/dist/replication/test/simple_kv/case-307.ini
+0 −2 src/dist/replication/test/simple_kv/case-400.ini
+0 −2 src/dist/replication/test/simple_kv/case-401.ini
+0 −2 src/dist/replication/test/simple_kv/case-402.ini
+0 −2 src/dist/replication/test/simple_kv/case-600.ini
+0 −2 src/dist/replication/test/simple_kv/case-601.ini
+0 −2 src/dist/replication/test/simple_kv/case-602.ini
+0 −2 src/dist/replication/test/simple_kv/case-603.ini
+0 −2 src/dist/replication/test/simple_kv/config.ini
+0 −1 src/tests/dsn/config-test.ini
+9 −16 thirdparty/build-thirdparty.sh
+76 −37 thirdparty/download-thirdparty.sh
1 change: 1 addition & 0 deletions src/server/brief_stat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static std::map<std::string, std::string> s_brief_stat_map = {
{"replica*eon.replica_stub*replicas.learning.count", "learning_count"},
{"replica*app.pegasus*manual.compact.running.count", "manual_compact_running_count"},
{"replica*app.pegasus*manual.compact.enqueue.count", "manual_compact_enqueue_count"},
{"replica*app.pegasus*rdb.block_cache.memory_usage", "rdb_block_cache_memory_usage"},
{"replica*eon.replica_stub*shared.log.size(MB)", "shared_log_size(MB)"},
{"replica*server*memused.virt(MB)", "memused_virt(MB)"},
{"replica*server*memused.res(MB)", "memused_res(MB)"},
Expand Down
15 changes: 15 additions & 0 deletions src/server/info_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ void info_collector::on_app_stat()
all.recent_abnormal_count += row.recent_abnormal_count;
all.storage_mb += row.storage_mb;
all.storage_count += row.storage_count;
all.rdb_block_cache_hit_count += row.rdb_block_cache_hit_count;
all.rdb_block_cache_total_count += row.rdb_block_cache_total_count;
all.rdb_block_cache_mem_usage += row.rdb_block_cache_mem_usage;
all.rdb_index_and_filter_blocks_mem_usage += row.rdb_index_and_filter_blocks_mem_usage;
all.rdb_memtable_mem_usage += row.rdb_memtable_mem_usage;
read_qps[i] = row.get_qps + row.multi_get_qps + row.scan_qps;
write_qps[i] = row.put_qps + row.multi_put_qps + row.remove_qps + row.multi_remove_qps +
row.incr_qps + row.check_and_set_qps + row.check_and_mutate_qps;
Expand All @@ -123,6 +128,12 @@ void info_collector::on_app_stat()
counters->recent_abnormal_count->set(row.recent_abnormal_count);
counters->storage_mb->set(row.storage_mb);
counters->storage_count->set(row.storage_count);
counters->rdb_block_cache_hit_rate->set(row.rdb_block_cache_hit_count /
row.rdb_block_cache_total_count);
counters->rdb_block_cache_mem_usage->set(row.rdb_block_cache_mem_usage);
counters->rdb_index_and_filter_blocks_mem_usage->set(
row.rdb_index_and_filter_blocks_mem_usage);
counters->rdb_memtable_mem_usage->set(row.rdb_memtable_mem_usage);
counters->read_qps->set(read_qps[i]);
counters->write_qps->set(write_qps[i]);
}
Expand Down Expand Up @@ -166,6 +177,10 @@ info_collector::AppStatCounters *info_collector::get_app_counters(const std::str
INIT_COUNER(recent_abnormal_count);
INIT_COUNER(storage_mb);
INIT_COUNER(storage_count);
INIT_COUNER(rdb_block_cache_hit_rate);
INIT_COUNER(rdb_block_cache_mem_usage);
INIT_COUNER(rdb_index_and_filter_blocks_mem_usage);
INIT_COUNER(rdb_memtable_mem_usage);
INIT_COUNER(read_qps);
INIT_COUNER(write_qps);
_app_stat_counters[app_name] = counters;
Expand Down
4 changes: 4 additions & 0 deletions src/server/info_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class info_collector
::dsn::perf_counter_wrapper recent_abnormal_count;
::dsn::perf_counter_wrapper storage_mb;
::dsn::perf_counter_wrapper storage_count;
::dsn::perf_counter_wrapper rdb_block_cache_hit_rate;
::dsn::perf_counter_wrapper rdb_block_cache_mem_usage;
::dsn::perf_counter_wrapper rdb_index_and_filter_blocks_mem_usage;
::dsn::perf_counter_wrapper rdb_memtable_mem_usage;
::dsn::perf_counter_wrapper read_qps;
::dsn::perf_counter_wrapper write_qps;
};
Expand Down
Loading