freenet-core icon indicating copy to clipboard operation
freenet-core copied to clipboard

Peer resource usage balancing

Open sanity opened this issue 4 years ago • 2 comments

  • Peers track CPU and bandwidth usage, attributing it either to the peer's user, or to other peers
    • eg. Peer A sends request to peer B, peer B keeps track of all CPU/bw usage as a result of this request and attributes it to peer A
  • This includes "downstream" resource usage, anything this peer asks other peers to do
  • This means that every response to a request must include an accounting of downstream resources used to answer the request
  • A peer has a user-configurable maximum CPU and upstream/downstream usage limit
  • Peers can request that other peers throttle requests by requiring a minimum time between requests
    • Another peer that violates this request will be disconnected
  • A peer maintains a global minimum request interval, which is determined using an isotonic regression to avoid exceeding the user-configurable CPU/bw limits

Related

  • While this mechanism tracks and managed resource usage per-peer, #244 describes a parallel mechanism that tracks and manages resource usage per-contract

sanity avatar Sep 17 '21 19:09 sanity

@sanity if you want leave any details in this issue about the conversation we had last week regarding automatically optimizing for max value (where we would define value as per some sort of processing rate - processing cost) so they don't get lost.

iduartgomez avatar May 13 '22 00:05 iduartgomez

Relevant if we need fine-grained tracking of memory allocations: https://www.reddit.com/r/rust/comments/jfliht/how_to_detect_memory_allocations/g9l2ex4/

sanity avatar Aug 19 '22 04:08 sanity

Pivotal Tracker story: https://www.pivotaltracker.com/story/show/184207088

github-actions[bot] avatar Jan 11 '23 16:01 github-actions[bot]