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

[procstat] Provide "rollup" per process to avoid lots of threads causing high cardinality problems in InfluxDB #1451

Closed
daviesalex opened this issue Jul 4, 2016 · 1 comment

Comments

@daviesalex
Copy link

daviesalex commented Jul 4, 2016

Troubleshooting InfluxDB performance with @jwilder , @toddboom , @benbjohnson , @pauldix and @fred-influx we have realized that under the default config, the "pid" tag in the procstat plugin in real world environments is too high cardinality and produces pathological performance. For us the number of processes isnt crazy (we are choosing specific processes, such as MySQL to target). The issue is that the number of threads that can be produced is extremely high and thus the number of PIDs is extremely high. In almost all cases, when using this data, we only care about the sum of all threads at any one time.

Moving this to a field makes the data difficult to query, so we eliminated that as a solution on its own[1]. We discussed some options internally:

  1. Compute a per-runtime thread_number based on sorting each thread by time created
  2. Provide an option to roll up all threads into a process, i.e. capture one element per process with rolled up data
  3. Move PID to a field (perhaps still providing an option to "roll up" to one metric per process rather than thread)

Our preference is (3):

  1. Move PID to a field
  2. Provide an option to do a "rollup" per process, which sums the values that make sense to sum, passes through the values that dont, and adds a metric like num_threads [in reality, we are doing this at query time most of the time]

RFC from others

[1] but in #1460 others suggested that a field would be a good solution for them on its own. If we can build a consensus on what to do in this issue (perhaps several options with config file settings), we are happy to adjust this plugin and send a PR.

@daviesalex
Copy link
Author

Closing as #1460 is better written

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

No branches or pull requests

1 participant