Commit 00cfa680 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

[threadpool] Change the default reclaim time to 5 minutes on Android.

An experiment conducted in July 2019 revealed that on Android,
changing the reclaim time from 30 seconds to 5 minutes:
- Reduces jank by 5% at 99th percentile
- Reduces first input delay by 5% at 99th percentile
- Reduces input delay by 3% at 50th percentile
- Reduces navigation to first contentful paint by 2-3% at
  25-95th percentiles
On Windows and Mac, we instead see no impact or small regressions.

More results at
https://groups.google.com/a/google.com/d/msg/chrome-scheduler/zhu6q8fvjno/-ugY1FU2AQAJ.

Bug: 945681
Change-Id: Ifa35e38be87d72633639bc6a06d80b87e84c580b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1749882
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Reviewed-by: default avatarEtienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689237}
parent e9e61183
......@@ -76,8 +76,27 @@ class BASE_EXPORT ThreadPoolInstance {
CommonThreadPoolEnvironment common_thread_pool_environment =
CommonThreadPoolEnvironment::DEFAULT;
// Suggested time after which an unused thread can be reclaimed.
TimeDelta suggested_reclaim_time = TimeDelta::FromSeconds(30);
// An experiment conducted in July 2019 revealed that on Android, changing
// the reclaim time from 30 seconds to 5 minutes:
// - Reduces jank by 5% at 99th percentile
// - Reduces first input delay by 5% at 99th percentile
// - Reduces input delay by 3% at 50th percentile
// - Reduces navigation to first contentful paint by 2-3% at 25-95th
// percentiles
// On Windows and Mac, we instead see no impact or small regressions.
//
// TODO(scheduler-dev): Conduct experiments to find the optimal value for
// each process type on each platform. In particular, due to regressions at
// high percentiles for *HeartbeatLatencyMicroseconds.Renderer* histograms,
// it was suggested that we might want a different reclaim time in
// renderers. Note that the regression is not present in
// *TaskLatencyMicroseconds.Renderer* histograms.
TimeDelta suggested_reclaim_time =
#if defined(OS_ANDROID)
TimeDelta::FromMinutes(5);
#else
TimeDelta::FromSeconds(30);
#endif
};
// A Scoped(BestEffort)ExecutionFence prevents new tasks of any/BEST_EFFORT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment