graphite web refreshes too slow

Asked by peichao on 2016-05-24

I've successly installed graphite in VirtualBox using the synthesize script. I used the provided by the synthesize tool to test the graphite web. It works, but with an issue: The figues in the dashboard refresh too slow. In, the data are updated and sent every 1s. But the figures refresh every minutes. How can I make graphite refresh its figure more faster? Thanks a lot.

Question information

English Edit question
Graphite Edit question
No assignee Edit question
Solved by:
Jason Dixon
Last query:
Last reply:
Denis Zhdanov (deniszhdanov) said : #1

IIRC syntesize has graphite retention schema with 60 seconds resolution -
You need to change that and remove old wsp files.

peichao (pczhang-3) said : #2

Dear Denis Zhdanov, after following your suggestions, the issure still exists.
1. looks like this (it sends data every 1 second):
 while True:
  now = int( time.time() )
  lines = []
  lines.append("carbon.loadavg_1 %s %d" % (random.uniform(0, 60),now))
 #send data every 1s

2.In the carbon.conf, I've defined:

3. In the storage-schemas.conf, I've defined:
pattern = ^collectd\.
retentions = 1s:1d, 60s:1w

pattern = .*
retentions = 1s:1d

4. delete the old wsp files.

BUT the graphite still refresh its figures (dashboard and composer) every minute rather than 1s. What I want is to change the default refresh interval of graphite. Could you please point me how to do this systematacially?

Another question, I found the dashboard will "flash" each time it renders the figures. Is there a way to avoid that?

Thank you very much.

peichao (pczhang-3) said : #3

Just to provide more details. I plan to use graphite as a general monitor system, to visualize the calculation results of some softwares in a realtime manner with a interval less then several seconds. HOPE the graphite could meet my needs! Thanks.

Denis Zhdanov (deniszhdanov) said : #4

carbon.* metrics has a special meaning (internal carbon stats) and they're processing by different way. Do not use it for own metrics.
Rename your metric 'carbon.loadavg_1' to e.g. 'test.loadavg_1'

peichao (pczhang-3) said : #5

Dear Denis Zhdanov, I changed the metric name:

 lines.append("test.loadavg_1 %s %d" % (random.uniform(0, 60),now))

But the problem still exists :-(

Sorry to disturb you again and again, as it is a very simple problem. Now I'm questioning if the refresh interval of graphite can be reduced to below 60s, and if it supports rendering the figure in realtime, e.g., several seconds time scale. I still hope you can help me. Thanks a lot.

Jason Dixon (jason-dixongroup) said : #6

No, the Composer UI does not support a lower refresh interval. This would probably be an easy addition if anyone wants to take a stab at it. Conversely, Grafana allows up to 5s refresh.

Personally, I don't see a lot of value going to 1s refresh on a system that only allows up to 1s precision.

peichao (pczhang-3) said : #7

Thank you, Jason Dixon! Your answer really helps me.

The live demo of Grafana looks so great!

There are three alternative data sources for Grafana: Graphite, InfluxDB and OpenTSDB. Would the performance of Grafana depend on the chosen data source? In other words, if I select Graphite as the data source, could Grafana allow up to 5s refresh? What's your suggestion for using Grafana?

 Is there similar installation scripts for Grafana? BTW, Thanks for your synthesize tool.

peichao (pczhang-3) said : #8

Is synthesize compatible with Grafana? I mean can I install Grafana after installing Graphite using synthesize?

Best Jason Dixon (jason-dixongroup) said : #9

" if I select Graphite as the data source, could Grafana allow up to 5s refresh? What's your suggestion for using Grafana?"

Those are very subjective questions. Yes, you could easily build a Graphite server that would allow 5s refresh... until such point where it becomes so popular and overloaded that you can't. This is true of any software.

"Is synthesize compatible with Grafana? I mean can I install Grafana after installing Graphite using synthesize?"


peichao (pczhang-3) said : #10

I tried Grafana with Graphite as datasource. Yes, it can refresh as fast as 5s. But it simply shows blank data until the next minute. That is, the REAL refresh interval is still 60s.

Hope other guys who want a faster refresh rate won't waste time here.

Thank you all.

peichao (pczhang-3) said : #11

Thanks Jason Dixon, that solved my question.

Denis Zhdanov (deniszhdanov) said : #12

If "it simply shows blank data until the next minute" then you still have wrong setup and your retention is still 60 s, sorry.
 Graphite definitely able to have 1s resolution. Just saying that for "other guys who want a faster refresh rate" here.