-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CacheLongKeyLIRS concurrency improvements #3069
Draft
amolokoedov
wants to merge
22
commits into
h2database:master
Choose a base branch
from
tradingview:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
fea847c
Improved concurrency
amolokoedov a81f372
CACHE_CONCURRENCY and AUTO_COMMIT_BUFFER_SIZE_KB
amolokoedov 3b9dc9b
CACHE_CONCURRENCY/AUTO_COMMIT_BUFFER_SIZE_KB
amolokoedov f342c4a
fixes java 8
amolokoedov 0e9df84
fixes java 8
amolokoedov 0a5fedb
fixes test
amolokoedov a3a4988
Fixes upon review
amolokoedov af0457b
Fixed missing synchronized statements
amolokoedov 3a11c81
Fixed syntax
amolokoedov 90d0135
Fixed tests
amolokoedov d233a18
Added missing import
amolokoedov 69deaba
Fixed syntax
amolokoedov 7656f24
Fixes
amolokoedov 17ede53
Fixed compile
amolokoedov 0f30f6a
Fixed compile
amolokoedov 8b261e8
Optimizations
amolokoedov 8f49a13
Optimization
amolokoedov 4711416
Fix
amolokoedov 3ec21cd
Fix
amolokoedov a31529c
Fix
amolokoedov 95970d7
Added getCacheSize()
amolokoedov beccc44
Apply initial cache size
amolokoedov File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, explain why you need these settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use H2 as a cache for binary chunks in high concurrency environment (currently 60 threads). After we increase cacheConcurrency up to 1024 H2 looks really well most of the time (same or even better than postgresql). The only problem arises after we emptied db content - we observed a significant degradation in throughput and cpu usage.
Here's what we run into:
// if unsaved memory creation rate is to high,
// some back pressure need to be applied
// to slow things down and avoid OOME
Looks like 2 Mb is too small for 150 Mb per sec. This is why we need to introduce AUTO_COMMIT_BUFFER_SIZE_KB.