alist icon indicating copy to clipboard operation
alist copied to clipboard

性能问题: 差距可达6倍以上

Open fangfang333 opened this issue 1 year ago • 4 comments

Please make sure of the following things

  • [X] I have read the documentation.
  • [X] I'm sure there are no duplicate issues or discussions.
  • [X] I'm sure this feature is not implemented.
  • [X] I'm sure it's a reasonable and popular requirement.

Description of the feature / 需求描述

首先有两个服务器: ①一个alist挂载本地文件夹。 ②另一个用nginx搭建简单的文件列表,配置文件如下 location /share/tmp { alias /opt/file/share/tmp; autoindex on; charset utf-8; }

其实这两个的本体都是同一个本地文件夹,但是实际下载同一个大文件时(多线程), nginx的速度可以达到830mbps左右,CPU占用为4%~5% alist的速度平均为424mbps左右,CPU占用在93%~99%之间波动。

全部都是外网下载,都经过了两次反代(中转机反代以及本机443反代) 处理器为arm架构4核,alist是24年4月安装的最新版本(docker版)。

Suggested solution / 实现思路

我也正在用另外一个网盘程序zfile,它也有同样的性能问题,但是有一个还算不错的解决办法,就是设置后端服务器,它可以将后端设置为本机的nginx服务器端口,就可以做到实际下载时使用nginx的链接直接下载,速度很快,只不过在路径上面会自动覆盖成/pd/无法绕过,并且强制加上了?signature=1ce6a491e之类的鉴权参数),只能修改nginx的监听路径, 我相信在302跳转这方面alist十分专业, 希望alist可以考虑一下这个方向去优化本地文件夹的性能问题,我很喜欢alist的界面,不想直接用nginx这么简陋的"网盘"

Additional context / 附件

image

fangfang333 avatar Apr 07 '24 17:04 fangfang333

Thanks for opening your first issue here! Be sure to follow the issue template!

welcome[bot] avatar Apr 07 '24 17:04 welcome[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 21 '24 17:05 stale[bot]

这个可以设置alist的本机存储的WebDAV 策略->使用代理地址

然后正确配置nginx的工作目录为你的存储目录

将nginx提供的主机地址作为代理地址

YunchaoZheng avatar May 26 '24 09:05 YunchaoZheng

这个可以设置alist的本机存储的WebDAV 策略->使用代理地址

然后正确配置nginx的工作目录为你的存储目录

将nginx提供的主机地址作为代理地址

image 你是说这个吗?好的谢谢,没注意到这个地方也是可以设置的,但是我的用户(包括我自己)一般都是直接用浏览器下载的,会用到webdav协议?如果是单纯的分享文件给别人,就不会有机会教他怎么挂载我的alist的,也没必要这么麻烦,他只要快速方便的拿到文件就完事了。

fangfang333 avatar May 26 '24 09:05 fangfang333

正确配置代理地址后,用户点击网页的下载按钮也会使用该地址

找到alist本机存储对应的实际位置,然后让nginx的主机空间指向该地址即可,记得配置好路径和权限

YunchaoZheng avatar May 27 '24 08:05 YunchaoZheng

反代以及本机4

了解,不过我发现alist的下载地址一般是带/d/的(这个是固定的而且是自动加的),例如aaa文件夹下的b.zip文件的实际下载地址是https://baidu.com/d/aaa/b.zip ,而我本身就是用的443端口访问,alist还是5244,所以我只要443端口反代的时候排除/d/就行了,alist不需要任何设置。 例如 nginx-alist.txt

fangfang333 avatar May 27 '24 09:05 fangfang333

Yeah! very cool

YunchaoZheng avatar May 28 '24 05:05 YunchaoZheng

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 11 '24 07:07 stale[bot]

Hello @, this issue was closed due to inactive more than 52 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.

github-actions[bot] avatar Jul 22 '24 00:07 github-actions[bot]