cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7882) Memtable slab allocation should scale logarithmically to improve occupancy rate
Date Wed, 03 Dec 2014 16:37:13 GMT


Benedict commented on CASSANDRA-7882:

I've posted a variant of the patch [here|]

There are a few changes, a couple unrelated just cleaning up the class: 

# removed the unslabbed and regionCount variables, as they weren't used for anything important
# removed the nextRegionSize variable: it wasn't being maintained atomically, but just as
importantly it's messy to do it separately:
#* instead of setting a full region to null, we swap it straight to a new region, using the
prior region to determine the size of the new region
#* we ensure the new region size is at least large enough to hold the allocation we're inserting
# we cap the size of each "race allocated" queue to 8 entries, as this should permit plenty
of leeway for avoiding heavy competition thrashing the allocator, but not so much that we
have a lot of primarily unused memory

There is one issue, though, which is if this should make it into 2.1, or wait until 3.0. I'm
pretty comfortable either way, but my gut feeling is others will prefer it wait until 3.0.
[~jbellis], what's your view?

> Memtable slab allocation should scale logarithmically to improve occupancy rate
> -------------------------------------------------------------------------------
>                 Key: CASSANDRA-7882
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jay Patel
>            Assignee: Jay Patel
>              Labels: performance
>             Fix For: 2.1.3
>         Attachments: trunk-7882.txt
> CASSANDRA-5935 allows option to disable region-based allocation for on-heap memtables
but there is no option to disable it for off-heap memtables (memtable_allocation_type: offheap_objects).

> Disabling region-based allocation will allow us to pack more tables in the schema since
minimum of 1MB region won't be allocated per table. Downside can be more fragmentation which
should be controllable by using better allocator like JEMalloc.
> How about below option in yaml?:
> memtable_allocation_type: unslabbed_offheap_objects
> Thanks.

This message was sent by Atlassian JIRA

View raw message