yanze chen created IOTDB-6065:
---------------------------------
Summary: Considering LastCacheContainer in the memory estimation
of SchemaCacheEntry
Key: IOTDB-6065
URL: https://issues.apache.org/jira/browse/IOTDB-6065
Project: Apache IoTDB
Issue Type: Improvement
Reporter: yanze chen
Assignee: yanze chen
{code:java}
/**
* Total basic 100B
*
* <ul>
* <li>SchemaCacheEntry Object header, 8B
* <li>isAligned, 1B
* <li>LastCacheContainer reference, 8B
* <li>MeasurementSchema
* <ul>
* <li>Reference, 8B
* <li>Object header, 8B
* <li>String measurementId basic, 8 + 8 + 4 + 8 + 4 = 32B
* <li>type, encoding, compressor, 3 B
* <li>encodingConverter, 8 + 8 + 8 = 24B
* <li>props, 8B
* </ul>
* </ul>
*/
public static int estimateSize(SchemaCacheEntry schemaCacheEntry) {
// each char takes 2B in Java
return 100 + 2 *
schemaCacheEntry.getIMeasurementSchema().getMeasurementId().length();
} {code}
The current memory estimate for the SchemaCacheEntry does not include the
lastCacheContainer's retained size.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)