Skip to content
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

Resource Manager: Remove ResourceMgr.Limits configuration from Kubo and use the default libp2p JSON file for it #9603

Closed
Tracked by #9650
ajnavarro opened this issue Jan 30, 2023 · 3 comments · Fixed by #9680
Labels
topic/resource-manager Issues related to Swarm.ResourceMgr (resource manager)

Comments

@ajnavarro
Copy link
Member

ajnavarro commented Jan 30, 2023

Resource Manager config is really useful when you want to configure every aspect of your kubo node, but it is very complex for the average user.

We should remove .Limits field from our configuration, only allowing us to change MaxMemory and MaxFileDescriptors as configurable parameters for RM.

If some experienced user wants to modify any RM low-level parameter, they can still do it by creating a limits.json file near by kubo config that will be read using default libp2p functions:

https://github.com/libp2p/go-libp2p/blob/97607949208fc95bea759eeaa88db3ad2c86bf38/p2p/host/resource-manager/limit.go#L59

We also need to make a decision on how we handle legacy Swarm.ResourceMgr.Limits configuration.

@ajnavarro ajnavarro changed the title Remove ResourceMgr.Limits configuration from Kubo and use the default libp2p JSON file for it Resource Manager: Remove ResourceMgr.Limits configuration from Kubo and use the default libp2p JSON file for it Jan 30, 2023
@ajnavarro ajnavarro self-assigned this Jan 30, 2023
@markg85

This comment was marked as resolved.

@BigLep
Copy link
Contributor

BigLep commented Feb 16, 2023

On the topic of Swarm.ResourceMgr.Limits configuration, my initial vote is that we don't migrate it and use this as an opportunity to have users reset and figure out what they actually need.

@lidel
Copy link
Member

lidel commented Feb 16, 2023

+1 – no migration, most users won't have custom Swarm.ResourceMgr.Limits.

If someone set custom limits, we should error after update to new Kubo, asking them to remove Swarm.ResourceMgr.Limits from config, and try defaults (and if the need custom limits, link to go-libp2p docs around limits.json)

Prior art (Fatal will log error end shut down the daemon) :

log.Fatal("Private network does not work with Routing.Type=auto. Update your config to Routing.Type=dht (or none, and do manual peering)")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/resource-manager Issues related to Swarm.ResourceMgr (resource manager)
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants