Skip to content

Commit

Permalink
docs: add Internal.UnixFSShardingSizeThreshold (#8723)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Rataj <lidel@lidel.org>
  • Loading branch information
aschmahmann and lidel authored Feb 18, 2022
1 parent bfa9d3d commit 686993f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ config file at runtime.
- [`strings`](#strings)
- [`duration`](#duration)
- [`optionalInteger`](#optionalinteger)
- [`optionalBytes`](#optionalbytes)
- [`optionalString`](#optionalstring)
- [`optionalDuration`](#optionalduration)
- [`Addresses`](#addresses)
Expand Down Expand Up @@ -67,6 +68,7 @@ config file at runtime.
- [`Internal.Bitswap.EngineBlockstoreWorkerCount`](#internalbitswapengineblockstoreworkercount)
- [`Internal.Bitswap.EngineTaskWorkerCount`](#internalbitswapenginetaskworkercount)
- [`Internal.Bitswap.MaxOutstandingBytesPerPeer`](#internalbitswapmaxoutstandingbytesperpeer)
- [`Internal.UnixFSShardingSizeThreshold`](#internalunixfsshardingsizethreshold)
- [`Ipns`](#ipns)
- [`Ipns.RepublishPeriod`](#ipnsrepublishperiod)
- [`Ipns.RecordLifetime`](#ipnsrecordlifetime)
Expand Down Expand Up @@ -278,6 +280,15 @@ an implicit default when missing from the config file:
- `null`/missing will apply the default value defined in go-ipfs sources (`.WithDefault(value)`)
- an integer between `-2^63` and `2^63-1` (i.e. `-9223372036854775808` to `9223372036854775807`)

### `optionalBytes`

Optional Bytes allow specifying some number of bytes which has
an implicit default when missing from the config file:

- `null`/missing (apply the default value defined in go-ipfs sources)
- a string value indicating the number of bytes, including human readable representations:
- [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`, …)
- [IEC sizes](https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes) (binary units, powers of 1024), e.g. `1B`, `2KiB`, `3MiB`, `4GiB`, `5TiB`, …)

### `optionalString`

Expand All @@ -287,7 +298,6 @@ an implicit default when missing from the config file:
- `null`/missing will apply the default value defined in go-ipfs sources (`.WithDefault("value")`)
- a string


### `optionalDuration`

Optional durations allow specifying some duration value which has
Expand Down Expand Up @@ -940,6 +950,18 @@ deteriorate the quality provided to less aggressively-wanting peers.

Type: `optionalInteger` (byte count, `null` means default which is 1MB)

### `Internal.UnixFSShardingSizeThreshold`

The sharding threshold used internally to decide whether a UnixFS directory should be sharded or not.
This value is not strictly related to the size of the UnixFS directory block and any increases in
the threshold should come with being careful that block sizes stay under 2MiB in order for them to be
reliably transferable through the networking stack (IPFS peers on the public swarm tend to ignore requests for blocks bigger than 2MiB).

Decreasing this value to 1B is functionally equivalent to the previous experimental sharding option to
shard all directories.

Type: `optionalBytes` (`null` means default which is 256KiB)

## `Ipns`

### `Ipns.RepublishPeriod`
Expand Down

0 comments on commit 686993f

Please sign in to comment.