Performance issues when using the Network API used to create a web server

Hello,

We use the Network API in our macOS ObjectiveC applications to create a small web server. With macOS Sequoia or Tahoe (not with Sonoma), downloading files from another computer using the built-in ethernet port is way too slow.

Steps to reproduce:

  • Computer A (using macOS Tahoe or Sonoma), run an application using the Network APIs to create a webserver
  • Make sure that this computer connects to the network using the Ethernet port, there is no issue when using WiFi
  • On computer B, make an HTTP request to download a 20MB file => it will take about 30 seconds to download => way too slow...

We tested with:

  • if on computer A you run a web server using the GCD API instead of Network, it takes 0.2 seconds to download the file => no issue
  • on computer A disable TSO, it improves the results, but that's not a long term solution as it doesn't hold when rebooting

I can provide sample code to demonstrate this if needed.

This is a new issue as it's been a while we use that code, and only noticed it recently, and macOS Sonoma is not impacted.

Thank you for the help you can provide.

Pierre

Here's a link to download a sample code that will run a server with the Network API and with the GCD API.

Instructions are included, in the "Instructions.txt" file, as you may have guessed. ;-) https://softron-downloads.s3.amazonaws.com/bvcwb546r7ret8hyj9tpm413a57zagf6qdf6h8/DualHTTPServer.zip

Thank you!

Pierre

Performance issues when using the Network API used to create a web server
 
 
Q