Commit 8d174fa
committed
libraries/doltcore/remotestorage: Improve connection reuse when fetching chunks from remote storage.
Improves performance of fetches from DoltHub, sql-server, and doltlab.
Improves some situations where routers and network access points do not respond
well to clients which open a great number of connections to the same TCP
endpoint, many of which live for a very short period of time.
http.DefaultClient comes with a default MaxIdleConnsPerHost of 2. Fetching with
a high number of concurrent downloads results in many connections not being
reused efficiently because they cannot get back into the idle pool because it
is so small. Here we increase the MaxIdleConnsPerHost to be large enough so
that our active connections during a fetch will fit within it.
Note: S3 limits a single HTTP connection to 100 requests, after which it is
closed server-side. So currently dolt can still require a large number of new
connections over the course of a pull, and the rate at which they are opened
will depend on a number of factors including available throughput, round trip
time resolving storage locations, etc. But this change will always be a big
improvement over the old behavior.1 parent 530b577 commit 8d174fa
File tree
2 files changed
+47
-6
lines changed- go/libraries/doltcore
- env
- remotestorage
2 files changed
+47
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
36 | 57 | | |
37 | 58 | | |
38 | 59 | | |
| |||
66 | 87 | | |
67 | 88 | | |
68 | 89 | | |
69 | | - | |
| 90 | + | |
70 | 91 | | |
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
75 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
76 | 100 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 101 | + | |
81 | 102 | | |
82 | 103 | | |
83 | 104 | | |
| |||
109 | 130 | | |
110 | 131 | | |
111 | 132 | | |
| 133 | + | |
112 | 134 | | |
113 | 135 | | |
114 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
53 | 72 | | |
54 | 73 | | |
55 | 74 | | |
| |||
0 commit comments