From 1913ce27b96b1c2052bfbafd218f592c03830f67 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Wed, 27 Aug 2014 08:48:31 -0700 Subject: [PATCH] more concurrent flushes in SpatialDB --- utilities/spatialdb/spatial_db.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utilities/spatialdb/spatial_db.cc b/utilities/spatialdb/spatial_db.cc index e2c855624..7de2acc86 100644 --- a/utilities/spatialdb/spatial_db.cc +++ b/utilities/spatialdb/spatial_db.cc @@ -621,7 +621,10 @@ class SpatialDBImpl : public SpatialDB { namespace { DBOptions GetDBOptions(const SpatialDBOptions& options) { DBOptions db_options; - db_options.IncreaseParallelism(options.num_threads); + db_options.max_background_compactions = options.num_threads / 2; + db_options.max_background_flushes = options.num_threads / 2; + db_options.env->SetBackgroundThreads(db_options.max_background_compactions, Env::LOW); + db_options.env->SetBackgroundThreads(db_options.max_background_flushes, Env::HIGH); if (options.bulk_load) { db_options.disableDataSync = true; }