This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the resampling method we used to have by not doing any real resampling like Pandas used too. The `resampling' method from Pandas insert a lot of empty points filled with NaN as value if your timeserie is sparse – which is a typical case in Carbonara/Gnocchi. This ends up creating timeseries with millions of empty points, consuming hundreds of MB of memory for nothing. This method inspired by Jeff on pandas-dev/pandas#11217 implements a simpler versino of what `resample` does: it groups the sample by timestamp, and then compute an aggregation method on them. This avoids creating thousands of useless points and ends up being much faster and consume a *LOT* less memory. Benchmarked: for a new timeserie with 10k measures with 10-80k points by archive this reduces the memory usage of metricd from 2 GB to 100 MB and the compute speed of the most complicated aggregations like percentile to 15min to 20s (45× speed improvement). Change-Id: I1b8718508bdd4633e7324949b76184efc3718ede
- Loading branch information
Showing
2 changed files
with
52 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters