apache / apache/lucene

Consider changing how we set the number of threads to use to run tests. [LUCENE-3667]

Open
#4,741 17 comments 0 reactions 1 assignee Claimed by @markrmiller View on GitHub
legacy-jira-priority:Minor type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

The current way we set the number of threads to use is not expressive enough for some systems. My quad core with hyper threading is recognized as 8 CPUs - since I can only override the number of threads to use per core, 8 is as low as I can go. 8 threads can be problematic for me - just the amount of RAM used sometimes can toss me into heavy paging because I only have 8 GB of RAM - the heavy paging can cause my whole system to come to a crawl. Without hacking the build, I don't think I have a lot of workarounds.

I'd like to propose that switch from using threadsPerProcessor to threadCount. In some ways, it's not as nice, because it does not try to scale automatically per system. But that auto scaling is often not ideal (hyper threading, wanting to be able to do other work at the same time), so perhaps we just default to 1 or 2 threads and devs can override individually?

---
Migrated from [LUCENE-3667](https://issues.apache.org/jira/browse/LUCENE-3667) by Mark Miller (@markrmiller), updated Jan 02 2012
Attachments: [LUCENE-3667.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-3667/LUCENE-3667.patch) (versions: 5)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.