Recommand async IO library/framwork?

I have a program to write data to multiple files and want to improve its performance.

Then I think about asynchronous IO.

I will submit data into a centrallized context asynchronously, and the context will submit the io to the corresponding fd or else. Generally speaking, it's like libaio library.

But I don't find library like that or better than that.

Any async IO library/framwork recommended?(Not about networking IO)

thanks.
The first step is to benchmark your disk.
1
2
3
4
$ dd if=debian-10.5.0-amd64-DVD-1.iso of=zzDummy
7750848+0 records in
7750848+0 records out
3968434176 bytes (4.0 GB, 3.7 GiB) copied, 94.3688 s, 42.1 MB/s

This is going to be pretty close to the hard upper limit of what your current OS / filesystem / disk is capable of achieving.

Then profile what you have with real data.
If it's stuck doing some massive calculation, asio isn't going to solve anything.
If it's stuck waiting for the network, asio isn't going to solve anything.
If your program is already close to your 'dd' stats when it comes to writing to disk, asio isn't going to solve anything.

https://git-scm.com/
If you haven't already, get some source control.
So that when your latest attempt at trying to improve things either introduces bugs, or makes it worse, then you can revert back to a known working state with ease.
Topic archived. No new replies allowed.