diff options
author | pasko <pasko@chromium.org> | 2015-02-12 12:07:34 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-12 20:08:41 +0000 |
commit | 430dd40660ff8e834e91c178feb3078d134b9f8b (patch) | |
tree | 194f95d38df195eff3100a83f2cbf26e27047f9d /net | |
parent | 5b582647a39f5d6806709fdeb28d3c709bc61471 (diff) | |
download | chromium_src-430dd40660ff8e834e91c178feb3078d134b9f8b.zip chromium_src-430dd40660ff8e834e91c178feb3078d134b9f8b.tar.gz chromium_src-430dd40660ff8e834e91c178feb3078d134b9f8b.tar.bz2 |
SimpleCache: max at 5 threads in the pool
Our experiments did not reveal any clear guidance except that max == 5 is
not significantly different from max > 5.
BUG=248569
Review URL: https://codereview.chromium.org/914313003
Cr-Commit-Position: refs/heads/master@{#316037}
Diffstat (limited to 'net')
-rw-r--r-- | net/disk_cache/simple/simple_backend_impl.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc index 8cf592a..6c43eeb 100644 --- a/net/disk_cache/simple/simple_backend_impl.cc +++ b/net/disk_cache/simple/simple_backend_impl.cc @@ -50,7 +50,7 @@ namespace { // Maximum number of concurrent worker pool threads, which also is the limit // on concurrent IO (as we use one thread per IO request). -const int kDefaultMaxWorkerThreads = 50; +const size_t kMaxWorkerThreads = 5U; const char kThreadNamePrefix[] = "SimpleCache"; @@ -62,17 +62,8 @@ SequencedWorkerPool* g_sequenced_worker_pool = NULL; void MaybeCreateSequencedWorkerPool() { if (!g_sequenced_worker_pool) { - int max_worker_threads = kDefaultMaxWorkerThreads; - - const std::string thread_count_field_trial = - base::FieldTrialList::FindFullName("SimpleCacheMaxThreads"); - if (!thread_count_field_trial.empty()) { - max_worker_threads = - std::max(1, std::atoi(thread_count_field_trial.c_str())); - } - - g_sequenced_worker_pool = new SequencedWorkerPool(max_worker_threads, - kThreadNamePrefix); + g_sequenced_worker_pool = + new SequencedWorkerPool(kMaxWorkerThreads, kThreadNamePrefix); g_sequenced_worker_pool->AddRef(); // Leak it. } } |