[
https://issues.apache.org/jira/browse/CASSANDRA-18280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Caleb Rackliffe updated CASSANDRA-18280:
----------------------------------------
Epic Link: CASSANDRA-18473 (was: CASSANDRA-16052)
> Investigate initial size of GrowableByteArrayDataOutput in RAMIndexOutput
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-18280
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18280
> Project: Cassandra
> Issue Type: Task
> Components: Feature/SAI
> Reporter: Mike Adamson
> Priority: Normal
>
> The GrowableByteArrayDataOutput in RAMIndexOutput is currently initialized
> with a size of 128 bytes. There is no explanation as to why this size was
> chosen.
> The GrowableByteArrayDataOutput does not lazily allocate memory but only ever
> allocates enough for each write operation. This can lead to a lot of fresh
> allocations and calls to System.arrayCopy.
> Since RAMIndexOutput is used to build the on-disk postings in SAI it is
> likely that the size of the in-memory array is going to grow considerably
> more that 128 bytes.
> We should investigate changing this initial value to something higher and
> possibly changing the GrowableByteArrayDataOutput class to allocate in blocks
> rather than write increments.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]