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

TouchedExpiryPolicy/AccessedExpiryPolicy performance overhead #11774

Open
ravaelamanov opened this issue Dec 24, 2024 · 0 comments
Open

TouchedExpiryPolicy/AccessedExpiryPolicy performance overhead #11774

ravaelamanov opened this issue Dec 24, 2024 · 0 comments

Comments

@ravaelamanov
Copy link

Hey there. We've been integrating Apache Ignite in embedded mode as a replacement for in-memory on-heap caches based on Caffeine. Without a second thought we set cache expiration policy to TouchedExpiryPolicy. Load testing resulted in almost 2x CPU consumption compared to Caffeine. Spent a couple of days diagnosing the problem and was able to find the cause only through profiling the application using asprof - it appears that TouchedExpiryPolicy/AccessedExpiryPolicy updates TTL on each access, which is logical, but also synchronizes it with other Ignite cluster nodes. This behavior is a bit implicit and hard to figure out, especially for those who come from the world of non-distributed caches.

My suggestion would be:

  1. Explicitly warning users about potential intensive resource consumption in the javadoc of TouchedExpiryPolicy/AccessedExpiryPolicy
  2. Adding a WARN log on node startup if TouchedExpiryPolicy/AccessedExpiryPolicy are chosen as expiry policy
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

No branches or pull requests

1 participant