@cryptotaxi247 / kubo / commits / 4ebe7e633

doc: fixup config docs

1. Update go-ipfs-config to fix default datastore. 2. Update TOC. 3. Update profiles list and indicate that badger isn't experimental.

Steven Allen committed Apr 27, 2020 at 15:12 UTC 4ebe7e633d64fb7ca8d77716a10a6593f482646b
3 files changed +64 -28
docs/config.md
+61 -25
@@ -12,50 +12,82 @@ applied with `--profile` flag to `ipfs init` or with the `ipfs config profile
12 apply` command. When a profile is applied a backup of the configuration file
13 will be created in `$IPFS_PATH`.
14
15 -Available profiles:
15 +The available configuration profiles are listed below. You can also find them
16 +documented in `ipfs config profile --help`.
17
18 - `server`
19
19 - Recommended for nodes with public IPv4 address (servers, VPSes, etc.),
20 - disables host and content discovery in local networks.
20 + Disables local host discovery, recommended when
21 + running IPFS on machines with public IPv4 addresses.
22 +
23 +- `randomports`
24 +
25 + Use a random port number for swarm.
26 +
27 +- `default-datatore`
28 +
29 + Configures the node to use the default datastore (flatfs).
30 +
31 + Read the "flatfs" profile description for more information on this datastore.
32 +
33 + This profile may only be applied when first initializing the node.
34
35 - `local-discovery`
36
24 - Sets default values to fields affected by `server` profile, enables
25 - discovery in local networks.
37 + Sets default values to fields affected by the server
38 + profile, enables discovery in local networks.
39
40 - `test`
41
29 - Reduces external interference, useful for running ipfs in test environments.
30 - Note that with these settings node won't be able to talk to the rest of the
31 - network without manual bootstrap.
42 + Reduces external interference of IPFS daemon, this
43 + is useful when using the daemon in test environments.
44
45 - `default-networking`
46
35 - Restores default network settings. Inverse profile of the `test` profile.
47 + Restores default network settings.
48 + Inverse profile of the test profile.
49
37 -- `badgerds`
50 +- `flatfs`
51
39 - Replaces default datastore configuration with experimental badger datastore.
40 - If you apply this profile after `ipfs init`, you will need to convert your
41 - datastore to the new configuration. You can do this using
42 - [ipfs-ds-convert](https://github.com/ipfs/ipfs-ds-convert)
52 + Configures the node to use the flatfs datastore.
53
44 - WARNING: badger datastore is experimental. Make sure to backup your data
45 - frequently.
54 + This is the most battle-tested and reliable datastore, but it's significantly
55 + slower than the badger datastore. You should use this datastore if:
56
47 -- `default-datastore`
57 + - You need a very simple and very reliable datastore you and trust your
58 + filesystem. This datastore stores each block as a separate file in the
59 + underlying filesystem so it's unlikely to loose data unless there's an issue
60 + with the underlying file system.
61 + - You need to run garbage collection on a small (<= 10GiB) datastore. The
62 + default datastore, badger, can leave several gigabytes of data behind when
63 + garbage collecting.
64 + - You're concerned about memory usage. In its default configuration, badger can
65 + use up to several gigabytes of memory.
66
49 - Restores default datastore configuration.
67 + This profile may only be applied when first initializing the node.
68
51 -- `lowpower`
69
53 - Reduces daemon overhead on the system. May affect node functionality,
54 - performance of content discovery and data fetching may be degraded.
70 +- `badgerds`
71 +
72 + Configures the node to use the badger datastore.
73
56 -- `randomports`
74 + This is the fastest datastore. Use this datastore if performance, especially
75 + when adding many gigabytes of files, is critical. However:
76 +
77 + - This datastore will not properly reclaim space when your datastore is
78 + smaller than several gigabytes. If you run IPFS with '--enable-gc' (you have
79 + enabled block-level garbage collection), you plan on storing very little data in
80 + your IPFS node, and disk usage is more critical than performance, consider using
81 + flatfs.
82 + - This datastore uses up to several gigabytes of memory.
83 +
84 + This profile may only be applied when first initializing the node.
85 +
86 +- `lowpower`
87
58 - Generate random port for swarm.
88 + Reduces daemon overhead on the system. May affect node
89 + functionality - performance of content discovery and data
90 + fetching may be degraded.
91
92 ## Table of Contents
93
@@ -67,6 +99,12 @@ Available profiles:
99 - [`Addresses.NoAnnounce`](#addressesnoannounce)
100 - [`API`](#api)
101 - [`API.HTTPHeaders`](#apihttpheaders)
102 +- [`AutoNAT`](#autonat)
103 + - [`AutoNAT.ServiceMode`](#autonatservicemode)
104 + - [`AutoNAT.Throttle`](#autonatthrottle)
105 + - [`AutoNAT.Throttle.GlobalLimit`](#autonatthrottlegloballimit)
106 + - [`AutoNAT.Throttle.PeerLimit`](#autonatthrottlepeerlimit)
107 + - [`AutoNAT.Throttle.Interval`](#autonatthrottleinterval)
108 - [`Bootstrap`](#bootstrap)
109 - [`Datastore`](#datastore)
110 - [`Datastore.StorageMax`](#datastorestoragemax)
@@ -89,7 +127,6 @@ Available profiles:
127 - [`Gateway.Writable`](#gatewaywritable)
128 - [`Gateway.PathPrefixes`](#gatewaypathprefixes)
129 - [`Gateway.PublicGateways`](#gatewaypublicgateways)
92 - - [`Gateway` recipes](#gateway-recipes)
130 - [`Identity`](#identity)
131 - [`Identity.PeerID`](#identitypeerid)
132 - [`Identity.PrivKey`](#identityprivkey)
@@ -111,7 +148,6 @@ Available profiles:
148 - [`Swarm.DisableRelay`](#swarmdisablerelay)
149 - [`Swarm.EnableRelayHop`](#swarmenablerelayhop)
150 - [`Swarm.EnableAutoRelay`](#swarmenableautorelay)
114 - - [`Swarm.EnableAutoNATService`](#swarmenableautonatservice)
151 - [`Swarm.ConnMgr`](#swarmconnmgr)
152 - [`Swarm.ConnMgr.Type`](#swarmconnmgrtype)
153 - [`Swarm.ConnMgr.LowWater`](#swarmconnmgrlowwater)
go.mod
+1 -1
@@ -31,7 +31,7 @@ require (
31 github.com/ipfs/go-ipfs-blockstore v0.1.4
32 github.com/ipfs/go-ipfs-chunker v0.0.5
33 github.com/ipfs/go-ipfs-cmds v0.2.2
34 - github.com/ipfs/go-ipfs-config v0.5.2
34 + github.com/ipfs/go-ipfs-config v0.5.3
35 github.com/ipfs/go-ipfs-ds-help v0.1.1
36 github.com/ipfs/go-ipfs-exchange-interface v0.0.1
37 github.com/ipfs/go-ipfs-exchange-offline v0.0.1
go.sum
+2 -2
@@ -291,8 +291,8 @@ github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7Na
291 github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8=
292 github.com/ipfs/go-ipfs-cmds v0.2.2 h1:F2pro/Q3ifRUsdxEKIS8cg8lO4R6WiwAyERiaG8I9no=
293 github.com/ipfs/go-ipfs-cmds v0.2.2/go.mod h1:kqlUrp6m2ceoaJe40cXpADCi5aS6NKRn0NIeuLp5CeM=
294 -github.com/ipfs/go-ipfs-config v0.5.2 h1:SPWiMNo7IOW0k+meO3PIprggp/PbZGUiO57L7HQ/sOY=
295 -github.com/ipfs/go-ipfs-config v0.5.2/go.mod h1:nSLCFtlaL+2rbl3F+9D4gQZQbT1LjRKx7TJg/IHz6oM=
294 +github.com/ipfs/go-ipfs-config v0.5.3 h1:3GpI/xR9FoJNTjU6YvCMRbYyEi0dBVY5UtlUTcNRlSA=
295 +github.com/ipfs/go-ipfs-config v0.5.3/go.mod h1:nSLCFtlaL+2rbl3F+9D4gQZQbT1LjRKx7TJg/IHz6oM=
296 github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
297 github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ=
298 github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=