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

Add option max-tags-per-database to limit high cardinality data #7146

Closed
daviesalex opened this issue Aug 11, 2016 · 4 comments
Closed

Add option max-tags-per-database to limit high cardinality data #7146

daviesalex opened this issue Aug 11, 2016 · 4 comments

Comments

@daviesalex
Copy link
Contributor

Much as max-series-per-database in #7095, add a max-tags-per-database to limit high cardinality data.

Writes beyond that should be dropped and logged with a rate limit on the log (one summary log per minute or something saying x writes dropped).

This is important because if you accidentally load in a huge amount of high cardinality data, you can easily get into a place that InfluxDB will OOM if you attempt to delete the data, so your only choice is to try to move the files on disk out the way which deletes other data.

@daviesalex daviesalex changed the title Add option Add option max-tags-per-database to limit high cardinality data Aug 11, 2016
@sebito91
Copy link
Contributor

Would add to this that we should have alerts to the log when we start to
get close to the threshold, like 85%, 90%, etc.

Helps us stay proactive in cleanup and maintenance.

On Thursday, August 11, 2016, Alex Davies notifications@github.com wrote:

Much as max-series-per-database in #7095
#7095, add a
max-tags-per-database to limit high cardinality data.

Writes beyond that should be dropped and logged with a rate limit on the
log (one summary log per minute or something saying x writes dropped).

This is important because if you accidentally load in a huge amount of
high cardinality data, you can easily get into a place that InfluxDB will
OOM if you attempt to delete the data, so your only choice is to try to
move the files on disk out the way which deletes other data.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7146, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADA1nuIdOrtPkcMwEeq8XvT9D6NiTP0gks5qe58egaJpZM4Jim-5
.

Sebastian Borza

PGP: EDC2 BF61 4B91 14F2 AAB4 06C9 3744 7F3F E411 0D3E

@daviesalex
Copy link
Contributor Author

Of course if we do #7151 well (which looks great, thanks!), this becomes a non-issue; this is more of a sticking plaster until that can be done!

@jwilder jwilder added the RFC label Aug 17, 2016
@jwilder
Copy link
Contributor

jwilder commented Aug 17, 2016

A similar proposal is in #6679

@jwilder jwilder added this to the 1.1.0 milestone Sep 26, 2016
@summerjava
Copy link

summerjava commented Dec 13, 2016

This is important because if you accidentally load in a huge amount of high cardinality data, you can easily get into a place that InfluxDB will OOM if you attempt to delete the data,

I am curious, why would InfluxDB OOM when I attempt to delete the data?
Is it the index created on tag?
Can you give a Detailed explanation?

snsinfu added a commit to snsinfu/bit4 that referenced this issue Dec 11, 2017
The documentation suggests to add a unique tag for each point to avoid
points from overwritten when timestamps are the same[1]. I tried this
solution, and influxdb emits a warning after 100,000 insertions:

    WARN: 100% of max-values-per-tag limit exceeded: (100000/100000), db=testdb measurement=test tag=uniq service=store

The limit can be removed[2]. But it feels like a non-sustainable hack.
From my reading of the documentation[3] I understand that tags are not
meant to be used in this way. The issue that introduced the limit[4]
suggests that high cardinality data is bad. So, maybe I ought to try
another solution...

[1]: https://docs.influxdata.com/influxdb/v1.3/troubleshooting/frequently-asked-questions/#how-does-influxdb-handle-duplicate-points
[2]: https://stackoverflow.com/questions/43770354/max-values-per-tag-limit-exceeded-influxdb
[3]: https://docs.influxdata.com/influxdb/v1.3/concepts/schema_and_data_layout/#encode-meta-data-in-tags
[4]: influxdata/influxdb#7146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants