apache / apache/pinot

Reloading segments leads to high CPU usage

Open
#11,293 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
189

Description

We recently observed that reloading segments, even reloading a small set of segments one by one for a partial upsert table (~90 segment replicas and each replica is around 650MB) can cause a significant increase in CPU usage (~30-40%).

Server tenant:
image

We have looked into one server and even we only reloaded 11 segments during the time, the CPU usage is pretty high.
Server (# of cores):
image

We are using default max.parallel.refresh.threads = 1 in HelixInstanceDataManagerConfig. It means there is no parallel during segment reloading. In other words, the server load mainly comes from refreshing a single segment.

Is there a way to improve the performance? This is blocking our schema evolution for such upsert tables and any suggestions or ideas are appreciated. Thanks!

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named. Start by profiling the segment reload path while reloading one segment at a time and compare it with the reported CPU increase; done means identifying and addressing the cause of the high CPU usage without blocking schema evolution for partial upsert tables.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.