Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max speed bottleneck for multiple devices #44

Open
robm92 opened this issue Dec 6, 2018 · 7 comments
Open

Max speed bottleneck for multiple devices #44

robm92 opened this issue Dec 6, 2018 · 7 comments

Comments

@robm92
Copy link

robm92 commented Dec 6, 2018

My use-case for this framework is to send a large file to batches of devices from a single host.
Using the Apple Tetherator utility (Internet sharing over USB), I can send data at ~ 30MB/s to 16 devices using a Thunderbolt usb board (https://cambrionix.com/products/thundersync16-thunderbolt-usb-bridge/).

Using this framework, I can max the throughput of a single device but am only able to achieve 3.5 MB/s to 16 devices at a time.

Is this a limitation of usbmuxd or have I missed something?

My minor changes to your example project are as follows:

I can loop through a file in blocks of 8192 with a FileHandle and write the data to each device.

Where 'devices' is an array of connected Device objects and 'data' is a block of 8192 byte data.
for device in devices{ device.writeData(data: data) }

@jensmeder
Copy link
Owner

That's an interesting setup you have there. Unfortunately, I am unaware of the limitations of usbmuxd as it is a proprietary protocol developed by Apple but as the name suggests it is multiplexer. Therefore, the download speed of 3.5MB/s per device sounds reasonable given a USB2.0 interface when connecting 16 devices at once. I can only assume that the Thundersync16 has been optimized to work around these limitations somehow.

Just one thought: At the moment the DarkLightning sample applications run on the same port. You might be able to increase the speed if you could open a socket on a dedicated port for each device. That requires some modifications to both the iOS and macOS applications though.

@cbenhagen
Copy link

@robm92 did you find a solution to speed up your transfer?

@robm92
Copy link
Author

robm92 commented Oct 21, 2019

I didn’t but haven’t revisited since.
I’m currently hosting the file on an apache server and downloading it to the devices over Tethered Caching to maximise the throughput of each device.

@cbenhagen
Copy link

Oh that sounds interesting as well. Do you happen to have more info on the Tethered Caching?

@cbenhagen
Copy link

@robm92 Sorry I have been a bit quick with my answer. I guess I can find all info myself. If you have tips you want to share I am happy to hear them of course.

@robm92
Copy link
Author

robm92 commented Oct 21, 2019

In System Preferences -> Sharing you'll see a row named "Content Caching". Turn this on and select "Share: Internet Connection". This will turn on the Tethering service which allows connected devices to use internet over the cable, therefore letting you download files from a local server on the connected machine. You can monitor the status of the device connection in terminal with 'assetcachetetheratorutil status'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@cbenhagen @jensmeder @robm92 and others