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

本文涉及的产品
对象存储 OSS,20GB 3个月
云备份 Cloud Backup,100GB 3个月
对象存储 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,搭建一个在线教育视频课程分享网站。
目录
相关文章
|
存储 弹性计算 安全
对象存储OSS快速上手——ossutil工具管理OSS
本实验是对象存储OSS进阶实验。通过本实验,用户可学会如何使用ossutil工具在Linux环境下用命令管理oss,完成文件上传下载等操作。
2453 0
|
3月前
|
运维 Java Serverless
Serverless 应用引擎产品使用合集之是否提供工具来给OSS配置HTTPS证书
阿里云Serverless 应用引擎(SAE)提供了完整的微服务应用生命周期管理能力,包括应用部署、服务治理、开发运维、资源管理等功能,并通过扩展功能支持多环境管理、API Gateway、事件驱动等高级应用场景,帮助企业快速构建、部署、运维和扩展微服务架构,实现Serverless化的应用部署与运维模式。以下是对SAE产品使用合集的概述,包括应用管理、服务治理、开发运维、资源管理等方面。
|
3月前
|
文字识别 算法 API
视觉智能开放平台产品使用合集之在调用接口传入的图片URL参数,文件在本地或者非上海地域OSS链接,该怎么办
视觉智能开放平台是指提供一系列基于视觉识别技术的API和服务的平台,这些服务通常包括图像识别、人脸识别、物体检测、文字识别、场景理解等。企业或开发者可以通过调用这些API,快速将视觉智能功能集成到自己的应用或服务中,而无需从零开始研发相关算法和技术。以下是一些常见的视觉智能开放平台产品及其应用场景的概览。
|
4月前
|
安全 Go 开发工具
对象存储OSS产品常见问题之go语言SDK client 和 bucket 并发安全如何解决
对象存储OSS是基于互联网的数据存储服务模式,让用户可以安全、可靠地存储大量非结构化数据,如图片、音频、视频、文档等任意类型文件,并通过简单的基于HTTP/HTTPS协议的RESTful API接口进行访问和管理。本帖梳理了用户在实际使用中可能遇到的各种常见问题,涵盖了基础操作、性能优化、安全设置、费用管理、数据备份与恢复、跨区域同步、API接口调用等多个方面。
110 9
|
对象存储
阿里云OSS的图片参数m_lfit是干什么的?底层原理是什么?
阿里云OSS的图片参数m_lfit是干什么的?底层原理是什么?
1121 0
|
Linux 对象存储 数据安全/隐私保护
OSS图形化管理工具使用
OSS图形化管理工具使用
618 0
OSS图形化管理工具使用
|
对象存储 Python
Python文件上传Minio和阿里Oss工具 | Python工具
Python文件上传Minio和阿里Oss工具 | Python工具
|
网络协议 专有云 对象存储
OSS 工具之 OSSBrower
浅谈 ossbrower,图形版的操作工具,有控制台的基本功能,可以理解是 ossutil 工具的图形版,适用于一些非技术人员来操作 oss ,但是性能上并不如 ossutil 那么给力。 使用须知 ossbrower 支持断点续传,以及一键暂停和一键恢复; ossbrower 最大支持文件大小.
OSS 工具之 OSSBrower
|
Java Shell 数据处理
kubernetes部署OSS跨账号复制工具ossimport
生产环境的OSS上有很多数据需要同步到开发环境(帐号不同),每次使用复制很麻烦而且还占用流量。在serverless kubernetes上部署一个pod版的ossimport,实现内网增量复制。
589 0
|
JavaScript 网络协议 Shell
【OSS 排查方案-2】CDN+OSS 基础排查工具
工具说明: CDN+OSS 的服务架构。 目的:当用户遇到 CDN + OSS 投诉问题后,可以先用此工具测试一下基本的测试指标,初步判断问题故障点,同时可以将脚本结果粘贴给阿里云客服更快定位信息。 使用方法:sh check_cdn_oss.sh 域名 请求URL OSS公网域名 Usge: check_cdn_oss.sh www.zhangyb.mobi http://www.zhangyb.mobi/index.html youkou.oss-cn-beijing.aliyuncs.com 如有需求,可提改进意见,工具会继续完善,谢谢。

相关产品

  • 对象存储