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

文件复制时存在很大的内存占用 #6444

Open
4 tasks done
mcoo opened this issue May 11, 2024 · 5 comments
Open
4 tasks done

文件复制时存在很大的内存占用 #6444

mcoo opened this issue May 11, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mcoo
Copy link

mcoo commented May 11, 2024

Please make sure of the following things

  • I have read the documentation.
    我已经阅读了文档

  • I'm sure there are no duplicate issues or discussions.
    我确定没有重复的issue或讨论。

  • I'm sure it's due to AList and not something else(such as Network ,Dependencies or Operational).
    我确定是AList的问题,而不是其他原因(例如网络依赖操作)。

  • I'm sure this issue is not fixed in the latest version.
    我确定这个问题在最新版本中没有被修复。

AList Version / AList 版本

v3.34.0

Driver used / 使用的存储驱动

ALIST V3

Describe the bug / 问题描述

从本地存储复制一个5GB左右的文件到另一个 ALIST V3 时出现高内存占用
heap.zip

Reproduction / 复现链接

Config / 配置

Logs / 日志

No response

@mcoo mcoo added the bug Something isn't working label May 11, 2024
Copy link

welcome bot commented May 11, 2024

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

@anwen-anyi
Copy link
Member

占用内存是正常的情况,不然如何复制到另一个存储呢。

@mcoo
Copy link
Author

mcoo commented May 12, 2024

是否可以对其进行限制,或者文件流的形式进行上传,以降低大文件对内存的占用?
image
主机的内存被耗尽,然后alist 会重启导致复制任务中断
image
heap_4.zip
重启后任务都没有了,也没有失败的记录
image
当然可以通过docker对内存进行限制,但仍会导致重启。增加 Swap 内存后可以避免。
resty似乎也有讨论 go-resty/resty#309

@pongfcnkl
Copy link

pongfcnkl commented May 12, 2024

同时复制文件数量设置的少一点

@mcoo
Copy link
Author

mcoo commented May 12, 2024

同时复制文件数量设置的少一点

这个和文件数量应该无关,是因为使用的 resty 在请求时会一次性读取全部的文件到内存,导致内存的大量占用所引起的。
目前有一个解决方法,只需要挂载为 webdav 就可以解决这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants