diff --git a/eden/fs/store/hg/HgBackingStore.cpp b/eden/fs/store/hg/HgBackingStore.cpp index 59422efcc9..704859036c 100644 --- a/eden/fs/store/hg/HgBackingStore.cpp +++ b/eden/fs/store/hg/HgBackingStore.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -156,15 +157,20 @@ HgBackingStore::HgBackingStore( : localStore_(localStore), importThreadPool_(make_unique( FLAGS_num_hg_import_threads, - make_unique>( - /* max_capacity */ FLAGS_num_hg_import_threads * 128), + /* Eden performance will degrade when, for example, a status operation + * causes a large number of import requests to be scheduled before a + * lightweight operation needs to check the RocksDB cache. In that + * case, the RocksDB threads can end up all busy inserting work into + * the importer queue, preventing future requests that would hit cache + * from succeeding. + * + * Thus, make the import queue unbounded. + * + * In the long term, we'll want a more comprehensive approach to + * bounding the parallelism of scheduled work. + */ + make_unique>(), std::make_shared(repository, localStore))), serverThreadPool_(serverThreadPool) { #if EDEN_HAVE_HG_TREEMANIFEST