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

*: optimize runtime.FDUsage + add OS level FD metrics #12214

Merged
merged 3 commits into from
Aug 13, 2020
Merged

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Aug 12, 2020

No need to count when we just want the count.

And expose it via metrics that can be used for setting up the monitoring and alarms:

(Prometheus exposes similar ones, while os_fd_... are the ones perceived by etcd)

...
# HELP os_fd_limit The file descriptor limit.
# TYPE os_fd_limit gauge
os_fd_limit 120000
# HELP os_fd_used The number of used file descriptors.
# TYPE os_fd_used gauge
os_fd_used 14
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.31
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 120000
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 17
...

@gyuho
Copy link
Contributor Author

gyuho commented Aug 12, 2020

/cc @xiang90 @cfc4n @tangcong @spzala

No need sort when we just want the counts.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Similar counts are exposed via Prometheus.
This adds the one that are perceived by etcd server.

e.g.

os_fd_limit 120000
os_fd_used 14
process_cpu_seconds_total 0.31
process_max_fds 120000
process_open_fds 17

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Copy link
Contributor

@tangcong tangcong left a comment

Choose a reason for hiding this comment

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

lgtm. thanks.

@gyuho gyuho merged commit 93cf449 into etcd-io:master Aug 13, 2020
@gyuho gyuho deleted the fd branch August 13, 2020 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants