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

简介: 前言 前面支持一个国外客户,使用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助理提问的方式输入您的需求,即可瞬间获得核心流程代码及参数,缩短学习路径、提升开发效率。
1951 5
AI助理化繁为简,速取代码参数——使用python SDK 处理OSS存储的图片
|
存储 消息中间件 Kafka
AutoMQ x OSS 的 Iceberg 数据入湖的最佳实践
在数据湖技术生态中,Apache Iceberg凭借其开放性设计已确立事实标准地位。该技术不仅获得全球企业广泛采用,还构建了包含Apache Spark、Amazon Athena、Presto等主流计算引擎的完整生态系统。
|
监控 Java 对象存储
监控与追踪:如何利用Spring Cloud Sleuth和Netflix OSS工具进行微服务调试
监控与追踪:如何利用Spring Cloud Sleuth和Netflix OSS工具进行微服务调试
333 1
|
负载均衡 Java 对象存储
负载均衡策略:Spring Cloud与Netflix OSS的最佳实践
负载均衡策略:Spring Cloud与Netflix OSS的最佳实践
385 2
|
存储 JSON 自然语言处理
OSS数据源一站式RAG最佳实践
本文介绍了如何使用OpenSearch LLM智能问答版通过OSS数据源一站式构建RAG系统。
7760 11
|
运维 Java Serverless
Serverless 应用引擎产品使用合集之是否提供工具来给OSS配置HTTPS证书
阿里云Serverless 应用引擎(SAE)提供了完整的微服务应用生命周期管理能力,包括应用部署、服务治理、开发运维、资源管理等功能,并通过扩展功能支持多环境管理、API Gateway、事件驱动等高级应用场景,帮助企业快速构建、部署、运维和扩展微服务架构,实现Serverless化的应用部署与运维模式。以下是对SAE产品使用合集的概述,包括应用管理、服务治理、开发运维、资源管理等方面。
|
文字识别 算法 API
视觉智能开放平台产品使用合集之在调用接口传入的图片URL参数,文件在本地或者非上海地域OSS链接,该怎么办
视觉智能开放平台是指提供一系列基于视觉识别技术的API和服务的平台,这些服务通常包括图像识别、人脸识别、物体检测、文字识别、场景理解等。企业或开发者可以通过调用这些API,快速将视觉智能功能集成到自己的应用或服务中,而无需从零开始研发相关算法和技术。以下是一些常见的视觉智能开放平台产品及其应用场景的概览。
270 0
|
存储 运维 监控
运维编排最佳实践:将运维编排任务执行记录投递到OSS/SLS
运维编排服务(Operation Orchestration Service),简称OOS,是全面、免费的云上自动化运维平台,提供运维任务的管理和执行。典型使用场景包括:事件驱动运维,批量操作运维,定时运维任务,跨地域运维等,OOS为重要运维场景提供审批,通知等功能。OOS帮您实现标准化运维任务,从...
运维编排最佳实践:将运维编排任务执行记录投递到OSS/SLS
|
10月前
|
存储 人工智能 Cloud Native
阿里云渠道商:OSS与传统存储系统的差异在哪里?
本文对比传统存储与云原生对象存储OSS的架构差异,涵盖性能、成本、扩展性等方面。OSS凭借高持久性、弹性扩容及与云服务深度集成,成为大数据与AI时代的优选方案。

相关产品

  • 对象存储