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

Introduce io_uring support to ClickHouse #10787

Closed
chhetripradeep opened this issue May 10, 2020 · 6 comments · Fixed by #36103
Closed

Introduce io_uring support to ClickHouse #10787

chhetripradeep opened this issue May 10, 2020 · 6 comments · Fixed by #36103
Labels
feature minor Priority: minor

Comments

@chhetripradeep
Copy link
Contributor

chhetripradeep commented May 10, 2020

Linux kernel has released a new asynchronous I/O APIs : io_uring and has added support for all network and disk I/O syscalls over last 1.5 year and it looks very promising.

Few of the other project has started adopting it and have seen performance benefits:

Many others frameworks like Netty are planning to adopt it too: https://twitter.com/normanmaurer/status/1257597649705893888

In context with the scale at which everyone runs clickhouse, I think it will be of great performance improvement.

@bobrik
Copy link
Contributor

bobrik commented Jun 10, 2020

Looking at flamegraphs for some queries I see quite a bit of copy_user_enhanced_fast_string, which is supposed to be alleviated with io_uring, as far as I understand:

image

@alexey-milovidov
Copy link
Member

@bobrik copy_user is also eliminated with:

  • Linux AIO that is enabled with min_bytes_to_use_direct_io setting;
  • mmap that is enabled with min_bytes_to_use_mmap_io setting.

@alexey-milovidov alexey-milovidov added st-hold We've paused the work on issue for some reason minor Priority: minor labels Oct 22, 2020
@alexey-milovidov
Copy link
Member

Now we have the notion of read_method to select between various read engines.
And we can start experimenting with io_uring.

CC @azat maybe you will find this interesting?

@azat
Copy link
Collaborator

azat commented Sep 11, 2021

CC @azat maybe you will find this interesting?

Yep, this idea already visited me (added these to my internal to-do/to-look list)

@alexey-milovidov alexey-milovidov added st-fixed and removed st-hold We've paused the work on issue for some reason labels Jun 23, 2022
@alexey-milovidov
Copy link
Member

alexey-milovidov commented Sep 16, 2022

There was an experiment adding uring by @sauliusvl
Unfortunately, it proves to be unsustainable.

There is only a marginal improvement in performance. But the code becomes way more complicated. It became so complicated that even an experienced C++ engineer (the author of the code) cannot figure out why there are rare hangs of queries (found by our automated testing before the release).

@alexey-milovidov
Copy link
Member

Done.

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

Successfully merging a pull request may close this issue.

4 participants