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

Use a bigger chunk size when transferring files across nodes #2738

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

jonatanklosko
Copy link
Member

We transparently copy files from Livebook to remote runtime (Fly), for example, when using Kino.Input.image. We noticed that it takes unusually long time to transfer the file. This increases file chunk size that we write across the nodes.

Just as an example, I tried ~1MB .jpeg image and this change dropped the transfer time roughly from 70s to 4s.

Copy link

github-actions bot commented Aug 9, 2024

Uffizzi Preview deployment-55110 was deleted.

@josevalim
Copy link
Contributor

We can probably bump it even more? I'd expect the Erlang distribution to chunk large binaries naturally, so we don't have to worry about those concerns. I mean, in Nx we just send the whole binary tensor, and I haven't ran into issues.

@jonatanklosko
Copy link
Member Author

@josevalim we still want to minimize the memory usage while sending the file, no? I kept it at 64kb, because bumping to 128kb didn't seem to bring further improvement :)

@jonatanklosko jonatanklosko merged commit c1fd9bc into main Aug 9, 2024
7 checks passed
@jonatanklosko jonatanklosko deleted the jk-file-transfer-chunk branch August 9, 2024 12:50
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

Successfully merging this pull request may close these issues.

2 participants