[Bug] Frequent and long lasting full GCs when there are too many partitions on a shuffle server
- Dominant language
- Java
- Stars
- 454
- Forks
- 172
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 5
Description
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and found no similar issues.
### Describe the bug
I found the full GC occurs when there are too many partitions on a shuffle server, and the duration could be 20s+.
Env:
1. using java8
2. xmx=30g, buffer-capacity=10g, read-capacity=10g
3. from the metric dashboard, during peek hours, there are 20k partitions in a shuffle-server, but disk used capacity ratio is 0.1-0.2
I guess the object creating or allocation request speed is greater than the gc speed, which causes the STW.
### Affects Version(s)
master
### Uniffle Server Log Output
_No response_
### Uniffle Engine Log Output
_No response_
### Uniffle Server Configurations
```yaml
We use the default g1 GC configuration.
```
### Uniffle Engine Configurations
_No response_
### Additional context
### Possible solutions
1. Garbage collector changes to CMS
2. Expand the uniffle cluster by adding more shuffle-servers
3. If one shuffle-server has partition number exceeding the threshold, we should make it fallback to ess.
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Contributor guide
Research direction
The report names no files, tests, or entry points. Start by reproducing the full-GC behavior from the Java 8, 30g Xmx, 10g buffer/read capacity, and roughly 20k-partition conditions, then review GC and shuffle-server metrics; done requires an agreed fix that prevents or reduces the reported long pauses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100