vblade-15-aio.2.README 1.9 KB

  1. This proof-of-concept patch modifies vblade to access the underlying block
  2. device using POSIX asynchronous IO (AIO) rather than using normal blocking
  3. read() and write(). AIO allows vblade to receive and queue several several ATA
  4. read/write commands at once, returning the response to the client
  5. asynchronously as each IO operation completes. It should be most beneficial
  6. for devices which experience very non-sequential IO. An AIO-enabled vblade is
  7. also a good starting point if you want to generalise vblade to export multiple
  8. devices without the complexity and overhead of a multithreaded approach.
  9. The patch implements AIO support for both Linux and FreeBSD, but I have not
  10. tested the FreeBSD support and would therefore be especially interested to
  11. hear success/failure reports for compiling and running AIO vblade on FreeBSD.
  12. A SIGIO handler which writes a single byte to a pipe is used to notify the
  13. main poll() loop that AIO operations have completed and are ready to return to
  14. the client. Running oprofile on a box with a heavily loaded loopback
  15. vblade-aio suggests that it spends an inordinate amount of time in the signal
  16. handler. Some method of poll()ing directly on the AIO events at the same time
  17. as the socket fd could cut this overhead out completely.
  18. More generally, experimenting on Linux with standard O_DIRECT vblade and
  19. O_DIRECT vblade-aio on a loopback interface with MTU 9000 suggests that the
  20. performance difference on a single RAID1-backed block device is fairly small:
  21. swamped by the performance of the network and the underlying block device.
  22. However, the POSIX AIO in glibc librt is emulated in userspace threads rather
  23. than using the kernel AIO api. A kernel-backed POSIX AIO implementation should
  24. perform better, especially for multiple access to a single block device.
  25. I would be delighted to hear any feedback and experiences from people running
  26. vblade together with this patch.
  27. Chris Webb <chris@arachsys.com>, 2008-04-21.