You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/04/13 18:39:14 UTC
[GitHub] [geode] ringles commented on a change in pull request #6296: GEODE-9136: make RedisData implement Sizeable
ringles commented on a change in pull request #6296:
URL: https://github.com/apache/geode/pull/6296#discussion_r612690069
##########
File path: geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisHash.java
##########
@@ -58,6 +59,9 @@
private ConcurrentHashMap<UUID, List<ByteArrayWrapper>> hScanSnapShots;
private ConcurrentHashMap<UUID, Long> hScanSnapShotCreationTimes;
private ScheduledExecutorService HSCANSnapshotExpirationExecutor = null;
+ private static final int PER_STRING_OVERHEAD = PER_OBJECT_OVERHEAD + 46;
+ private static final int PER_HASH_OVERHEAD = PER_OBJECT_OVERHEAD + 116;
Review comment:
These values were derived by empirically comparing them to the measurements from the ReflectionObjectSizer. The ReflectionObjectSizer gives an exact figure, but takes far too long (so we removed it from the final code). We confirmed that these values converge to the ROS values as the number of keys of various types increases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org