Skip to content

feat(server): Expose total host memory as part of info metrics #4953

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abhijat
Copy link
Contributor

@abhijat abhijat commented Apr 17, 2025

The total host memory is expected by some applications such as mastodon to determine if sidekiq is operational. This field is exposed as part of metrics.

Some context is in #4596 (comment)

The total host memory is expected by some applications such as mastodon
to determine if sidekiq is operational. This field is exposed as part of
metrics.

Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
@@ -2423,6 +2423,8 @@ string ServerFamily::FormatInfoMetrics(const Metrics& m, std::string_view sectio
}
}
append("table_used_memory", total.table_mem_usage);
append("total_system_memory", total_host_memory);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's take it offline - it's news to me that sidekiq requires it - I want to understand more.
exposing free host memory is tricky - it depends on many environmental factors so I prefer to avoid it if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

It's not actually sidekiq that needs it, there is a method in a mastodon module that uses the stats to determine whether sidekiq is usable, https://github.com/mastodon/mastodon/blob/main/app/workers/scheduler/self_destruct_scheduler.rb#L22-L26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants