On Thursday, November 29, 2012 3:41:01 AM UTC+1, Ben Noordhuis wrote: > > On Thu, Nov 29, 2012 at 2:43 AM, Tolga Tekin <[email protected]<javascript:>> > wrote: > > Actually that is not completely true - Both Windows and MacOSX's native > file > > APIs support async file operations. > > The limitation might be coming from linux posix api. > > I'm aware of them but neither are really usable. > > Windows AIO only works with files opened in direct I/O mode, meaning > you bypass the disk cache. When a file system doesn't support AIO, it > either raises an error (in which case you have to fall back to > user-space threads) or silently (!) switches to synchronous I/O. > > OS X AIO is implemented with kernel threads but the default settings > are way too low to do anything useful, you have to tweak a bunch of > sysctls first. FreeBSD has similar issues (the implementations are > very similar) and you need to manually load a kernel module first, > otherwise everything fails with ENOSYS. > > Native Linux AIO has the same issues as Windows. glibc's POSIX AIO > implementation doesn't even bother with it, it always uses user-space > threads. > > The only operating system I know of that has a remotely usable > implementation is Solaris and who uses that? >
The problem in windows is mostly that it silently switches to synchronous AIO in many cases, some of which are documented but others are not. This can be bypassed by using direct mode I/O but it has many other disadvantages. As for solaris, I am not convinced that is has usable kernel AIO. As far as I know solaris kaio will (transparently) fall back to using threads when reading from or writing to ordinary files. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
