-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve performance with large Grafana installations #2
Comments
Dear Jan, thanks for using While it already has an appropriate caching subsystem which saves you from hitting Grafana each and every time to do searches on the JSON artefacts, the time-to-live is currently hardcoded to five minutes or so. This essentially renders it useless for your scenario, so you might not even have recognized that there is such a machinery under the hood at all. Saying that, I definitively second your suggestion about improving raw performance by parallelizing requests and will take this into account for the next iteration on the code. Also thanks for pointing out the API limit which caps the maximum number of returned results to 1000 as you say. I assume there will be appropriate paging or offset/limit parameters then which should be unlocked by Cheers, |
Yes, there is |
Dear Jan, we just released
Increasing the cache expiration time might give you a more reasonable balance between freshness and waiting time, at least you are now under control. With kind regards, |
Dear Jan, we just added the So, you might want to invoke
to warm up your local cache by running twenty requests in parallel and to keep cache content forever. For subsequent invocations, things should be faster than before¹ while trading in a bit of data freshness. We will be happy to hear about the outcome. With kind regards, |
¹ Saying that, the SQLite cache and the search method will probably soon become the bottlenecks when operating on the larger data set Regarding the cache backend, we have been able to improve cache performance for Luftdatenpumpe by using Redis. Regarding the searching itself, we might try PyPy first and will likely have to move on to Go or Rust if this doesn't help. Let me know if this works out reasonably for you and whether you see there's a chance we can tune the current Python implementation to cope with the installation scenario regarding high numbers of dashboards like you are operating with. |
👍 Cold cache test:
Warm cache for the same search:
Good job. BTW: according to doc user needs to use |
Happy to see this kind of speedup on the large installation you are operating there. Thanks for letting us know and enjoy your searches. |
1.) Dashboard search run serially
It is slow approach for Grafana instances with many dashboards, e.g.:
Python multiprocessing (parallel runs) can increase search speed in this case. There should be configuration to limit number of search processes, otherwise it can be "DDoS attack"
2.) Actually, Grafana instance from first example contains more than 1k dashboards, but there is default 1k API limits. There should be config/env variable to configure this limit.
Thanks.
The text was updated successfully, but these errors were encountered: