aio-libs / aioftp

ftp client/server for asyncio (http://aioftp.readthedocs.org)
Apache License 2.0
185 stars 54 forks source link

README benchmarks #139

Open martindurant opened 3 years ago

martindurant commented 3 years ago

Do you have the numbers the wrong way around at https://github.com/aio-libs/aioftp#server-benchmark ?

pohmelie commented 3 years ago

I don't get you... what do you mean by "wrong way around"?

martindurant commented 3 years ago

Copied:

aioftp 0.8.0

STOR (client -> server) 284.95 MB/sec RETR (server -> client) 408.44 MB/sec 200 concurrent clients (connect, login) 0.18 secs STOR (1 file with 200 idle clients) 287.52 MB/sec RETR (1 file with 200 idle clients) 382.05 MB/sec 200 concurrent clients (RETR 10.0M file) 13.33 secs 200 concurrent clients (STOR 10.0M file) 12.56 secs 200 concurrent clients (QUIT) 0.03 secs

pyftpdlib 1.5.2

STOR (client -> server) 1235.56 MB/sec RETR (server -> client) 3960.21 MB/sec 200 concurrent clients (connect, login) 0.06 secs STOR (1 file with 200 idle clients) 1208.58 MB/sec RETR (1 file with 200 idle clients) 3496.03 MB/sec 200 concurrent clients (RETR 10.0M file) 0.55 secs 200 concurrent clients (STOR 10.0M file) 1.46 secs 200 concurrent clients (QUIT) 0.02 secs

This appears to say that pyftpdlib has consistently higher throughput and lower latency

pohmelie commented 3 years ago

Here is same question I think: https://github.com/aio-libs/aioftp/issues/57

martindurant commented 3 years ago

Hm, OK, I was clearly misapprehending, sorry. I wonder if you could find benchmarks that was "fairer"?

In any case, do you have benchmarks from the client side?

pohmelie commented 3 years ago

It's not «unfair» it's just caching. That benchmark good side is that it written by pyftpdlib guys, so no code from my side. Client side have no benchmarks.

martindurant commented 3 years ago

It's not «unfair» it's just caching.

If I were you, I would make the difference plain, else people will get the impression that this library should not be used. I would also say that the benchmarks you run were designed for and by pyftpdlib (and you didn't want to duplicate the effort).

Client side have no benchmarks.

Can there be? Is it actually possible to have several files transferring concurrently with a client to a single server?

pohmelie commented 3 years ago

@martindurant if you have any ideas to improve "benchmark" part of readme, then feel free to make a PR. Speed is not the main goal of aioftp. I agreed that benchmark is «pyftpdlib-oriented», but it is a written and tested benchmark.

For client benchmarking, I'm not sure you need it, since the bottleneck is networkn in 99% cases. You can concurrently download from one server with multiple clients, but if server do not throttle your download, then there is no effort for this.