-
Notifications
You must be signed in to change notification settings - Fork 752
Stress test Offheap with large arrays #21596
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
Comments
|
The above test allocates objects with sizes from 1MB to 512MB with total of 1GB (hence requiring just a bit above 1G heap size), but incrementally creates holes, so that new larger allocation may require compaction (in a simple contiguous array representation and simple flat/contiguous heap organization). The test passes with just a couple of MBs extra with both optthruput and balanced offheap. Optthruput needs a few longish global compactions (~200ms) to resolve the holes created by the test. Balanced also compacts, due to very tight overall space, but only to move small objects, but never those larger than 1MB (that are all allocated in offheap). Optthruput:
Balanced offheap:
|
Hotspot/G1 needs double the heap size (will fail with -Xmx2050M, pass with -Xmx2100M) probably due to internal fragmentation (1MB object requiring 2 regions of 1MB), and also has a few longish global compactions.
|
@dmitripivkine FYI |
Create a test case and demonstrate that Offheap can cope with large arrays where otherwise contiguous in-heap representation can struggle (require larger heap and require significant compaction) due to external fragmentation.
The text was updated successfully, but these errors were encountered: