From 905b5c10e074fe9b35e21e848cb1b29f6f663fb3 Mon Sep 17 00:00:00 2001 From: Matt Dordal Date: Wed, 11 Mar 2015 13:52:39 -0700 Subject: [PATCH] CPUThreadPoolExecutor's default queue is quite big Summary: By default, CPUThreadPoolExecutor uses 100 MB of rss for the CPU queue. This is substantially higher than expected. Reduce the default queue size so that it uses much less memory upfront, down to about 6 MB going by the heap profile. Reviewed By: davejwatson@fb.com Subscribers: mwa, ott, iaroslav, jrsherwood, aflock, slarsen, davejwatson, trunkagent, fugalh, folly-diffs@, jsedgwick, yfeldblum FB internal diff: D1900539 Tasks: 6453427 Signature: t1:1900539:1426103805:34fb7b081058fbde89370b5d9ec24ea572c4b0e2 --- folly/wangle/concurrent/CPUThreadPoolExecutor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/wangle/concurrent/CPUThreadPoolExecutor.cpp b/folly/wangle/concurrent/CPUThreadPoolExecutor.cpp index bc223124..25b22148 100644 --- a/folly/wangle/concurrent/CPUThreadPoolExecutor.cpp +++ b/folly/wangle/concurrent/CPUThreadPoolExecutor.cpp @@ -19,7 +19,7 @@ namespace folly { namespace wangle { -const size_t CPUThreadPoolExecutor::kDefaultMaxQueueSize = 1 << 18; +const size_t CPUThreadPoolExecutor::kDefaultMaxQueueSize = 1 << 14; const size_t CPUThreadPoolExecutor::kDefaultNumPriorities = 2; CPUThreadPoolExecutor::CPUThreadPoolExecutor( -- 2.34.1