https://bugs.kde.org/show_bug.cgi?id=291835

--- Comment #51 from Mark <mark...@gmail.com> ---
FWIW in my mind this is by no means a user space vs kernel space thing.

I talked about sendfile/splice before in this very bug, back then i had no
numbers to back that up.

Now i do. Here's what i did.
1. I measured the iperf performance between two machines on the same network
2. That resulted in roughly 940Mbit/s thoughput (higher depends on the
hardware, cheap hardware is capable of this). And that is no special kernel
module. All just plain simple usermode.
3. I took that number and wrote a sendfile/splice application. Just to see if
copying over TCP/IP in a local network can reach those potential speeds of
~940Mbit/s
4. So i made this tool to test just that: https://github.com/markg85/netsplice
(just one file, main.cpp)
5. Surprise, it reaches ~930 Mbit/s with sendfile and splice
6. And yes, i did checksum the results. They match so the file had been
transferred correctly.
7. Take special note that this was tested with an AMD Fusion E350! SMB most
certainly can't get full performance because it has 100% CPU usage at around
~55MB/s in my tests)

So with that i've proven that copying a file over TCP/IP can saturate your
network line just fine. Something CIFS, SMB, NFS, SSHFS, FTP (to name a few)
can't. CIFS being the best though. The difference that remains is protocol
overhead and difference between flags provided (in the case of SMB vs CIFS).

That CIFS is in the kernel has absolutely nothing to do with network throughput
performance! Not at gigabit speeds that is.

The mere fact that CIFS can reach *better* speeds (it still won't saturate the
network, it gets to about 80% or so in my setups) is very likely due to a
difference in flags being passed. How to figure out the proper flags? Well,
wireshark and lots of code reading i guess.

Anyhow, when running my proof of concept file copy
(https://github.com/markg85/netsplice) you can saturate the network, which was
the goal. Sure, it misses a gazillion options, but that's not the point :) It
merely proves that copying a file can reach close to theoretical network
limits.

We just need someone to look at this really closely (the flag difference
between SMB and CIFS) and figure out the best flags to pass. Anyone up to the
task?
Using sendfile in the KIO SMB code might still be benificial, but also a lot
more complicated so just stick at comparing flags for the moment.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to