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

Slow / weird behavior with download speed #182

Open
drojf opened this issue Aug 23, 2022 · 3 comments
Open

Slow / weird behavior with download speed #182

drojf opened this issue Aug 23, 2022 · 3 comments

Comments

@drojf
Copy link
Collaborator

drojf commented Aug 23, 2022

I noticed there is some sort of caching going on between the server and my computer.

Seemingly, downloading with the installer was slow (~200-300KiB), but then trying to download via some other method was fast (10MiB).

However what was really happening, was that re-downloading a file which had already been partially/fully downloaded was fast. There was some sort of caching going on when downloading from the server.

I think there is some issue with downloading very large files (such as the graphics archives) - they are not cached, or perhaps downloading one causes the limited cache to be emptied? so when the next person goes to download, it will need to re-download the file or something). Not sure if the cache is global to everyone, local to regions of the world, or local to just me.

This is not really my area of expertise so I don't really know what could be going on. I also am not sure how we have stuff setup on the server (or how a server is usually setup for serving large files)

@drojf
Copy link
Collaborator Author

drojf commented Aug 23, 2022

I had a quick look at this thread: https://community.cloudflare.com/t/cloudflares-non-cached-static-files-download-speed-is-painfully-slow-compared-to-non-proxied-via-cf-connection/234298/13

which suggested you're not meant to serve large files through cloudflare (any file >512MB), also see

I tried downloading directly from the server, and it does indeed seem much more consistent (about 3MiB after about 10 seconds of downloading no matter which file I tried)

I also tested different file sizes:

  • Small files (<512) mostly download quickly, but not always
  • Large files sometimes download slowly (but also sometimes download quickly).
  • This was a very informal test, I may have made a mistake.

Some things we could do:

  • It might help to disable caching for large files only (>32mb?) (I would have thought that is the default behavior, but maybe not?). Maybe when you serve a large file, cloudflare will slowly feed the file into the cache rather than letting you get the file directly.
  • I previously said splitting up large files into small files, but after some testing that probably doesn't help. It feels more like there is some global cache, and eventually some file leaves the cache and becomes slow until it is next downloaded.
  • Read up on how cloudflare caching actually works (for me, since I don't understand how it works lol)
  • Check whether our big files are actually cached on cloudflare

@drojf
Copy link
Collaborator Author

drojf commented Nov 23, 2022

We had a report of slow donwload speed, pretty much the same as I experienced it.

like it starts downloading it and immediately plummets to triple digit KB range in download speed

I tried re-downloading (probably) the same file, and was at full speed, which suggests it doesn't have to do with the server, but might be something region specific, which happens randomly at certain times.

@drojf
Copy link
Collaborator Author

drojf commented Nov 23, 2022

I added a note/warning in the installer for now to try the download later if you're getting slow downloads: e09f66b

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

1 participant