Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Linux Kernel To Get AIO Performance Improvements

  1. #1
    Join Date
    Jan 2007
    Posts
    14,792

    Default Linux Kernel To Get AIO Performance Improvements

    Phoronix: Linux Kernel To Get AIO Performance Improvements

    The Linux Kernel A-synchronous I/O support has been receiving some performance improvements and clean-ups that should soon be merged to mainline...

    http://www.phoronix.com/vr.php?view=MTI0MTk

  2. #2
    Join Date
    Dec 2011
    Posts
    2,048

    Thumbs up Exciting

    Sounds exciting!

    Anything asynchronous sounds good to me.

  3. #3

    Default

    Quote Originally Posted by uid313 View Post
    Sounds exciting!

    Anything asynchronous sounds good to me.
    Unfortunately, very few programs use AIO; performance improvements in it will probably not affect the average user. With that said, QEMU uses AIO, so it should benefit from this.

  4. #4
    Join Date
    Nov 2008
    Location
    Madison, WI, USA
    Posts
    874

    Default

    Quote Originally Posted by ryao View Post
    Unfortunately, very few programs use AIO; performance improvements in it will probably not affect the average user. With that said, QEMU uses AIO, so it should benefit from this.
    I wonder if that means that the abysmal performance that my work system has under heavy VM I/O load in VirtualBox might improve (Windows Vista/7 guests, Linux host).

    Any time that I start/shutdown/restart a VM, my system responsiveness takes a nosedive.

  5. #5
    Join Date
    Dec 2011
    Posts
    2,048

    Default

    Quote Originally Posted by ryao View Post
    Unfortunately, very few programs use AIO; performance improvements in it will probably not affect the average user. With that said, QEMU uses AIO, so it should benefit from this.
    Why is that?

    Because it is very rare for most software to be suitable for AIO or because AIO didn't exist in the kernel, hence there weren't easy to implement AIO support?

    Maybe now, we will see more software utilizing AIO in the future. I don't know.

  6. #6

    Default

    Quote Originally Posted by Veerappan View Post
    I wonder if that means that the abysmal performance that my work system has under heavy VM I/O load in VirtualBox might improve (Windows Vista/7 guests, Linux host).

    Any time that I start/shutdown/restart a VM, my system responsiveness takes a nosedive.
    This probably would help IO response times inside your VMs, but I am not sure if you would notice any effect on the host.

    When you start a VM, Linux could evict pages from cache to make room for it, which would affect system response times. It could also be that your system is IO limited.

    Quote Originally Posted by uid313 View Post
    Why is that?

    Because it is very rare for most software to be suitable for AIO or because AIO didn't exist in the kernel, hence there weren't easy to implement AIO support?

    Maybe now, we will see more software utilizing AIO in the future. I don't know.
    The kernel's VFS layer provides AIO functions. However, writing programs that take advantage of asynchronous operations requires more effort than those using their traditional UNIX counterparts. Utilizing AIO provides no benefit unless your program is a daemon that can do other things while waiting for IO.

  7. #7
    Join Date
    Dec 2008
    Posts
    146

    Default

    Quote Originally Posted by Veerappan View Post
    I wonder if that means that the abysmal performance that my work system has under heavy VM I/O load in VirtualBox might improve (Windows Vista/7 guests, Linux host).

    Any time that I start/shutdown/restart a VM, my system responsiveness takes a nosedive.
    Do you have a lot of RAM?

    It took me a long time to figure it out, but I noticed on my system (32GB RAM) that the settings for VM dirty_ratio and dirty_background_ratio are not nearly low enough -- even 1 is not low enough. What seems to be happening is that during heavy write activity, the system caches writes until it has hundred of MiBs or more in the cache, then decides to write it to storage and that seems to block other processes and can cause the system to nearly freeze for seconds at a time.

    My partial solution is to use dirty_bytes and dirty_background_bytes instead. I currently set them to 96MiB and 32MiB:

    echo "100663296" > /proc/sys/vm/dirty_bytes
    echo "33554432" > /proc/sys/vm/dirty_background_bytes

    That much can be written to storage in less than a second. It seems to help. The mulitple second freezes are mostly gone.

  8. #8
    Join Date
    Nov 2011
    Posts
    5

    Default Posix AIO

    Last time I checked you had to specifically link your program against libaio to get true Linux AIO, using non standard system call io_submit(2) and friends.

    Standard POSIX AIO (aio_write(3)) on Linux is a kludge implemented by spawning blocking threads in the glibc. Red Hat and Novell rolled their own implementation of POSIX AIO on top of Linux AIO for their OSes.

  9. #9
    Join Date
    Dec 2012
    Posts
    1

    Default

    Nginx, a popular high-perfomance webserver, should benefit from these patches. It has asynchronous design and it supports file AIO in Linux. Would be interesting if phoronix had tested its performance with and w/o the patches.

  10. #10

    Default

    Quote Originally Posted by Need4Speed View Post
    Last time I checked you had to specifically link your program against libaio to get true Linux AIO, using non standard system call io_submit(2) and friends.

    Standard POSIX AIO (aio_write(3)) on Linux is a kludge implemented by spawning blocking threads in the glibc. Red Hat and Novell rolled their own implementation of POSIX AIO on top of Linux AIO for their OSes.
    That is not a requirement. Any userland program that wishes to use AIO may use the AIO syscalls without using libaio.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •