Skip to content

Default shard amount should be proportional to cores² #336

@HKalbasi

Description

@HKalbasi

Similar to the birthday problem, the amount of writer threads required to have contention on a map with T shards with high probablity is O(√T). So I propose setting the default number of shards to something proportional to the square of cores, for example cores²/4 or cores²/2 instead of 4*cores. cores²/2 is what I use in my server with 48 cores, but cores²/4 is not that different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions