Poor performance of AIO in Solaris 2.5?
Bil Lewis wrote: > > Douglas C. Schmidt wrote: > > > > Hi Mike, > > > > ++ I have an application that needs to write files synchronously (i.e: a > > ++ database-like application). I figured I should try and use the “aio” > > ++ family of system calls so that several such writes can be in progress > > ++ simultaneously if the files are on different disks. (A synchronous write > > ++ takes around 12-16 msecs typically on my machine.) > > ++ > > ++ I would have expected that the lio_listio() would be no slower than 2 > > ++ write()’s in series, but it seems to be 4-5 times worse. > > > > Our ad hoc tests using quantify/purify seem to indicate that the > > aio*() calls on Solaris are implemented by spawning a thread PER-CALL. > > This is most likely to be responsible for the high overhead. I’m not > > sure how other operating systems implement the aio*() calls, but > > clearly spawning a thread for each call will be expensive. > > I never worked with the AIO stuff, but this does sound corr