Perhaps this sounds like a dumb question, but I've not been able to
find the answer:
libuv uses completion ports in Windows and eio in Unix in general.
Shouldn't it also use aio ( https://www.ibm.com/developerworks/linux/library/l-async/
) specifically for Linux?
I mean, and correct me if I'm wrong, Node "fs" module is now optimized
for Windows and not Linux, right?
Personally I'd like to see that module not using the thread pool...
Thanks,
-Pedro
Here is why AIO is not an option:
https://github.com/joyent/node/issues/1446#issuecomment-1721004
Besides the limitations that the native AIO API imposes it's also
possible for it to not actually be supported by the kernel or the file
system - in which case it may either report an error or fall back to
synchronous I/O...
On a side note, that article you linked to discusses the aio_*()
functions. They're unrelated to native Linux AIO, it's just wrappers
around a thread pool in user space (like libeio, only less flexible
and more awkward to use).
Thanks!
On Dec 8, 9:20 pm, Ben Noordhuis <i...@bnoordhuis.nl> wrote:
> On Thu, Dec 8, 2011 at 21:56, Pedro Teixeira <pedro.teixe...@gmail.com> wrote:
> > Hey,
>
> > Perhaps this sounds like a dumb question, but I've not been able to
> > find the answer:
>
> > libuv uses completion ports in Windows and eio in Unix in general.
> > Shouldn't it also useaio(https://www.ibm.com/developerworks/linux/library/l-async/
> > ) specifically for Linux?
>
> > I mean, and correct me if I'm wrong, Node "fs" module is now optimized
> > for Windows and not Linux, right?
> > Personally I'd like to see that module not using the thread pool...
>
> > Thanks,
>
> > -Pedro
>
> Here is whyAIOis not an option:
>
> https://github.com/joyent/node/issues/1446#issuecomment-1721004
>
> Besides the limitations that the nativeAIOAPI imposes it's also
> possible for it to not actually be supported by the kernel or the file
> system - in which case it may either report an error or fall back to
> synchronous I/O...
>
> On a side note, that article you linked to discusses the aio_*()
> functions. They're unrelated to native LinuxAIO, it's just wrappers
To my knowledge there is no UNIX platform that we support with a
functional AIO API (with the exception of Solaris - maybe) so the
thread pool is here to stay for the foreseeable future.