From 37d6146bdee0047a2806c621f193e8d1e76dd505 Mon Sep 17 00:00:00 2001
From: Manish R Jain <manishrjain@gmail.com>
Date: Thu, 3 Mar 2016 08:40:57 +0000
Subject: [PATCH] Set the number of goroutines for gentle merging to 18. It is
 little slower to run these goroutines, but they keep the memory usage in
 check.

---
 posting/lists.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/posting/lists.go b/posting/lists.go
index 4d09e144..fab45d58 100644
--- a/posting/lists.go
+++ b/posting/lists.go
@@ -182,9 +182,9 @@ func checkMemoryUsage() {
 		} else {
 			// If merging is slow, we don't want to end up having too many goroutines
 			// merging the dirty list. This should keep them in check.
-			// With a value of 12 and duration of 5 seconds, some goroutines are
-			// taking over a minute to finish.
-			if mr.Count() > 12 {
+			// With a value of 18 and duration of 5 seconds, some goroutines are
+			// taking over 1.5 mins to finish.
+			if mr.Count() > 18 {
 				glog.Info("Skipping gentle merging.")
 				continue
 			}
-- 
GitLab