-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add low power init profile #4154
Conversation
cc065aa
to
ecf2b6a
Compare
I like this, but perhaps we should hold off on merging until we have a few more options set? If someone inits with this profile, and we later add more things to it, they wont get those benefits. As it stands, i'm not sure if these two options are worth enough to merit their own profile at this point. |
Agreed, having an option to apply profile to the config after it was generated might be an option too, though for a separate PR. |
We should add a lower connection limits here, also when we get this implemented, set the default for this to 'dhtclient' |
This PR actually implements the routing option (under |
docs/config.md
Outdated
- `dht` (default) | ||
- `dhtclient` | ||
- `none` | ||
- `supernode` (deprecated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has now been removed.
@@ -36,6 +36,8 @@ Available profiles: | |||
running IPFS on machines with public IPv4 addresses. | |||
'test' - Reduces external interference of IPFS daemon, this | |||
is useful when using the daemon in test environments. | |||
'lowpower' - Reduces daemon overhead on the system. May affect node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 'laptop'
? Honestly, laptop users should use this (less problems with random WiFis, fewer ephemeral DHT nodes, etc. Alternatively, we could have a separate laptop mode that occasionally reprovides pin roots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the second option, I meant this setting for mobile devices (Android phones, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"May affect node functionality" should be better described to tell what functionality it would affect. Seemingly, it seems to run the dht in client mode and also set really low ConnMgr values, meaning it would probably take longer to find and download content. Would be nice to add that to the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
repo/config/discovery.go
Outdated
@@ -2,6 +2,9 @@ package config | |||
|
|||
type Discovery struct { | |||
MDNS MDNS | |||
|
|||
//Routing sets default daemon routing mode. | |||
Routing string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make Routing
its own top level section, and then give it a Type
field (so we can add other parameters later)
ecf2b6a
to
24be69b
Compare
We should chose some connection limiter settings here. Would something like 75/100 work? Or is it a 'more testing is needed' kind of situation? |
@magik6k I think that with dhtclient mode, even something as low as 20/40 could work well if we set a relatively high grace period (1m or more). |
24be69b
to
a3f1ea5
Compare
a3f1ea5
to
fe41a6d
Compare
Rebased |
This LGTM, weird that so much of CI is angry though... |
76dbecf
to
b1afa87
Compare
Made CI less angry |
The travis OSX backlog is pretty nuts... |
1c090bb
to
0497f57
Compare
0497f57
to
d767a43
Compare
Rebased |
"Nothing works, everything is broken" - by "Someone had to say it at some point" |
d767a43
to
1babd29
Compare
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
1babd29
to
af9b4af
Compare
Fixed |
Thanks @magik6k! Let's start telling people about this one :) |
For context #4137