Skip to content

LevelDB Threads #236

@nsaadouni

Description

@nsaadouni

Hi @matthewvon,

The latest version of leveldb "2.0.35" see's a move away from the erlang scheduler, and instead using a worker pool of threads that are created in C++ in leveldb. In the code I can see that the use of 71 threads has been decided upon.

From comments in the wiki, and the git logs, I saw that the number was decided to be a prime.

  1. Is there a reason behind requiring this number to be a prime number?
  2. Is there a reason behind having only 71 threads?
  3. Can this be altered to be greater than 71 threads?
  4. What will the pros & cons be of increasing the number of threads?

I ask due seeing net_kernel tick timeouts (stalls) in our test environment. We have set riak's sysmon long scheduler, and often see it is long timeouts in the riak_kv_vnode surrounding a gen_call. The only place I have found a gen_call to take place in the riak_kv_vnode is at riak_kv_index_hashtree:insert/3 (call once all the tokens have been used up). This at times can take > 10 seconds to complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions