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

qupload同步大量文件速度极慢 #25

Closed
mercury233 opened this issue Jul 7, 2016 · 8 comments
Closed

qupload同步大量文件速度极慢 #25

mercury233 opened this issue Jul 7, 2016 · 8 comments

Comments

@mercury233
Copy link

版本:qshell v1.8.0 win x64
我有上万个小文件想通过qupload进行同步
但同步时似乎对于每个文件都会尝试上传,与服务器交互,导致速度极慢
之前使用的qrsbox有对本地文件的版本数据进行缓存,仅尝试上传有更新的文件
是我配置方法不当还是qshell没有这个功能?

@jemygraw
Copy link
Contributor

jemygraw commented Jul 9, 2016

同步慢,你要看

  1. 带宽可利用大小
  2. 本地磁盘IO性能

qupload会对已同步的文件进行自动跳过,不会重复同步。

@mercury233
Copy link
Author

问题是看起来每个文件都会向服务器发起一次请求才能知道是版本相同的
能实现一次性把所有文件的hash下载下来进行对比吗

@jemygraw
Copy link
Contributor

你配置文件把ak,sk删除,贴给我看看。

@mercury233
Copy link
Author

{
   "access_key"         :   "",
   "secret_key"         :   "",
   "src_dir"            :   "F:\\Works\\ygopro-client",
   "bucket"             :   "ygo233",
   "key_prefix"         :   "ygopro/",
   "overwrite"          :   true,
   "check_exists"       :   true,
   "check_hash"         :   true,
   "check_size"         :   false,
   "skip_file_prefixes" :   ".gitignore,.qrsignore",
   "skip_path_prefixes" :   ".git,script,deck,replay,single",
   "skip_fixed_strings" :   ".svn",
   "skip_suffixes"      :   ".7z",
   "rescan_local"       :   true,
   "log_file"           :   "ygo233-ygopro.log",
   "log_level"          :   "info"
}

@jemygraw
Copy link
Contributor

 "check_exists"       :   true,
 "check_hash"         :   true,

这两个一般不要设置,你可以设置 check_existstrue,但是 check_hash一般不需要,除非你的网络环境劫持情况非常严重。常规的,最多再设置下chec_sizetrue就好了。

因为check_hash要本地计算文件的hash来和远程空间中的进行对比,所以会很慢。

@mercury233
Copy link
Author

我测试了一下,所有文件和服务器一致,使用check_hash的情况下,是16分钟多完成同步(只有1个文件被上传,其他都是hash一致自动跳过),而使用check_size也是16分钟多,但check_exists设置为false的情况却只需要10分钟

我的文件是8000个20-30kb的图片,8000个3kb左右的图片,共计224MB,以及其他20MB左右的文件
5M的上传带宽,qupload开了10个线程

我希望能一次性比对出需要更新和新增的文件,而不是每个文件向服务器发起一次请求

@jemygraw
Copy link
Contributor

对于同步工具来讲,最佳的使用场景是一次性同步完成所有的文件。它不是一个类似网盘类的应用,它是一个数据同步工具,对于你需要一次性对比出所有需要更新的和新增的文件,这个是无法实现的,对于该同步工具来说,它要支持1w,100w,1000w甚至更多的数量的同步,它不得不采取一些笨方法,比如如果你是新增的情况,那么就是假设你的数据集合很小,否则很难检查出哪些新增,哪些改动。

当然如果你有更好的办法,欢迎提PR。

@mercury233
Copy link
Author

不过qrsbox是有缓存检测本地文件变动的功能的

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

No branches or pull requests

2 participants