docs: add Internal.UnixFSShardingSizeThreshold (#8723)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Adin Schmahmann committed
Feb 18, 2022 at 17:37 UTC
686993f6f28044c67420232e43f925648bd474a2
1 file changed
+23
-1
docs/config.md
+23
-1
@@ -16,6 +16,7 @@ config file at runtime.
16
- [`strings`](#strings)
17
- [`duration`](#duration)
18
- [`optionalInteger`](#optionalinteger)
19
+ - [`optionalBytes`](#optionalbytes)
20
- [`optionalString`](#optionalstring)
21
- [`optionalDuration`](#optionalduration)
22
- [`Addresses`](#addresses)
@@ -67,6 +68,7 @@ config file at runtime.
68
- [`Internal.Bitswap.EngineBlockstoreWorkerCount`](#internalbitswapengineblockstoreworkercount)
69
- [`Internal.Bitswap.EngineTaskWorkerCount`](#internalbitswapenginetaskworkercount)
70
- [`Internal.Bitswap.MaxOutstandingBytesPerPeer`](#internalbitswapmaxoutstandingbytesperpeer)
71
+ - [`Internal.UnixFSShardingSizeThreshold`](#internalunixfsshardingsizethreshold)
72
- [`Ipns`](#ipns)
73
- [`Ipns.RepublishPeriod`](#ipnsrepublishperiod)
74
- [`Ipns.RecordLifetime`](#ipnsrecordlifetime)
@@ -278,6 +280,15 @@ an implicit default when missing from the config file:
280
- `null`/missing will apply the default value defined in go-ipfs sources (`.WithDefault(value)`)
281
- an integer between `-2^63` and `2^63-1` (i.e. `-9223372036854775808` to `9223372036854775807`)
282
283
+### `optionalBytes`
284
+
285
+Optional Bytes allow specifying some number of bytes which has
286
+an implicit default when missing from the config file:
287
+
288
+- `null`/missing (apply the default value defined in go-ipfs sources)
289
+- a string value indicating the number of bytes, including human readable representations:
290
+ - [SI sizes](https://en.wikipedia.org/wiki/Metric_prefix#List_of_SI_prefixes) (metric units, powers of 1000), e.g. `1B`, `2kB`, `3MB`, `4GB`, `5TB`, …)
291
+ - [IEC sizes](https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes) (binary units, powers of 1024), e.g. `1B`, `2KiB`, `3MiB`, `4GiB`, `5TiB`, …)
292
293
### `optionalString`
294
@@ -287,7 +298,6 @@ an implicit default when missing from the config file:
298
- `null`/missing will apply the default value defined in go-ipfs sources (`.WithDefault("value")`)
299
- a string
300
290
-
301
### `optionalDuration`
302
303
Optional durations allow specifying some duration value which has
@@ -940,6 +950,18 @@ deteriorate the quality provided to less aggressively-wanting peers.
950
951
Type: `optionalInteger` (byte count, `null` means default which is 1MB)
952
953
+### `Internal.UnixFSShardingSizeThreshold`
954
+
955
+The sharding threshold used internally to decide whether a UnixFS directory should be sharded or not.
956
+This value is not strictly related to the size of the UnixFS directory block and any increases in
957
+the threshold should come with being careful that block sizes stay under 2MiB in order for them to be
958
+reliably transferable through the networking stack (IPFS peers on the public swarm tend to ignore requests for blocks bigger than 2MiB).
959
+
960
+Decreasing this value to 1B is functionally equivalent to the previous experimental sharding option to
961
+shard all directories.
962
+
963
+Type: `optionalBytes` (`null` means default which is 256KiB)
964
+
965
## `Ipns`
966
967
### `Ipns.RepublishPeriod`