Skip to content
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

[Tiered Cache] Using a single cache manager for all ehcache disk caches #17513

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sgup432
Copy link
Contributor

@sgup432 sgup432 commented Mar 4, 2025

Description

Earlier while trying to create N ehcache disk caches, we were creating those via N cache managers which had their own disk write thread pools (so total N). We create N disk caches based on tiered cache setting and it is decided based on number of CPU cores. So essentially we were creating (CPU_CORE * 4) disk write threads which is a lot and can cause CPU spikes with tiered cache enabled.

This change essentially creates a single cache manager, and all subsequent caches are created via this single manager. Through this we only have one disk write thread pool and is configured to have 2 threads by default and can go up until
max(2, CPU_CORES / 8)

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • [ ] Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@sgup432 sgup432 changed the title Using a single cache manager for all ehcache disk caches [Tiered Cache] Using a single cache manager for all ehcache disk caches Mar 4, 2025
sgup432 and others added 2 commits March 4, 2025 13:54
Copy link
Contributor

github-actions bot commented Mar 4, 2025

❌ Gradle check result for 69bbc69: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Mar 5, 2025

❌ Gradle check result for c332f1b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Sagar Upadhyaya <[email protected]>
Copy link
Contributor

github-actions bot commented Mar 5, 2025

❌ Gradle check result for c13dcfa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant