kubo icon indicating copy to clipboard operation
kubo copied to clipboard

Improve resource manager UX

Open lidel opened this issue 3 years ago • 0 comments

Swarm.ResourceMgr was added in https://github.com/ipfs/go-ipfs/pull/8680 as part of https://github.com/ipfs/go-ipfs/issues/8761 epic, but there are some paper cuts around it which we need to address, ideally before shipping it enabled by default.

  • [ ] user should get a clear feedback when a resource manager limit is hit with a guide how to adjust the limit
    • right now all resource manager logs are WARN or DEBUG, and default in go-ipfs is to log ERROR
      • this means user is not informed that resource manager started impacting performance, and may see either a degrade performance, or some random errors, without clear cause
      • to see resource manager tracing one needs to run daemon with LIBP2P_DEBUG_RCMGR
    • proposed fix:
      • detect when resource manager limits are hit (either by aggregating log warnings, or by tracking counters returned by ipfs swarm stats all) and print ERROR message informing user which specific limits were reached, and inform (inline or link) how to debug/adjust them.
      • For a starting point, see https://github.com/ipfs/go-ipfs/commit/cb72776dec434500bf657543f06f734ffb305e67
  • [ ] User should be able to use CLI to quickly see which limits are hit or close to being hit (above % of utilization)
    • problem; ipfs swarm stats all works, but ipfs swarm limit all returns Error: invalid scope "all' making it hard to compare set limits vs current stats – user needs to manually check each scope (dozens of calls)
    • proposed solution: add optional parameter to ipfs swarm stats to only show scopes above certain utilization %.
      • we need this so user can adjust all 'close calls', not just the one that failed at the specific time
      • example: ipfs swarm stats all --min-used-limit-perc 85 will only show scopes which have values between 85 and 100 % of set limit.
  • [ ] User should be able to use CLI remove custom limit and restore default
    • already tracked in https://github.com/ipfs/go-ipfs/issues/8918

lidel avatar May 31 '22 17:05 lidel