07th-mod / python-patcher

Mod Installer for the Higurashi and Umineko Games
150 stars 12 forks source link

Slow / weird behavior with download speed #182

Open drojf opened 2 years ago

drojf commented 2 years ago

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 commented 2 years ago

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:

Some things we could do:

drojf commented 1 year ago

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 commented 1 year ago

I added a note/warning in the installer for now to try the download later if you're getting slow downloads: https://github.com/07th-mod/python-patcher/commit/e09f66b7b70de764b3a604cf6a996bdab8fc79bc