async io writeav setting

Discussion in 'General' started by anewday, Nov 4, 2008.

  1. anewday

    anewday Moderator

    async io & writeav setting

    Will litespeed add support for async io or writeav? I heard these lower iowait when serving huge static files. This is the case on an inferior server running lighttpd, the iowait is much lower than on a higher end server running litespeed enterprise. :confused:
    Last edited: Nov 4, 2008
  2. mistwang

    mistwang LiteSpeed Staff

    using async I/O is on our radar.

    Async I/O make the kernel schedule tasks in a more orderly manner, so it leads to lower load, however, it does not mean it is faster. In most cases the server is disk bounded when async I/O benefits.
  3. anewday

    anewday Moderator

    That's great to know. :D

    Today, I had to use my friend's server, running on lighttpd to serve the huge multimedia files because the iowait was really high and made my forum really slow. I was surprised that his server handled it fine with only 25% of my server's memory and load was well under 1. He said it's due to async io and I said why don't I suggest this to George. :)
  4. mistwang

    mistwang LiteSpeed Staff

    When a server performance is disk bound, async I/O will help a lot, as normally disk operation will block the single thread server process.
    We currently suggest a multi-CPU license for this kind situation.
  5. anewday

    anewday Moderator

    So, more cpu is better to server large static files?
  6. IrPr

    IrPr New Member

    Yes, but more CPUs with a webserver which supports SMP such as LS not lighttpd or nginx or tux which are single threaded webservers

    the advantage of Litespeed is SMP support which leads to more IO handling power on multi CPU cores

    Edit: nginx supports SMP and HTT as well as litespeed does!
    Last edited: Nov 7, 2008
  7. anewday

    anewday Moderator

    Isn't serving static files more hdd, memory bound than CPU?
  8. mistwang

    mistwang LiteSpeed Staff

    Yes, when the total size of static files being actively served are too large to be cached by the kernel.
  9. zellster

    zellster New Member

    To be fair, nginx does support multiple worker processes.
  10. IrPr

    IrPr New Member

    Great! i thought it does not
    checked their wiki and find out thats awesome features! seems it has more stability with higher performances at least for statistic files toward lighty or maybe LS but PHP/RUBBY dynamic scripts

    I've planned to port my major DL server with huge large files which pushes upto 600Mbit/s and 300Mbit avg to nginx and may do some benchmark stuffs to compare lighty, litespeed and nginx

    Thanks for correction
    Last edited: Nov 7, 2008
  11. anewday

    anewday Moderator

    Cool, looking forward to the benchmarks. :)
  12. anewday

    anewday Moderator

    Any updates on this writeav feature for the 4.0 release? :)
  13. anewday

    anewday Moderator

    Bump, how is this coming along for the 4.0 release?
  14. closet geek

    closet geek New Member

    I am also intrigued as iowait is a problem on our servers, anything that can help is welcomed.
  15. IrPr

    IrPr New Member

    Ok, i will share my xperiences here but i couldnt provide any graphical/statical benchmarks

    i tried nginx, lighttpd and litespeed these monthes as my major download webserver which handles large static files larger than 200MB and more than 1k concurrent connetion average, some times upto 2k at peak

    nginx is very well SMP implemented webserver with awesome bw throttle features, you can set max concurrent connection limits per each IP globally or at VHost or for any path/file type individual using PCRE conditions
    nginx is suitable for smaller files about 10~20 MB but for larger files more than 100MB it gets in IO bottlenecks with my huge connections at peak
    100% iowait for all cores which leads to high load and forces server to very lower throughput

    litespeed is better than nginx for large static files, lower iowait and well balanced between cores ( depends on your license ), but the bad thing with litespeed is max concurrent connetions which is available only globally, not in VHost levels or more depth

    lighttpd, super webserver for static contents, specially when compiled with LOCAL BUFFERING enabled in src\network_writev.c and lib async io

    it rocks! for me it can handle 2x throughput againts litespeed/nginx without any iowait
    iowait is almost 0 with that huge file sizes and awesome connetions

    currently im using lighttpd for all my download servers and for two servers im pushing upto 900Mbit/s at peak while server load is less than 1

    I strongly recommend LS developers to take an action about this, specially for AIO

    Check this out: http://litespeedtech.com/support/wiki/doku.php?id=litespeed:wiki:linux_kernel_tune
    or take a look here: http://litespeedtech.com/support/forum/showthread.php?t=2257

    all tricks help you tuning your server IOWAIT magically
    Last edited: Mar 24, 2009
  16. mistwang

    mistwang LiteSpeed Staff

    AIO is on top of our to-do list.
  17. zellster

    zellster New Member

    Do you have sendfile enabled for nginx? Ex: sendfile on;
  18. anewday

    anewday Moderator

    Will writeav be added as well?
  19. IrPr

    IrPr New Member

    Ofcourse yes, mapped all workers to all cores on a dual quad 8 cpu core box also but it gets in io bottlenecks ervery night at the peak

    I said it works like a charm for large files upto 50MB but in my own case it couldnt handle larger file size more than 100MB upto 400MB for a large cc


    BTW Special thanks to George for adding to todo list
  20. mistwang

    mistwang LiteSpeed Staff

    AIO support has been added to our 4.1b1 release, you can give it preview, just change the version number in the download link to get it. This build only use AIO, tried it on a server with high disk I/O.

    High I/O wait should not be an issue with it. We already got some positive feedbacks for it.

    Our solution is based on POSIX AIO, so it could be available for platforms other than Linux as well. It still can take advantage of buffered I/O, as O_DIRECT (direct I/O) is not required.

Share This Page