Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research: thread per core model #64295

Closed
tomershafir opened this issue May 23, 2024 · 2 comments
Closed

Research: thread per core model #64295

tomershafir opened this issue May 23, 2024 · 2 comments

Comments

@tomershafir
Copy link
Contributor

I wonder, did you ever consider/research a thread-per-core/shard-per-core model for Clickhouse, like ScyllaDB seastar?

@tomershafir tomershafir added the question Question? label May 23, 2024
@nikitamikhaylov
Copy link
Member

I would say yes, but we didn't proceed further with this initiative as it will require us to rewrite the whole codebase.
What we did so far is:

  • Implemented custom background jobs (merges, mutations) execution mechanism which allows us to suspend and resume their execution, but only in pre-defined places e.g. after executing a block.
  • Implemented a custom pipeline executor and introduced a task abstraction called IProcessor which allow us to better control the concurrency and the overall execution process.
  • We do use boost coroutines in some places (for distributed query execution).

@alexey-milovidov
Copy link
Member

Thread per core model requires userspace context switching and scheduling, which is painful to use and support.
OS threads are good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants