amazon-web-services - How to speed up the copy in S3 bucket?
问题描述
I have a bucket bucket_a
and trying to copy the content of this bucket into another bucket bucket_b
but it is taking huge time to copy the objects from a folder folder_a
of bucket bucket_a
to folder_a
of bucket bucket_b
as there are nearly 9k objects in each folder with size 600MB each and I have 20 folders like that.
I tried accelerate option of bucket and used cp
command of aws cli and it looks like it will take another 2-3 days to copy the contents.
解决方案
加速这种传输的一种方法是确保您用于传输的角色被允许读取源存储桶并写入目标存储桶。正确设置角色和存储桶策略后,您可以防止数据在 AWS 服务器之外遍历。这样可以加快传输时间并节省您自己的数据使用量。
请参阅:https ://aws.amazon.com/premiumsupport/knowledge-center/copy-s3-objects-account/和https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles .html
加快传输速度的另一种方法是调整复制过程中使用的一些设置。您可以指定块大小、可以同时进行传输的线程数以及其他设置。请参阅:https ://docs.aws.amazon.com/cli/latest/topic/s3-config.html
您可能希望至少使用 4-10 max_concurrent_requests
(线程数),并multipart_chunksize
根据可用内存和允许的并发请求数从默认值增加到某个值。
我发现 aws cli 工具基本上能够消耗你所有的 CPU 和内存,所以你需要小心你如何设置它。
推荐阅读
- spring - Sprint 启动错误无法获取条目 BOOT-INF/lib/lucene-analyzers-common-7.1.0.jar 的嵌套存档
- vba - 为什么我无法使用 excel VBA 更新 Listbox 的 RowSource 属性?
- javascript - 在JS函数中传递css文件的路径
- java - 无法从单个图像opencv(Java)保存多个图像
- python - Python程序需要更新版本的libX11
- php - 简单的 HTML DOM Parser 通过网站登录抓取数据
- php - cakephp中webroot文件夹的URL重定向
- java - Kotlin ClassNotFoundException:com.android.org.conscrypt.OpenSSLRSAPublicKey
- vifm - Vifm 启动:如何让 vifm 记住启动时的最后一个光标/选择器位置?
- javascript - 如何将位置星号从右到左角材料2更改?