libevent VS liburing

Compare libevent vs liburing and see what are their differences.

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
libevent liburing
7 10
8,850 1,324
2.2% -
7.5 9.6
16 days ago 1 day ago
C C
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

libevent

Posts with mentions or reviews of libevent. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-01.
  • Libevent - Event notification library
    1 project | reddit.com/r/github | 15 Apr 2022
    1 project | reddit.com/r/github_trends | 15 Apr 2022
  • Tmux install script I made to install the latest stable version
    3 projects | reddit.com/r/tmux | 1 Mar 2022
    Unknown OS, continue trying to install? Menu? Develope this area! Querying Versions on https://libevent.org... Please be patient.
  • Looking for low footprint c++ library to build a REST client
    2 projects | reddit.com/r/cpp | 23 Dec 2021
  • Io_uring is not an event system
    6 projects | news.ycombinator.com | 17 Jun 2021
  • Packaging your Crystal app into a Flatpak
    10 projects | dev.to | 23 May 2021
    app-id: dev.geopjr.Hashbrown runtime: org.gnome.Platform runtime-version: "3.38" sdk: org.gnome.Sdk command: hashbrown finish-args: - --socket=wayland - --socket=fallback-x11 - --share=ipc cleanup: - /include - /lib/pkgconfig - /share/doc - /share/man - "*.a" - "*.la" modules: - name: libevent sources: - type: git url: https://github.com/libevent/libevent.git tag: release-2.1.12-stable - name: hashbrown buildsystem: simple build-commands: - $(pwd)/crystal/bin/crystal build ./src/hashbrown.cr --no-debug --release - install -D -m 0755 hashbrown /app/bin/hashbrown - install -D -m 0644 extra/Hashbrown.desktop /app/share/applications/dev.geopjr.Hashbrown.desktop - install -D -m 0644 extra/icons/logo.svg /app/share/icons/hicolor/scalable/apps/dev.geopjr.Hashbrown.svg - install -D -m 0644 extra/icons/symbolic.svg /app/share/icons/hicolor/symbolic/apps/dev.geopjr.Hashbrown-symbolic.svg post-install: - install -D -m 0644 extra/dev.geopjr.Hashbrown.metainfo.xml /app/share/metainfo/dev.geopjr.Hashbrown.metainfo.xml sources: - type: git url: https://github.com/GeopJr/Hashbrown.git tag: v1.2.0 commit: 02ecf5cc5aacc32fc484fd9e348d2b1220168295 - type: archive dest: crystal/ url: https://github.com/crystal-lang/crystal/releases/download/1.0.0/crystal-1.0.0-1-linux-x86_64.tar.gz sha256: 00211ca77758e99210ec40b8c5517b086d2ff9909e089400f6d847a95e5689a4 - type: git url: https://github.com/jhass/crystal-gobject.git commit: 6468c57f8aa54b71c766d27b1e59e87a09ee8552 dest: lib/gobject - type: git url: https://github.com/elorest/compiled_license.git tag: v0.1.3 commit: f287c2c8c95579688fa5620df954d8cc1272cbbf dest: lib/compiled_license
  • C Deep
    80 projects | dev.to | 27 Feb 2021
    libevent - Event loop replacement for network servers. BSD-3-Clause

liburing

Posts with mentions or reviews of liburing. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-08.
  • Put an io_uring on it: Exploiting the Linux Kernel
    3 projects | news.ycombinator.com | 8 Mar 2022
    For disk IO it’s faster, there are many benchmarks on the internet.

    For network IO, it depends. Only two things make it theoretically faster than epoll; io_uring supports batching of requests, and you can save one sys call compared to epoll in an event loop. There some other things that could make it faster like SQPOLL, but this could also hurt performance.

    Network IO discussion: https://github.com/axboe/liburing/issues/536

    3 projects | news.ycombinator.com | 8 Mar 2022
    > Network IO discussion: https://github.com/axboe/liburing/issues/536

    I see an issue with a narrative but zero discussion at that link.

    Furthermore, your io_uring benchmark being utilized in that issue isn't even batching CQE consumption. I've submitted a quick and dirty untested PR adding rudimentary batching at [0]. Frankly, what seems to be a constant din of poorly-written benchmarks portraying io_uring in a negative light vs. epoll is getting rather old.

    [0] https://github.com/frevib/io_uring-echo-server/pull/16

  • Zero-copy network transmission with io_uring
    3 projects | news.ycombinator.com | 31 Jan 2022
    I wanted to see some benchmark numbers but the first hit on google returns a unresolved 150+ message github issue about how io_ring might not be better than epoll: https://github.com/axboe/liburing/issues/189

    I didn't read the entire thread, but are there still implementation kinks that are being worked out or is the api ready to use now?

  • Non blocking write to a file
    3 projects | reddit.com/r/C_Programming | 3 Jan 2022
  • Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimization Patches
    3 projects | news.ycombinator.com | 18 Oct 2021
    But if you read the thread, you realize he is testing on a 2011 laptop, and the older architecture may be causing the issues. He reported a 3x speedup running the benchmark on a Raspberry Pi 4 in the same thread[0]

    Someone claimed that you don't get to see the benefit of io_uring in a hypervisor[1], but they did not provide benchmark results.

    [0]: https://github.com/axboe/liburing/issues/189#issuecomment-94...

    3 projects | news.ycombinator.com | 18 Oct 2021
    Sure. https://github.com/axboe/liburing/issues/189

    Original claims were in the 90% and above performance increase over epoll. Then issues were found, and the figure was adjusted to 60% over epoll. Then more issues were found, and now real-world performance tests are showing minimal speedups if any.

    Unfortunately the sibling commentors don't see "computer science" as a science but instead as a "feel good hobby", it seems. My point wasn't to hurt feelings, it was to provide a word of caution with these sorts of groundbreaking claims with respect specifically to the io_uring efforts, as they have been disingenuous quite a few times historically.

    I don't doubt Jens does fantastic work. I don't doubt that he's seen these speedups in very specific cases. But people are celebrating this as a win where they'd be skeptical of e.g. "breakthrough" treatments of cancer (footnote: in mice). It's the same thing.

  • kbio - Another Async IO Framework based on io_uring
    5 projects | reddit.com/r/rust | 21 Sep 2021
    Here are some posts about the design. https://without.boats/blog/io-uring/ https://github.com/spacejam/rio/issues/30 https://github.com/axboe/liburing/issues/109
  • Three Clocks Are Better Than One
    2 projects | news.ycombinator.com | 30 Aug 2021
    If you use io_uring for timeouts, then CLOCK_BOOTTIME is also on its way to io_uring: https://github.com/axboe/liburing/issues/369
  • Io_uring is not an event system
    6 projects | news.ycombinator.com | 17 Jun 2021
    I dug up the thread with the benchmarks: https://github.com/axboe/liburing/issues/189

    io_uring does win on more recent versions, but it's not like it blows epoll out of the water - it's an incremental improvement.

    Specifically for websockets where you have a lot of idle connections, you don't want a bunch of buffers waiting for reads for long periods of time - this is why Go doesn't perform well for websocket servers as calling Read() on a socket requires tying up both a buffer and a goroutine stack.

    I haven't looked into how registering buffers works with io_uring, if it's 1-to-1 mapping or if you can pass a pool of N buffers that can be used for reads on M sockets where M > N. The details matter for that specific case.

    Again where io_uring really shines is file IO because there are no good solutions there currently.

  • Tokio-Uring Design Proposal
    2 projects | news.ycombinator.com | 8 Apr 2021
    Has this problem been filed as an issue with Jens Axboe? I would like to hear his response to it. https://github.com/axboe/liburing I believe.

    > There's also alot of security implications

    To be clear, this is liburing, NOT the io_uring syscalls that I would assume Tokio would opt for.

    > io_uring is basically just a threaded work dispatcher

    Only under SQPOLL mode. This isn't an inherent property of io_uring.

    > All these process semantics are totally hidden and non-obvious

    Again, only if you use liburing. The syscalls make this abundantly clear, as there's no other way to program for them.

    > These known and unknown future pitfalls

    The problem isn't with io_uring here, the problem is with the over-saturation of the development world with people who do not care about doing things correctly or safely but instead quickly and cost-effectively.

    This is not unique to io_uring, however. Let's not throw the baby out with the bathwater.

    > And all the fanciest programming language type safety in the world won't save you.

    I agree whole-heartedly.

    > Expect several years of easy remote exploits down the road...

    I would rather be interested to see which sidechannels were attacked in order to take advantage of io_uring. Those vulns are going to lay with the framework implementors and the users of frameworks, less with io_uring. But I understand the concern.

What are some alternatives?

When comparing libevent and liburing you can also consider the following projects:

libuv - Cross-platform asynchronous I/O

Boost.Asio - Asio C++ Library

libev - Full-featured high-performance event loop loosely modelled after libevent

tokio-uring - An io_uring backed runtime for Rust

C++ Actor Framework - An Open Source Implementation of the Actor Model in C++

uvw - Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!

OpenSSL - TLS/SSL and crypto library

ZLib - A massively spiffy yet delicately unobtrusive compression library.

Dasynq - Thread-safe cross-platform event loop library in C++

asyncio - asyncio is a c++20 library to write concurrent code using the async/await syntax.

lev - Lightweight C++ wrapper for LibEvent 2 API

go - The Go programming language