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

本地持久化缓存 #7269

Open
4 tasks done
linch0318 opened this issue Sep 26, 2024 · 5 comments
Open
4 tasks done

本地持久化缓存 #7269

linch0318 opened this issue Sep 26, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@linch0318
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,已购桌面版。
原来把数据放在网盘上,本地通过挂载方式访问很流畅。
后来各家网盘由于各种原因限制了qps,导致体验大幅下降。
我用的是eagle来管理图片和视频,这个软件的特点是每个文件生成对应元数据和缩略图,以及单独的文件夹。
在限制qps前这种组织方式没有遇到明显问题,限制qps之后,加载元数据和缩略图非常缓慢,切换文件夹需要等几十秒甚至几分钟。批量修改分类将同时修改上千个文件,在本地固态硬盘上是秒完成的,换成网盘,需要十几分钟。
现在固态硬盘很快,何不利用固态硬盘,甚至内存来为网盘缓存加速呢?
建议针对特定目录,可以本地持久化缓存目录信息,这样无需多次请求文件列表。
对元数据,按扩展名和文件大小来缓存到本地,占用空间不大,对访问性能的提升是巨大的。这一步我已尝试可行,就是卡在程序不支持软链接。所以需要让挂载软件来实现缓存。
这个实现起来估计要写不少代码,如果能够实现,将减少对网盘的访问压力,同时极大改善应用的使用性能

Suggested solution / 实现思路

1、指定目录的文件列表元数据永久化缓存

①清除缓存
②手动更新缓存
③闲时自动刷新缓存

2、指定目录下的特定文件扩展名、特定大小范围的文件缓存(比如缓存.nfo文件,小于1kb的文件)

①清除缓存
②手动更新缓存
③闲时自动刷新缓存

3、更改回写

①文件或目录有改动加入修改队列,同步到网盘
②手动回写

4、缓存加载到内存,极致提升性能

今年很多笔记本标配32G内存了,拿一百兆出来加速网盘,或者拿个几GB,用来换取体验提升,还是划得来的。

Additional context / 附件

No response

@linch0318 linch0318 added the enhancement New feature or request label Sep 26, 2024
Copy link

welcome bot commented Sep 26, 2024

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

@pongfcnkl
Copy link

rclone的vfs-cache-mode改成full

@linch0318
Copy link
Author

rclone的vfs-cache-mode改成full

感谢推荐,试了rclone的VFS缓存并不能缓解问题,如果只针对指定大小文件进行缓存,会导致大文件无法访问。
有什么办法可以使 --max-size选项仅在VFS下生效吗

@pongfcnkl
Copy link

rclone的vfs-cache-mode改成full

感谢推荐,试了rclone的VFS缓存并不能缓解问题,如果只针对指定大小文件进行缓存,会导致大文件无法访问。 有什么办法可以使 --max-size选项仅在VFS下生效吗

buffer-size设置的大一点

@linch0318
Copy link
Author

手动缓存了小文件,利用rclone挂载小文件,限制500K以下,利用rclone挂载网盘,限制500K以上,然后负载均衡,可以解决问题,就是过程太繁琐。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants