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

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

Closed
4 tasks done
fangfang333 opened this issue Apr 7, 2024 · 9 comments
Closed
4 tasks done

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

fangfang333 opened this issue Apr 7, 2024 · 9 comments
Labels
enhancement New feature or request stale No activity for more than 30 days

Comments

@fangfang333
Copy link

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure this feature is not implemented.
  • 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 fangfang333 added the enhancement New feature or request label Apr 7, 2024
Copy link

welcome bot commented Apr 7, 2024

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

Copy link

stale bot commented May 21, 2024

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 stale bot added the stale No activity for more than 30 days label May 21, 2024
@YunchaoZheng
Copy link

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

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

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

@stale stale bot removed the stale No activity for more than 30 days label May 26, 2024
@fangfang333
Copy link
Author

fangfang333 commented May 26, 2024

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

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

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

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

@YunchaoZheng
Copy link

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

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

@fangfang333
Copy link
Author

fangfang333 commented May 27, 2024

反代以及本机4

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

@YunchaoZheng
Copy link

Yeah! very cool

Copy link

stale bot commented Jul 11, 2024

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 stale bot added the stale No activity for more than 30 days label Jul 11, 2024
Copy link

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 github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale No activity for more than 30 days
Projects
None yet
Development

No branches or pull requests

2 participants