Interim fix for apps which JIT a lot and trigger a lot of I/O because of
profile data (e.g. gmscore).
This reduces the amount of data re-written to disk by a few order of
magnitude. (e.g. 43k instead of 3.5MB)
Proper fix which will make the writing smarter is coming.
Bug:
27600652
(cherry picked from commit
815759a8194fc94c9d9e6e081c99bee38792ba91)
Change-Id: I28c14369ba6728acb42d4de7cb65df39791fb2a1
// TODO: read the constants from ProfileOptions,
// Add a random delay each time we go to sleep so that we don't hammer the CPU
// with all profile savers running at the same time.
-static constexpr const uint64_t kRandomDelayMaxMs = 20 * 1000; // 20 seconds
+static constexpr const uint64_t kRandomDelayMaxMs = 40 * 1000; // 40 seconds
static constexpr const uint64_t kMaxBackoffMs = 5 * 60 * 1000; // 5 minutes
-static constexpr const uint64_t kSavePeriodMs = 10 * 1000; // 10 seconds
+static constexpr const uint64_t kSavePeriodMs = 40 * 1000; // 40 seconds
static constexpr const uint64_t kInitialDelayMs = 2 * 1000; // 2 seconds
static constexpr const double kBackoffCoef = 1.5;