carbon icon indicating copy to clipboard operation
carbon copied to clipboard

Megacarbon: Rollup plugin (for ceres-maintenance) does not finish nightly

Open rowanu opened this issue 13 years ago • 10 comments

I'm running the rollup plugin nightly, but it's taking a looooooong time to run, and not finishing before the next night's run kicks-off.

I'm running with < 3GB of total metric data (which doesn't seem like that much), and there's only 3 months worth of data (so not too much rolling-up to be done).

I created this ticket to see if anyone else was having the same issue, and get @mleinart's input. I will investigate - the plugin seems to spend almost all its time in https://github.com/graphite-project/carbon/blob/megacarbon/plugins/maintenance/rollup.py#L83

rowanu avatar Feb 25 '13 15:02 rowanu

Lo-tech solution might just be to rollup once a week?

rowanu avatar Feb 25 '13 15:02 rowanu

I've got this problem too. https://github.com/graphite-project/ceres/issues/6

anatolijd avatar Jun 08 '13 19:06 anatolijd

Lo-tech solution might just be to rollup once a week?

Nope, I don't think so. I had ceres-maintenance running for ~ 14 days and it didn't finish. :-(

zstyblik avatar Jan 06 '14 14:01 zstyblik

we have already solved this problem in our version - here is the correct version of rollup plugin. https://github.com/dkulikovsky/carbon/blob/megacarbon/plugins/maintenance/rollup.py This, rewritten plugin, is compatible with stock ceres-maintanance.py script.

The problem was in plugin it self, the code was far far far far from being optimal to rollup lots of data (and at some point it goes into infinite loop). My version is optimized for huge ceres data storages (well it's not really that huge, our rollup plugin works with ~10M of metrics).

dkulikovsky avatar Jan 09 '14 16:01 dkulikovsky

Cool! I'll give it a look and try tomorrow. We're sort of boned right now, because my estimate is rollup will take 30 days to complete. I mean, pointless effort.

estimate: ~ 60 servers, 130k-140k(?) ceres nodes

Anyway, tomorrow!

zstyblik avatar Jan 09 '14 16:01 zstyblik

@dkulikovsky that's cool, are you going to put in a PR for your new version of the rollup.py?

rowanu avatar Jan 09 '14 19:01 rowanu

@dkulikovsky - your rewrite of rollup plugin was much, much better. Done in 15-30minutes(I don't remember), regular rollup takes just a couple minutes now. Thanks! Do you have any plans for merge requests? And I mean even for ceres and graphite-web. Because it will be pain to constantly patch and merge your fixes with upstream. Perhaps I could merge in your fixes and then create merge request(s) to upstream.

EDIT: just to add, I/O wait is now gone and machine seems to be "idle" again(boring). I've scheduled:

  • rollup - every 30 minutes
  • defrag - every 60 minutes

yawn :)

zstyblik avatar Jan 10 '14 13:01 zstyblik

We scheduled rollup hourly at first time, but then moved to daily schedule, because with our number of metrics rollup works for 2-3 hours.

About merging to upstream - i have issued few pull requests for merging to upstream for all critical bugs (except rollup it self). So, we are waiting for maintainers to come in. It is worth noting that most of my patches relates to megacarbon branch.

Also, we have fixed defrag, https://github.com/dkulikovsky/carbon/blob/megacarbon/plugins/maintenance/merge.py . It runs under ceres-maintanance, just like rollup.

dkulikovsky avatar Jan 10 '14 16:01 dkulikovsky

We scheduled rollup hourly at first time, but then moved to daily schedule, because with our number of metrics rollup works for 2-3 hours.

I wonder, have you experimented with running ceres-maintenance as a deamon? Although I think about such option as a step back to whisper, sort of.

About merging to upstream - i have issued few pull requests for merging to upstream for all critical bugs (except rollup it self). So, we are waiting for maintainers to come in. It is worth noting that most of my patches relates to megacarbon branch.

I have like 79 patches of yours from ceres, graphite-web and megacarbon. However, I've seen like three PRs from you(at least I remember only three and if there are more, I'm sorry). On the other hand, those three(or at least two of them) are pending without any sign of life which I find rather sad. I can't tell (just yet) whether all 79 changes are worth of PR to upstream or not. I know some are though. As I've said earlier, I can merge your changes into "my fork" and then do PR and ping maintainers from time to time.

Also, we have fixed defrag, https://github.com/dkulikovsky/carbon/blob/megacarbon/plugins/maintenance/merge.py . It runs under ceres-maintanance, just like rollup.

You could run defrag via ceres-maintenance before. At least I believe so. Therefore I don't know what you mean by "fixing". I haven't compared defrag.py and merge.py

./run-ceres-maintenance.sh rollup defrag

zstyblik avatar Jan 15 '14 09:01 zstyblik

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 13 '20 22:04 stale[bot]