I installed MC Server and Apache on my gaming machine and repeated the tests.
Conclusion: same results - see attached:
- On localhost, MC is actually 30% faster than Apache, at an amazing 1.2 GB/sec. This proves that MC can be fast.
- over wired LAN, Apache almost saturates the link (98MBps ~ 800 Mbps), but MC already drops to 580 Mbps
- over wifi LAN, Apache again saturates the wifi link at over 600 Mbps, but MC can't even reach 200 Mbps
- as latency increases... speed goes dramatically down, up to 90% worse than Apache. This is not a small difference.
Since the CPU is not to blame, this seems to be related to TCP stack implementation on MC: insufficient buffer sizes, TCP scaling window not growing, delayed ACK not enabled, or something like that. For the remote sharing feature, it would be nice to find the culprit. Perhaps MC was just optimized for Wired LAN and needs some tweaks to handle latency better. This will also likely benefit Cloudplay uploads and improve the Panel/JRemote/etc experience.
Test notes:
- Values are in MBytes/sec.
- Tests were done with source files on a local M.2 SSD (3GB/sec read speed).
- I used "wget -O nul" to perform read-only tests: file is downloaded but not written to disk, so the disk on the test machine is not relevant.
- only "localhost" test was executed on the Server machine; other tests were run on a 2nd PC connected to LAN via Ethernet or Wifi