-
Notifications
You must be signed in to change notification settings - Fork 981
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
feat(server): adding matrices for memory defrag #535
Conversation
src/server/server_family.cc
Outdated
@@ -1304,6 +1305,8 @@ void ServerFamily::Info(CmdArgList args, ConnectionContext* cntx) { | |||
append("total_writes_processed", m.conn_stats.io_write_cnt); | |||
append("async_writes_count", m.conn_stats.async_writes_cnt); | |||
append("parser_err_count", m.conn_stats.parser_err_cnt); | |||
append("defragmentations_tries_total", m.defrag_stats.tries); | |||
append("defragmented_addresses_total", m.defrag_stats.success_count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some renaming:
defragmentations_tries_total -> defrag_attempt_total
defragmented_addresses_total -> defrag_realloc_total
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
src/server/server_family.h
Outdated
@@ -35,6 +35,7 @@ struct Metrics { | |||
SliceEvents events; | |||
TieredStats tiered_stats; | |||
EngineShard::Stats shard_stats; | |||
EngineShard::DefragStats defrag_stats; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see why it should be separate from EngineShard::Stats, I would move it there since these are part of the shard stats
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this type completely (it would require small change in unit test as well).
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
c0584a4
to
00540b5
Compare
Signed-off-by: Boaz Sade boaz@dragonflydb.io
Add metrics for the memory defragmentation.
This see this run the command "info stats"
Two new entries:
defrag_attempt_total - the total number of times that the stasks (for all shards) checked memory for possible defragmentation
defrag_realloc_total - the total number of pointers (from all shards) that were moved dues defragmentation