I agree that this is an under-estimate, but I don't think there's much point in 
being exact.
The overhead is dependent on the JVM implementation, so we'd have to detect the 
JVM and maintain a mapping for each different implementation. Even then, we 
don't know how much extra memory we're using in the various garbage collectors, 
of which there are now three different implementations in the Oracle JDK 
alone...

I'd rather just make the best effort we reasonably can to live more-or-less 
within the desired boundary. For example, storing the `byte[]` value is much 
closer than storing the object. But beyond that, we get into diminishing 
returns for quickly increasing complexity.


[ Full content available at: https://github.com/apache/kafka/pull/5693 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to