On Saturday, December 15, 2012 8:47:28 AM UTC-5, Pradeep Chhetri wrote:
I am working to plot my opentsdb metrics using dygraph (javascript graphing library) so as to make the graphs more interactive. Currently, I am using the command line opentsdb tools to query for the datapoints of a metric. But collecting all the datapoints for last one day of a particular metric is itself taking nearly 2 seconds. I want to know how the web interface of opentsdb queries for a particular metrics. Can someone please help me in making this query faster.
The GUI uses the HTTP API for querying data, though if you're just graphing with the front-end, it will return a PNG. You can append a tag to have it return JSON data instead that you could use in your own graphing library instead of using the CLI.
Some things you can do to improve read speed include:
- if you are requesting an entire day of datapoints, and the recording frequency is high (such as a data point once per second), try downsampling. That way, the API/CLI will have less data to return to a query.
- Run a separate TSD instance that you use exclusively for queries. If you have a lot of write traffic to a TSD, querying will take longer. If you can, run a TSD on a separate box, or run a separate instance on a different port.
- Investigate HBase tuning to make sure you're getting the most performance from your backend as you can.
Hopefully some of that helps.