[erlang-questions] Need help with async disk IO and thread pool on many devices (more than 1 Gbit/s )
Max Lapshin
max.lapshin@REDACTED
Sat Apr 13 13:07:43 CEST 2013
I've read sources and found new ideas.
efile_drv.c is using driver_async: DRIVER_ASYNC(d->level, desc, d->invoke,
void_ptr=d, d->free);
desc is a pointer to file structure.
It means, that each request to one opened file descriptor will be executed
on single async thread.
In fact, I need to make an erlang-level job queue for reading from disk.
There is a long queue of disk requests. I can tag them by their "major
device id" or any other tag.
I can track, how many requests are opened and not finished for one tag. If
there is more than N/M requests (where N is async threads size and M is
number of different tags), than request is queued or failed.
So, I think that I don't need to write it in C, I can do it in erlang, but
make the back pressure not on C level, but on Erlang level.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130413/bc85738b/attachment.htm>
More information about the erlang-questions
mailing list