haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.21k stars 1.54k forks source link

Massive regression in download speed in Seafile Windows client 9.0.7 #2817

Open Makumasa opened 4 weeks ago

Makumasa commented 4 weeks ago

I use the Seafile desktop client on multiple machines on my home network, which I use to sync files to/from a Seafile server also running on my home network. Recently, I've noticed that the download speed in the client has been very slow. For example, on my PC, my download speeds would typically range between 100-140 MB/s, but they were now 10-30 MB/s. Running a speed test confirmed that my machine's network performance hadn't changed, and downloading the same file via the Seafile web UI was substantially faster, indicating that the client was the most likely culprit. In my attempts to troubleshoot this issue, I tried the following:

None of these resolved the issue. No matter what I tried, the download speed would never exceed 30 MB/s, and would typically hover around 17 MB/s. My brother's laptop, however, was getting download speeds above 100 MB/s on the same network. After discovering that his client was still on version 9.0.6, I tried rolling back my machines to 9.0.6, and sure enough the throughput returned to what I'd expect.

I tried looking through the client logs, but didn't find anything out of the ordinary, so I'm not sure what the root cause is. The most I can say with any confidence is that the regression appears to have been introduced between versions 9.0.6 and 9.0.7 of the Seafile Windows client. I am unsure if the Linux/Mac clients are impacted, as I haven't tested those.

killing commented 4 weeks ago

In 9.0.7 version we modified the download process to directly write the downloaded data into the final file. In previous versions the data was written first into a temp file in internal cache folder then write to the user-visible file. The purpose of this change is to reduce the potential cache size limitation when downloading large files. We'll analyze the code for performance issues.

Makumasa commented 3 weeks ago

In 9.0.7 version we modified the download process to directly write the downloaded data into the final file. In previous versions the data was written first into a temp file in internal cache folder then write to the user-visible file. The purpose of this change is to reduce the potential cache size limitation when downloading large files. We'll analyze the code for performance issues.

Sounds good. Let me know if you'd like me to provide any additional information from my client or the tests I ran. As far as I can tell, the issue is trivial to reproduce.