| Transferring Files with the Application | |
The Aspera transfer server products Enterprise Server and Connect Server can achieve significant performance improvements by using multi-session transfers (also known as parallel transfers and multi-part transfers) on multi-node and multi-core systems.
To enable multi-session transfers, run ascp with the option -C nid:ncount, where nid is the node ID and ncount is the number of nodes or cores. Assign each session (or invocation) its own UDP port.
You can also specify that individual files may be split between multiple sessions by specifying the companion option --multi-session-threshold=threshold. The threshold value specifies, in bytes, the smallest-size file that can be split. That is, files greater than or equal to the threshold will be split, while those smaller than the threshold will not.
A default value for the threshold can be specified in the aspera.conf file by setting <multi-session_threshold_default> in the <default> section. Setting it to 0 (zero) indicates that files should not be split. The command-line setting overrides the aspera.conf setting. If the client's aspera.conf does not specify a default value for the threshold, then the default is taken from the server's aspera.conf (if specified).
If neither --multi-session-threshold nor <multi-session_threshold_default> is specified, then no files are split.
The following example shows a multi-session transfer on a dual-core system, which together can transfer at up to 200 Mbps. Each command uses a different UDP port, and each is run from a different terminal window. No multi-session threshold is specified either on the command line or in aspera.conf; therefore no file splitting occurs.
ascp -C 1:2 -O 33001 -l 100m /dir01 10.0.0.2:/remote_dir ascp -C 2:2 -O 33002 -l 100m /dir01 10.0.0.2:/remote_dir
Assuming there are multiple files in dir01, ascp will distribute the files between each command to get the most efficient throughput. If there is only one file in dir01, only one of the commands will actually transfer the file.
In the following example, the multi-session threshold is added to the command line from the example above. This enables file splitting and specifies the threshold size, which is the minimum-size file that can be split.
ascp -C 1:2 -O 33001 -l 100m --multi-session-threshold=5242880 /dir01 10.0.0.2:/remote_dir ascp -C 2:2 -O 33002 -l 100m --multi-session-threshold=5242880 /dir01 10.0.0.2:/remote_dir
In this case, if there are multiple files in dir01, all files less than 5 MB will be distributed between each command, while all files 5 MB or greater will be split to further achieve a level distribution. If there is only one file in dir01, it will be split if it's 5 MB or larger, otherwise the entire file will be transferred by only one of the commands.
For transfers to cloud storage, the process of splitting files in multi-session transfers differs from regular (non-cloud) multi-session transfers. For cloud transfers, files are sent in chunks, and the chunk size is specified by <chunk_size> in aspera.conf:
<default>
. . .
<transfer>
<protocol_options>
<chunk_size>size_in_bytes</chunk_size>
</protocol_options>
</transfer>
</default>
For cloud storage, file-splitting needs to respect a minimum split size, which for cloud storage is a part. Part size must be set to the same value as the ascp chunk size. That is, each ascp call needs to deliver full parts. However, a file that would normally be split (due to being larger than the multi-session threshold) will not be split if it is smaller than the chunk/part size. Set chunk size and part size as follows:
<chunk_size>67108864</chunk_size> <!-- 64 MB -->
aspera.transfer.upload.part-size=64MB aspera.transfer.gathering-policy=ONE_TO_ONE
The following example uploads an 80 GB file into AWS S3 by means of a multi-session transfer to an Aspera Transfer Cluster. The setup for this example consists of one 10 Gbps system and a 20-node Aspera Transfer Cluster (ATC).
Configuring the Aspera Transfer Cluster
<default>
<transfer>
<protocol_options>
<chunk_size>67108864</chunk_size>
</protocol_options>
</transfer>
</default>
To show the cluster's transfer configuration, select the cluster (in this case jmoore-se-demo-cluster) and click the Action button and select Edit Transfer Configuration:



Configuring the Aspera Client Transfer System
Configure Aspera Enterprise Server or Connect Server as in the following example aspera.conf file:
<?xml version='1.0' encoding='UTF-8'?>
<CONF version="2">
<default>
<file_system>
<access>
<paths>
<path>
<restrictions>
<restriction>*</restriction>
</restrictions>
</path>
</paths>
</access>
</file_system>
<transfer>
<multi_session_threshold_default>100000000</multi_session_threshold_default>
</transfer>
</default>
<aaa/>
<server>
<server_name>66.211.105.165</server_name>
<activity_logging>true</activity_logging>
<db_type>redis</db_type>
<db_port>36024</db_port>
</server>
</CONF>
{
"transfer": {
"remote_host": "jmoore-se-demo-cluster.dev.asperacloud.net",
"remote_user": "xfer",
"token": "Basic QVVrZ3VobUNsdjBsdjNoYXAxWnk6dXI0VGZXNW5rNldBVW1zSm5FRzFVZWFvUXFTRUtLd3JmanhvNEZIQnFZT2U=",
"target_rate_kbps": 700000,
"destination_root":"/",
"multipart": 75,
"paths": [
{
"source": "/80g-file"
}
],
"ssh_port": 33001,
"fasp_port": 33001,
"direction": "send",
"overwrite" : "always",
"cookie": "multi-session upload"
}
}
curl -k -v -X POST -d @ms-send-80g.json https://ak_data:aspera@localhost:9092/transfers
nload -u g -o 10000000 ens1f0The nload report below shows bandwidth utilization at 9+ Gbps:

In the ATCM UI, selecting Monitor Nodes from the Action drop-down menu shows the transfer distribution and utilization for each of the 20 nodes in the cluster:
