xref: /curl/docs/PARALLEL-TRANSFERS.md (revision 86d33001)
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7# Parallel transfers
8
9curl 7.66.0 introduced support for doing multiple transfers simultaneously; in
10parallel.
11
12## -Z, --parallel
13
14When this command line option is used, curl performs the transfers given to it
15at the same time. It does up to `--parallel-max` concurrent transfers, with a
16default value of 50.
17
18## Progress meter
19
20The progress meter that is displayed when doing parallel transfers is
21completely different than the regular one used for each single transfer.
22
23  It shows:
24
25 o percent download (if known, which means *all* transfers need to have a
26   known size)
27 o percent upload (if known, with the same caveat as for download)
28 o total amount of downloaded data
29 o total amount of uploaded data
30 o number of transfers to perform
31 o number of concurrent transfers being transferred right now
32 o number of transfers queued up waiting to start
33 o total time all transfers are expected to take (if sizes are known)
34 o current time the transfers have spent so far
35 o estimated time left (if sizes are known)
36 o current transfer speed (the faster of upload/download speeds measured over
37   the last few seconds)
38
39Example:
40
41    DL% UL%  Dled  Uled  Xfers  Live   Qd Total     Current  Left    Speed
42    72  --  37.9G     0   101    30    23  0:00:55  0:00:34  0:00:22 2752M
43
44## Behavior differences
45
46Connections are shared fine between different easy handles, but the
47"authentication contexts" are not. For example doing HTTP Digest auth with one
48handle for a particular transfer and then continue on with another handle that
49reuses the same connection, the second handle cannot send the necessary
50Authorization header at once since the context is only kept in the original
51easy handle.
52
53To fix this, the authorization state could be made possible to share with the
54share API as well, as a context per origin + path (realm?) basically.
55
56Visible in test 153, 1412 and more.
57