Skip to content

Adaptative concurrency improvements - fair sharing expectation #930

Description

@coyotte508

While implementing adaptative concurrency on huggingface.js (huggingface/huggingface.js#2350), fable 5 pointed out potential avenues for improvement in xet-core:

Ours is much simpler (throughput-delta AIMD), which fits a JS lib; but two findings may be useful upstream for xet-core:

  1. No byte/memory budget: xet-core's controller is purely permit-count based. With v2 entries up to a whole xorb (~64MB compressed) and up to 64 permits, worst-case buffered memory is unbounded by anything except the permit count. Deriving a byte budget from the reconstruction (entry sizes are known upfront) would give a hard memory envelope — particularly relevant for hf_xet on small machines.
  2. Zero-error saturation: xet-core's model treats linear RTT growth with concurrency as expected fair sharing (x_eff = size × N), so on a capped link it plateaus via the 60s target-RTT ceiling rather than detecting that aggregate goodput stopped improving. Our US-VPS data shows fixed high concurrency actively hurts on such links while all requests succeed. A cheap aggregate-goodput probe ("did the last +1 increase total throughput?") could let it settle lower, reducing both client contention and server connection load.

Especially 2. - fair sharing expectation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions