How many bits per point in a whisper file in graphite

October 19, 2012   

This is an easy one. You do an ls over a whisper file and get something like

1.1M -rwxr-xr-x  1 root root 1.1M Aug  9 11:06 Active.wsp

Now you are planning to save more metrics in your graphite server or want more points in your retention so you want to plan how much space you’ll need given an estimated guess of your metric count out 6 months from now. So you can run the following over that whisper file to get info on it.

$ whisper-info.py Active.wsp

maxRetention: 31536000
xFilesFactor: 0.5
aggregationMethod: average
fileSize: 1062772

Archive 0
retention: 604800
secondsPerPoint: 60
points: 10080
size: 120960
offset: 52

So you see for Archive 0 we have a certain size and number of points. So from here it’s easy math

120960 / 10080 = 12

So for each whisper data point you save it will allocate 12 bits on your filesystem. So you can plan our growth since carbon pre-allocates the space needed for whisper files so your disk isn’t doing any random seeks while pulling up data for your graphs.



comments powered by Disqus