Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
-
None
-
Reviewed
Description
During YCSB testing on embedded mode after HBASE-17744, we found that under high read load GC is quite severe even with offheap L2 cache. After some investigation, we found it's caused by using weak reference in IdReadWriteLock. In embedded mode the read is so quick that the lock might already get promoted to the old generation when the weak reference is cleared, which causes dirty card table (old reference get removed and new lock object set into referenceCache, see WeakObjectPool#get) thus slowing YGC. In distributed mode there'll also be more lock object created with weak reference than soft reference that slowing down the processing.
So we proposed to use soft reference for this IdReadWriteLock used in cache, which won't get cleared until JVM memory is not enough, and could resolve the issue mentioned above. What's more, we propose to extend the WeakObjectPool to be more generate to support both weak and soft reference.
Note that the GC issue only emerges under embedded mode with DirectOperator, in which case all costs on the wire is removed thus produces extremely high concurrency.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-17782 Extend IdReadWriteLock to support using both weak and soft reference
-
- Closed
-
- relates to
-
HBASE-14463 Severe performance downgrade when parallel reading a single key from BucketCache
-
- Closed
-
-
HBASE-17743 Support embedded mode in HBase
-
- Closed
-
- links to