WebDAV/gluster very slow! Only 25MB/s upload

Discussion in 'Apache' started by nosebreaker, Oct 1, 2013.

  1. #1
    Hello,

    I'm trying to figure out why my apache/mod_dav setup is so slow. I am able to SCP a file onto the box at 60MB/s, so I am surprised that webdav is so much slower. The 60MB/s is the max speed of gluster in my setup (I only have a 1gb link between the two nodes, so 1gbit/2 = 500mbit =~ 60mbytes). I see that cpu usage is considerably higher with webdav, and some quick write testing seems to correlate that apache is writing files with small block/stripe sizes.

    For example using dd I can write at the full 60MB/s with a 1M block size (write 4gb test file):
    dd if=/dev/zero of=testfile.out bs=1M count=4096

    And if I change bs=2k it seems to be about 25MB/s. The larger I make the block size the faster it gets (until the 60MB/s max of course). This leads me to think that apache is writing the data only at 2k block sizes (or similar). I tried uploading files from multiple clients at once as well to see if I could upload to webdav faster, but the total max speed is right around there.

    I have tried downloading the apache source and changing READ_BLOCKSIZE and DAV_READ_BLOCKSIZE as they are both originally 2048, thinking this might help. Unfortunately it did not. Is there any way to change the write size?

    I have confirmed that it is just this combination (gluster with webdav), webdav on its own writes much faster than 25MB/s. I know that gluster doesn't do well with small files, which brought me to Apache being the issue.

    Has anybody else encountered this issue? I have disabled SSL and everything else, the nodes are quite powerful and should easily be able to handle the workload.
     
    nosebreaker, Oct 1, 2013 IP