【最佳实践】OSS开源工具ossutil-调节并发参数[英文版]

本文涉及的产品
对象存储 OSS,20GB 3个月
对象存储 OSS,恶意文件检测 1000次 1年
对象存储 OSS,内容安全 1000次 1年
简介: 前言 前面支持一个国外客户,使用ossutil上传文件到OSS,一直调整不好--jobs和--parallel参数。因此给客户写了一篇简单的英文文档。 用户可从这里获取ossutil。 官网: https://help.

前言

前面支持一个国外客户,使用ossutil上传文件到OSS,一直调整不好--jobs和--parallel参数。因此给客户写了一篇简单的英文文档。

用户可从这里获取ossutil。

Concurrency Control

--jobs or --parallel

--jobs controls the amount of concurrency tasks between multi-files.
--parallel controls the amount of concurrency tasks within a file.
  • By default, ossutil will calculate the parallel num according to file size, if file size > 100MB.
  • So --parallel is useless to small file.
  • The file size to use multipart upload can be specified by --bigfile-threshold, the default value is 100MB (104857600).
  • Therefore when batch upload/download/copy files, the total concurrency tasks num

     ```concurrency = jobs * parallel```
  • The two option can be specified by user, if the performance of default setting is poor, user can adjust the two options.

Note:

  • If parallel and jobs are too big, because of the switching between threads, the performance of upload/download/copy may decline, so please set the options according to your machine condition.
  • If need performance tuning, user can set the two options to small numbers at first and increase them step by step.
  • If parallel and jobs are too big, in case of limited machine resources, error "EOF" may occur due to the network transfer too slow, in this situation, please reduce the --jobs and --parallel num.

Best Practice

1. For single small file

e.g., test1.log,

  • file-size = 50MB
  • And user expect to upload in MPU (MultiPart Upload)

Then need to specify --bigfile-threshold less than 50MB, such as, 20MB (20971520),

ossutil cp test1.log oss://<bucket_name> --bigfile-threshold=20971520

Then, ossutil will upload test1.log in MPU.

2. For single big file

e.g., test2.log,

  • file-size = 150MB
  • And user expect to upload in MPU

Then no need to specify --bigfile-threshold because file-size is more than the default value (100MB).

ossutil cp test2.log oss://<bucket_name>

Then, ossutil will upload test2.log in MPU.

3. For multi files

Of course, --bigfile-threshold will affect each file for this case.

3.1 If --jobs and parallel not specified

e.g.,
ossutil cp <local_dir> oss://<bucket_name>

Then concurrency will be calculated automatically, and

  • If ossutil version <= 1.4.0
    max parallel is 15. By default jobs = 5, so
    max concurrency = 75
  • If ossutil version = 1.4.1
    max parallel is 12. By default jobs = 3, so
    max concurrency = 36

3.2 If --jobs and parallel specified

e.g.,
ossutil cp <local_dir> oss://<bucket_name> --jobs=3 --parallel=8

Then,
concurrency = jobs * parallel = 24

相关实践学习
借助OSS搭建在线教育视频课程分享网站
本教程介绍如何基于云服务器ECS和对象存储OSS,搭建一个在线教育视频课程分享网站。
目录
相关文章
|
8月前
|
存储 弹性计算 安全
对象存储OSS快速上手——ossutil工具管理OSS
本实验是对象存储OSS进阶实验。通过本实验,用户可学会如何使用ossutil工具在Linux环境下用命令管理oss,完成文件上传下载等操作。
1276 0
|
26天前
|
安全 Go 开发工具
对象存储OSS产品常见问题之go语言SDK client 和 bucket 并发安全如何解决
对象存储OSS是基于互联网的数据存储服务模式,让用户可以安全、可靠地存储大量非结构化数据,如图片、音频、视频、文档等任意类型文件,并通过简单的基于HTTP/HTTPS协议的RESTful API接口进行访问和管理。本帖梳理了用户在实际使用中可能遇到的各种常见问题,涵盖了基础操作、性能优化、安全设置、费用管理、数据备份与恢复、跨区域同步、API接口调用等多个方面。
48 9
|
1月前
|
存储 Cloud Native Serverless
云原生最佳实践系列 7:基于 OSS Object FC 实现非结构化文件实时处理
阿里云OSS对象存储方案利用函数计算FC,在不同终端请求时实时处理OSS中的原图,减少衍生图存储,降低成本。
|
11月前
|
SQL 存储 监控
通过sdk查看oss投递(新版)延迟情况最佳实践
在投递任务中,日志服务会将运行日志写入到给定的logstore中,因而可以使用SDK来查看投递任务的当前状态,并进行批量查询,以了解多个Project和投递任务的状态。下面以查看oss投递的延迟为例,介绍客户提供操作步骤和常见的使用场景,以帮助客户更加方便地监控和管理投递任务。
通过sdk查看oss投递(新版)延迟情况最佳实践
|
Linux 对象存储 数据安全/隐私保护
OSS图形化管理工具使用
OSS图形化管理工具使用
561 0
OSS图形化管理工具使用
|
存储 数据采集 运维
Alibaba Cloud Lens for OSS最佳实践
——其冀 阿里云智能产品专家
Alibaba Cloud Lens for OSS最佳实践
|
对象存储 Python
Python文件上传Minio和阿里Oss工具 | Python工具
Python文件上传Minio和阿里Oss工具 | Python工具
|
Linux Go 对象存储
ossutil迁移日志文件至阿里云OSS
ossutil支持在Windows、Linux、macOS等系统中运行,您可以根据实际环境下载和安装合适的版本。
559 0
|
SQL 分布式计算 关系型数据库
Hive 数仓迁移 JindoFS/OSS 数据湖最佳实践
Hive 数仓是大多数迁移客户都会遇到的场景。在迁移过程中,不建议同时在新集群进行业务升级(比如从 Hive on MR 迁移到 Hive on Tez 或 Spark SQL等),这些业务升级可以在迁移完成后进行。1. 元数据同步Hive 元数据是对于 Hive 表来说非常关键,除了表结构信息,里面还记录着 Hive 表与底层文件系统的关联关系,许多上层服务都依赖 Hive 元数据提供服务。a.
579 0
|
Web App开发 XML Shell
【最佳实践】OSS开源工具ossutil-大文件断点续传
# OSS断点续传 ## 应用场景 当调用OSS的PutObject来上传较大的文件时,如果上传过程中出现错误,比如网络错误,那么此次上传失败。重试时必须从文件起始位置上传。 针对这种情况,OSS提供了分片上传(Multipart Upload)来达到断点续传的效果。
12558 0

相关产品

  • 对象存储