[
https://issues.apache.org/jira/browse/CASSANDRA-20162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Semb Wever updated CASSANDRA-20162:
-------------------------------------------
Fix Version/s: 5.0.3
5.1
(was: 5.x)
(was: 5.0.x)
Source Control Link:
https://github.com/apache/cassandra/commit/4ae1aee39bfa5d1805920faa4e30f4660b49fabb
Resolution: Fixed
Status: Resolved (was: Ready to Commit)
Committed as
https://github.com/apache/cassandra/commit/4ae1aee39bfa5d1805920faa4e30f4660b49fabb
> Avoid memory allocation in NativeCell.valueSize() and
> NativeClustering.dataSize()
> ---------------------------------------------------------------------------------
>
> Key: CASSANDRA-20162
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20162
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Local/Memtable
> Reporter: Dmitry Konstantinov
> Assignee: Dmitry Konstantinov
> Priority: Normal
> Fix For: 5.0.3, 5.1
>
> Attachments: Cell_valueSize_usage_during_flushing.png,
> ci_summary_netudima_20162-5.0_142.html,
> ci_summary_thelastpickle_mck-20162-trunk_144.html,
> image-2024-12-23-09-53-27-226.png, jfr_allocation_profile.png,
> results_details_netudima_20162-5.0_142.tar.xz,
> results_details_thelastpickle_mck-20162-trunk_144.tar.xz
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Currently for memtable_allocation_type: offheap_objects we allocate memory to
> calculate dataSize() during a write to a memtable because we use default
> implementation of dataSize() which retrieves an object using value() method.
> To avoid such memory allocation we can calculate data size directly for
> NativeCell and NativeClustering
> test schema details:
> {code:java}
> CREATE TABLE memory_tests.test_table_text_0 (part_key text,clust_key
> text,value_0 text,value_1 text,value_2 text,value_3 text,value_4 text,value_5
> text,value_6 text,value_7 text,value_8 text,value_9 text,PRIMARY
> KEY(part_key,clust_key))
> {code}
> write query:
> {code:java}
> INSERT INTO memory_tests.test_table_text_0
> (part_key,clust_key,value_0,value_1,value_2,value_3,value_4,value_5,value_6,value_7,value_8,value_9)
> VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
> {code}
> changed settings:
> {code:java}
> memtable_allocation_type: offheap_objects
> memtable:
> configurations:
> skiplist:
> class_name: SkipListMemtable
> trie:
> class_name: TrieMemtable
> default:
> inherits: trie // changed default to trie
> {code}
> JFR allocation report:
> !jfr_allocation_profile.png|width=570!
> !image-2024-12-23-09-53-27-226.png|width=570!
> Memtable flushing logic also is affected:
> !Cell_valueSize_usage_during_flushing.png|width=570!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]