---
title: "Object Storage Swift - Optimised method for uploading files to Object Storage"
url: https://docs.ovhcloud.com/en/guides/storage-and-backup/object-storage/pcs-optimised-method-for-uploading-files-to-object-storage
lang: en
lastUpdated: 2021-10-27
---
# Object Storage Swift - Optimised method for uploading files to Object Storage

## Objective

When you want to upload large files to Object Storage (including videos or disk images for example), you can use the Swift OpenStack client in order to optimise the file transfer by breaking down the files.

**This guide explains how you can use this feature to upload your files to Object Storage more quickly.**

## Prerequisites

- [Prepare the environment to use the OpenStack API](/en/guides/public-cloud/cross-functional/compute-prepare-openstack-api-environment.md) with the python-swiftclient client
- [Setting OpenStack environment variables](/en/guides/public-cloud/cross-functional/compute-set-openstack-environment-variables.md)

## Instructions

Swift OpenStack lets you store files of any size by breaking them down into several segments.

When a Swift client is used to upload a file, the Swift proxy server determines the correct storage node responsible for the data (based on a hash of the object name).
Therefore, it is highly likely that the segments will be stored in several storage nodes, which means you can write your data at a higher speed.

As a result you can upload a 10 GB file in 100 X 100 MB segments:

```bash
root@server:~$ swift upload --segment-size 104857600 --segment-threads 100
container_name 10Gio.dat
```

| Argument          | Description           |
| ----------------- | --------------------- |
| --segment-size    | Segment size in bytes |
| --segment-threads | Number of segments    |

You can measure the upload speed using iftop.

## Go further

If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](https://www.ovhcloud.com/en-gb/professional-services/) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.

Join our [community of users](https://community.ovhcloud.com/).
 
