Loading ...
Sorry, an error occurred while loading the content.

Unlsung Web interface faster than Samba (!)...

Expand Messages
  • emm_is
    All, I just noticed that when (wirelessly 802.11g) using the web interface thttpd delivers files to my desktop at 3200Kb/s whereas samba will transfer the same
    Message 1 of 4 , Jun 4, 2006
    • 0 Attachment
      All,

      I just noticed that when (wirelessly 802.11g) using the web interface
      thttpd delivers files to my desktop at 3200Kb/s whereas samba will
      transfer the same file at 2500Kb/s (which I thought was pretty good).

      Does anyone have any suggestions for tweaks to Samba that could
      increase its transfer rate (given I am already using the suggested
      socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=16384 SO_RCVBUF=16384)


      Thanks.
    • Bernhard Walle
      Hello, ... I think the SMB protocol overhead is higher than the overhead of HTTP. Regards, Bernhard -- Wer die Freiheit aufgibt, um Sicherheit zu gewinnen,
      Message 2 of 4 , Jun 4, 2006
      • 0 Attachment
        Hello,

        "emm_is" <emm_is@...> [2006-06-04]:
        > I just noticed that when (wirelessly 802.11g) using the web interface
        > thttpd delivers files to my desktop at 3200Kb/s whereas samba will
        > transfer the same file at 2500Kb/s (which I thought was pretty good).
        >
        > Does anyone have any suggestions for tweaks to Samba that could
        > increase its transfer rate (given I am already using the suggested
        > socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=16384 SO_RCVBUF=16384)

        I think the SMB protocol overhead is higher than the overhead of HTTP.


        Regards,
        Bernhard
        --
        Wer die Freiheit aufgibt, um Sicherheit zu gewinnen, wird am Ende
        beides verlieren. -- Benjamin Franklin
      • Nicola Fankhauser
        ... the problem here is that samba is a complicated protocol and http is not. intelligent web servers (I know lighttpd that does that, thttpd maybe too)
        Message 3 of 4 , Jun 4, 2006
        • 0 Attachment
          emm_is wrote:
          > I just noticed that when (wirelessly 802.11g) using the web interface
          > thttpd delivers files to my desktop at 3200Kb/s whereas samba will
          > transfer the same file at 2500Kb/s (which I thought was pretty good).

          the problem here is that samba is a complicated protocol and http is
          not. intelligent web servers (I know lighttpd that does that, thttpd
          maybe too) deliver static files (e.g. files from the disk) directly
          through the asynchronous linux kernel's syscall sendfile(), which puts
          out a file from the filesystem directly to the network interface. as
          this gives you the least amount of memory copying you can get, it's also
          the fastest way to deliver files from userspace.

          I can think of two ways improving file transfer operations:

          1. use webdav, as this is an extended HTTP.
          2. try other network interfaces (USB). has anyone made benchmark
          comparing the peformance of the internal network interface vs. a USB
          ethernet dongle?
          3. use ftp (preferably on a fast ftpd :) - however I don't know which
          ones are the performers here...

          as a side note, highly doubt that you get more than 3300kb/s over a
          802.11g link, as 54mbit/s gross is about 27mbit/s net. so maybe your
          thttpd is even faster than that!

          regards
          nicola
        • Nicola Fankhauser
          ... some numbers from my fat-free turbo slug (transferring a ~85 megabytes file over 100mbit/s switched link): read: dd_rescue locally: 13358
          Message 4 of 4 , Jun 4, 2006
          • 0 Attachment
            Nicola Fankhauser wrote:
            > emm_is wrote:
            >> I just noticed that when (wirelessly 802.11g) using the web interface
            >> thttpd delivers files to my desktop at 3200Kb/s whereas samba will
            >> transfer the same file at 2500Kb/s (which I thought was pretty good).

            some numbers from my fat-free turbo slug (transferring a ~85 megabytes
            file over 100mbit/s switched link):

            read:

            dd_rescue locally: 13358 kilobytes/s
            netcat localhost: 4550 kilobytes/s

            lighttpd + wget: 4075 kilobytes/s
            ftpd + wget: 4055 kilobtyes/s
            netcat + netcat & dd_rescue: 3892 kilobytes/s
            nfs + dd_rescue: 3046 kilobytes/s
            samba + dd_rescue: 2127 kilobytes/s
            scp: 787 kilobytes/s

            write:

            dd_rescue locally: 10419 kilobytes/s
            netcat localhost: 4150 kilobytes/s

            lighttpd webdav + netdrive: 3962 kilobytes/s
            netcat: 3532 kilobytes/s
            ftpd + ncftp: 3420 kilobytes/s
            nfs: 2620 kilobytes/s
            samba: 1781 kilobytes/s
            scp: 970 kilobytes/s

            did I already tell you that I love lighttpd? :)

            regards
            nicola
          Your message has been successfully submitted and would be delivered to recipients shortly.