cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11421) Eliminate allocations of byte array for UTF8 String serializations
Date Thu, 24 Mar 2016 15:31:25 GMT


Benedict commented on CASSANDRA-11421:

I wouldn't necessarily consider it a good idea to cache buffers of unbounded size.  Right
now it is probably fine, but it is fragile in the face of possible future changes.  This is
a common problem that should probably be solved generically, though no doubt not here.  It's
a tremendous shame this encoding differs from DataOutputPlus.writeUTF, and that both persist
a length up-front.

> Eliminate allocations of byte array for UTF8 String serializations
> ------------------------------------------------------------------
>                 Key: CASSANDRA-11421
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Nitsan Wakart
> When profiling a read workload (YCSB workload c) on Cassandra 3.2.1 I noticed a large
part of allocation profile was generated from String.getBytes() calls on CBUtil::writeString
> I have fixed up the code to use a thread local cached ByteBuffer and CharsetEncoder to
eliminate the allocations. This results in improved allocation profile, and a mild improvement
in performance.
> The fix is available here:

This message was sent by Atlassian JIRA

View raw message