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

How to speed up transfer rate? #440

Open
MarhabaLRS opened this issue Nov 22, 2020 · 13 comments
Open

How to speed up transfer rate? #440

MarhabaLRS opened this issue Nov 22, 2020 · 13 comments
Labels

Comments

@MarhabaLRS
Copy link

Why tusd is slow?
When I start upload, Uploading chunk to my Tusd instance, after some time was halted upload, then resume the upload, then halted. It was repeatedly happened until complete the upload. Is there any reason?. It will take about 2times time to complete single upload

I have 60Mbps Connection.
bandicam 2020-11-22 10-10-41-527

Setup details

  • Operating System: Ubuntu
  • Used tusd version: latest
  • Used tusd data storage: AWS S3
  • Used tusd configuration: -s3-bucket, -s3-endpoint, -s3-object-prefix files, -s3-part-size 33554432, -max-size 2199023255, -timeout 0, -port 1080, -behind-proxy true, -expose-metrics false
  • Used tus client library: tus-js-client

Colud you suggest setups for tus instance to achive maximum perfomance

@MarhabaLRS
Copy link
Author

Sometimes it will be like this.

bandicam 2020-11-21 22-58-34-287

@Acconut
Copy link
Member

Acconut commented Nov 23, 2020

How is your upload connection to AWS S3? tusd can only accept incoming data as fast as it can push it to AWS S3. So, if your upload speed to AWS S3 is not sufficient, tusd will also slow down.

@MarhabaLRS
Copy link
Author

My PC(tus-js-client from localhost) to EC2 about 40-50 Mbps, EC2 to S3 shows 1Gbps.

@Acconut
Copy link
Member

Acconut commented Nov 23, 2020

Ok, good to know. Can you try increasing the -s3-part-size flag to more than 50MiB (see https://github.com/tus/tusd/blob/master/cmd/tusd/cli/flags.go#L59)? Maybe try a few different values and see if they change the behavior.

@MarhabaLRS
Copy link
Author

Current part size is 96MiB 100663260 Bytes . I've already tried 32MiB, 48MiB, 56MiB.
These are the flags tusd -s3-bucket tusd-storage -s3-endpoint https://s3.eu-central-1.amazonaws.com -s3-object-prefix files -s3-part-size 100663260 -max-size 2199023255552 -timeout 0 -port 1080 -hooks-http http://0.0.0.0:8080/tus-auth.php -hooks-http-retry 3 -hooks-http-backoff 2 -hooks-enabled-events pre-create,post-create,post-finish,post-terminate,post-receive -behind-proxy true -expose-metrics false

@Acconut
Copy link
Member

Acconut commented Nov 23, 2020

And do these different values result in different behaviour?

@MarhabaLRS
Copy link
Author

Nop. Still the result is same. 1-3 Second Uploading in Maximum Speed, Then down for 1-3 Second. Sometimes upload get stuck. Tusd server not receiving data continuously.

@Acconut
Copy link
Member

Acconut commented Nov 23, 2020

How about values larger than 96MiB?

@MarhabaLRS
Copy link
Author

The result is same. I've tried 200MiB,500MiB and 1GB. How did you implemented this (https://tusd.tusdemo.net/) test server.

@Acconut
Copy link
Member

Acconut commented Nov 30, 2020

The demo server is running the tusd Docker image on Heroku: https://github.com/tus/tusd/blob/master/.github/workflows/main.yml#L47-L60

@arrowcircle
Copy link

Any updates here?

@Acconut
Copy link
Member

Acconut commented Feb 11, 2023

We have tried to investigate the root cause of slower uploads speeds to S3, but did not find a good solution so far.

I hope to share a more detailed report soon.

@Acconut
Copy link
Member

Acconut commented Mar 26, 2023

Some updates and insights are available in #924.

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

No branches or pull requests

3 participants