Commit 6ef700c
committed
Optimize S3 parallel download pipeline
Tune the HTTP transport and download parameters based on benchmarking
against CI hosts (m6id.4xlarge, 16 vCPU):
- Configure HTTP transport with connection pooling (MaxIdleConnsPerHost)
and 128KB read/write buffers for better connection reuse across
parallel range workers.
- Default to max(16, NumCPU) download workers with 32MB chunks. This
configuration consistently achieved ~245 MB/s on fast hosts vs ~100
MB/s for single-stream downloads (the per-connection S3 cap).
- Add 8MB bufio buffer between S3 download pipe and pzstd to decouple
network I/O from decompression stalls.
- Log full commit hash on cache hit for easier debugging.1 parent 4fe6ae9 commit 6ef700c
2 files changed
Lines changed: 36 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | | - | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
172 | | - | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
346 | 345 | | |
347 | 346 | | |
348 | 347 | | |
349 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| |||
745 | 747 | | |
746 | 748 | | |
747 | 749 | | |
748 | | - | |
| 750 | + | |
749 | 751 | | |
750 | 752 | | |
751 | 753 | | |
| |||
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
846 | | - | |
| 848 | + | |
847 | 849 | | |
848 | 850 | | |
849 | 851 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
46 | 59 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
50 | 65 | | |
51 | 66 | | |
52 | 67 | | |
| |||
71 | 86 | | |
72 | 87 | | |
73 | 88 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 89 | + | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
| |||
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
92 | | - | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
| |||
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
124 | | - | |
125 | | - | |
| 133 | + | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| |||
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
152 | | - | |
153 | | - | |
| 161 | + | |
| 162 | + | |
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
| |||
0 commit comments