diff --git a/pool.cpp b/pool.cpp index 3efca4aa..17e37c57 100644 --- a/pool.cpp +++ b/pool.cpp @@ -77,8 +77,10 @@ long long addpool(struct memfile *poolfile, struct memfile *treefile, const char } } - // Size of memory divided by 5 from observation of OOM errors on ECS - if ((size_t) (poolfile->off + treefile->off) > memsize / CPUS / 5) { + // Size of memory divided by 10 from observation of OOM errors (when supposedly + // 20% of memory is full) and onset of thrashing (when supposedly 15% of memory + // is full) on ECS. + if ((size_t) (poolfile->off + treefile->off) > memsize / CPUS / 10) { // If the pool and search tree get to be larger than physical memory, // then searching will start thrashing. Switch to appending strings // to the file instead of keeping them in memory.