From 59ff8cb690d1928e6788e4f831af6c6dde8f9ed5 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Mon, 14 Mar 2016 17:32:49 +0000 Subject: [PATCH] Don't be so agressive in quering the code cache for new methods 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 --- runtime/jit/profile_saver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/jit/profile_saver.cc b/runtime/jit/profile_saver.cc index 6fe17dbe1..a2876f8cd 100644 --- a/runtime/jit/profile_saver.cc +++ b/runtime/jit/profile_saver.cc @@ -34,9 +34,9 @@ static constexpr const uint64_t kMinimumTimeBetweenCodeCacheUpdatesNs = 2000 * k // 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; -- 2.11.0