Sure, I'll do some tests with 1 second frequency. But my intuition tells me that this "hole every 20 seconds" comes from this:
| 1 second sleep | carbon plugin collects and pushes stats | 1 second sleep | carbon plugin collects ... | 1 second sleep | Lets assume that the time needed to collect is 0.04 second. So stats are sent like this (just time stamps since uWSGI start): 0, 1.04, 2.08, 3.12, ... 12.48, 13.52 Now look at two last time stamps, carbon gets time stamps as integers (seconds since epoch), so those two values will be rounded to 12 and 14, and we will have a gap. Is it only the part that sends packet to carbon server running as dedicated thread? If so than we still might get metrics collected with a little delay since master will call carbon plugin once it is done with other plugins and worker management. We would need to have whole carbon plugin as a dedicated thread and make sure that the only delay between metrics come from math done by this plugin itself. But still little host clock drifts will be visible on carbon graphs. I might be wrong about this, so I'll do proper testing on monday, numbers will tell. 2013/3/1 Roberto De Ioris <[email protected]> > > > 2013/3/1 Marcin Deranek <[email protected]> > > > >> I see gaps in the graphs, so I suspect we might see the very same > >> problem Łukasz reported some time ago (Subject: Carbon stats holes) > >> Not sure if it's related to the frequency I use (I send metrics every > >> second and gap (1 data point missing) is every ~20 seconds: this is > >> only temporarily) or it's a more generic problem - this on freshly built > >> 1.4.7 > >> > > > > I think that there is no way you won't get any gaps with such low > > frequency, parsing all stats and pushing them to carbon is not free. It > is > > done by master and there are other plugins eating master cycles, next > > master cycle when master calls plugins method starts 1 second after last > > cycle finished. So in practice carbon will be called not every exact > > second, but a little more (1.1s or something), after a while this added > > delay will manifest itself on carbon graphs. At least that's my guess. > > > > > Hmm, the new plugin uses the stats pusher system, so it runs in a > dedicated thread. Can you check if we can drop such holes ? (we have now > more freedom on the frequency and the 'heavyness' [in term of codes] of > the plugin) > > > -- > Roberto De Ioris > http://unbit.it > -- Łukasz Mierzwa
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
