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

本文涉及的产品
对象存储 OSS,OSS 加速器 50 GB 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快速上手——如何使用ossbrowser
本实验是对象存储OSS入门级实验。通过本实验,用户可学会如何用对象OSS的插件,进行简单的数据存、查、删等操作。
目录
相关文章
|
存储 人工智能 开发工具
AI助理化繁为简,速取代码参数——使用python SDK 处理OSS存储的图片
只需要通过向AI助理提问的方式输入您的需求,即可瞬间获得核心流程代码及参数,缩短学习路径、提升开发效率。
1782 5
AI助理化繁为简,速取代码参数——使用python SDK 处理OSS存储的图片
|
11月前
|
存储 消息中间件 Kafka
AutoMQ x OSS 的 Iceberg 数据入湖的最佳实践
在数据湖技术生态中,Apache Iceberg凭借其开放性设计已确立事实标准地位。该技术不仅获得全球企业广泛采用,还构建了包含Apache Spark、Amazon Athena、Presto等主流计算引擎的完整生态系统。
|
12月前
|
存储 Shell 对象存储
对象存储使用ossutil进行删除存储桶操作
本教程介绍如何使用阿里云控制台的Cloud shell执行操作,通过wget下载ossutil工具,解压并进入工具目录,使用通用命令进行OSS存储桶删除操作。具体步骤包括下载、解压、进入目录和执行删除命令。参考文档:&lt;https://help.aliyun.com/zh/oss/developer-reference/rm&gt;。
483 1
|
负载均衡 Java 对象存储
负载均衡策略:Spring Cloud与Netflix OSS的最佳实践
负载均衡策略:Spring Cloud与Netflix OSS的最佳实践
290 2
|
存储 JSON 自然语言处理
OSS数据源一站式RAG最佳实践
本文介绍了如何使用OpenSearch LLM智能问答版通过OSS数据源一站式构建RAG系统。
7619 11
|
文字识别 算法 API
视觉智能开放平台产品使用合集之在调用接口传入的图片URL参数,文件在本地或者非上海地域OSS链接,该怎么办
视觉智能开放平台是指提供一系列基于视觉识别技术的API和服务的平台,这些服务通常包括图像识别、人脸识别、物体检测、文字识别、场景理解等。企业或开发者可以通过调用这些API,快速将视觉智能功能集成到自己的应用或服务中,而无需从零开始研发相关算法和技术。以下是一些常见的视觉智能开放平台产品及其应用场景的概览。
189 0
|
存储 运维 监控
运维编排最佳实践:将运维编排任务执行记录投递到OSS/SLS
运维编排服务(Operation Orchestration Service),简称OOS,是全面、免费的云上自动化运维平台,提供运维任务的管理和执行。典型使用场景包括:事件驱动运维,批量操作运维,定时运维任务,跨地域运维等,OOS为重要运维场景提供审批,通知等功能。OOS帮您实现标准化运维任务,从...
运维编排最佳实践:将运维编排任务执行记录投递到OSS/SLS
|
存储 分布式计算 监控
操作审计最佳实践:将阿里云操作日志持续投递到您的 SLS/OSS
操作审计(ActionTrail)帮助您监控并记录阿里云账号的活动,包括通过阿里云控制台、OpenAPI、开发者工具对云上产品和服务的访问和使用行为,记录为操作日志。 操作审计支持所有阿里云账号的免开通服务,默认为所有账号记录并存储近 90 天的日志。但在实际应用中,受法律法规和企业审计标准的要求,...
1297 0
|
对象存储
【最佳实践】OSS开源工具ossutil-上传性能调优
经常碰到内部同学或者外部客户问ossutil关于并发上传性能的问题。本文简单描述下ossutil并发上传原理并举例说明。 用户可从这里获取ossutil。 官网:https://help.aliyun.com/document_detail/50452.html代码:https://github.com/aliyun/ossutil 参数 --recursive 上传文件到oss时,如果file_url为目录,则必须指定--recursive选项,否则无需指定--recursive选项。
9442 0

相关产品

  • 对象存储