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

ship with low power profile as default to reduce CPU usage #2039

Closed
autonome opened this issue Mar 16, 2022 · 2 comments · Fixed by #2055
Closed

ship with low power profile as default to reduce CPU usage #2039

autonome opened this issue Mar 16, 2022 · 2 comments · Fixed by #2055
Labels
need/triage Needs initial labeling and prioritization

Comments

@autonome
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I consistently see IPFS using ~5-11% CPU while I'm not interacting with it.

Describe the solution you'd like

Ship w/ low power profile as default.

Describe alternatives you've considered

Not running IPFS typically reduces the CPU usage to zero.

Additional context

Apparently humans are not 80% water. It's a myth.

@autonome autonome added the need/triage Needs initial labeling and prioritization label Mar 16, 2022
lidel added a commit that referenced this issue Mar 21, 2022
@lidel
Copy link
Member

lidel commented Mar 21, 2022

The lowpower profile itself does very little:

https://github.com/ipfs/go-ipfs/blob/beaa8fc29b472214283b9aab884ed92f03908d13/config/profile.go#L177-L183

			c.Routing.Type = "dhtclient"
			c.AutoNAT.ServiceMode = AutoNATServiceDisabled
			c.Reprovider.Interval = "0"

			c.Swarm.ConnMgr.LowWater = 20
			c.Swarm.ConnMgr.HighWater = 40
			c.Swarm.ConnMgr.GracePeriod = time.Minute.String()

Peers behind a nat will be dhtclients automatically, and they need autonat for circuit relays and hole punching.

We can't use lowpower profile because it would disable Reprovider which would break data providing local data to the network :)

The only thing we could tweak compared to the current settings is to decrease ConnMgr values – i opened #2055

lidel added a commit that referenced this issue Mar 25, 2022
@lidel
Copy link
Member

lidel commented Mar 28, 2022

@autonome try updating to https://github.com/ipfs/ipfs-desktop/releases/tag/v0.20.4 – it uses lowpower ConnMgr settings (and migrates your config if you already had some high values specified), which should close unused connections faster. Less connections means less bitswap traffic, and that should improve CPU/bandwidth when idle for more than 1m.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@autonome @lidel and others