Skip to content

CNDB-14077: Reduce compaction thread pool size to match num of physical cores #1736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ public abstract class SegmentBuilder
{
private static final Logger logger = LoggerFactory.getLogger(SegmentBuilder.class);

/** for parallelism within a single compaction */
public static final ExecutorService compactionExecutor = new DebuggableThreadPoolExecutor(Runtime.getRuntime().availableProcessors(),
/** for parallelism within a single compaction
* see comments to JVector PhysicalCoreExecutor -- HT tends to cause contention for the SIMD units
*/
public static final ExecutorService compactionExecutor = new DebuggableThreadPoolExecutor(Runtime.getRuntime().availableProcessors() / 2,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about making this configurable ? in case we need to rollback

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, I copied this logic from:

// see comments to JVector PhysicalCoreExecutor -- HT tends to cause contention for the SIMD units
private static final ForkJoinPool compactionSimdPool = new ForkJoinPool(Runtime.getRuntime().availableProcessors() / 2,
new LowPriorityThreadFactory(),
null,
false);

Are we looking to make all of these configurable?

1,
TimeUnit.MINUTES,
new ArrayBlockingQueue<>(10 * Runtime.getRuntime().availableProcessors()),
Expand Down