eventcore vs boost.asio performance?
zoujiaqing
zoujiaqing at gmail.com
Sun Mar 5 15:14:07 UTC 2023
On Monday, 20 February 2023 at 08:26:23 UTC, Sönke Ludwig wrote:
> I'm not sure where it would be today on that list, but I got
> pretty competitive results for local tests on Linux a few years
> back. However, there are at least two performance related
> issues still present:
>
> - The API uses internal allocation of memory for I/O operations
> and per socket descriptor. This is to work around the lack of a
> way to disable struct moves (and thus making it unsafe to store
> any kind of pointer to stack values). The allocations are
> pretty well optimized, but it does lead to some additional
> memory copies that impede performance.
>
> - On both, Linux and Windows, there are new, faster I/O APIs:
> io_uring and RIO. A PR by Tobias Pankrath
> (https://github.com/vibe-d/eventcore/pull/175) for io_uring
> exists, but it still needs to be finished.
>
> Another thing that needs to be tackled is better error
> propagation. Right now, there is often just a generic "error"
> status, without the possibility to get a more detailed error
> code or message.
>
> By the way, although the vibe.d HTTP implementation naturally
> adds some overhead over the raw network I/O, the vibe.d results
> in that list, judging by their poor performance on many-core
> machines, appear to be affected by GC runs, or possibly some
> other lock contention, whereas the basic HTTP request handling
> should be more or less GC-free. So those shouldn't be used for
> comparison.
First, the io_uring is very much to look forward to! When can you
merge this PR?
Secondly, how to optimize memory allocation and release under
high concurrency? Nbuff is a great library, and I've used it
before.
More information about the Digitalmars-d
mailing list