Skip to content

prefs: raise default SlotAllocation from 2 kB/s to 10 kB/s - #898

Merged
mrjimenez merged 1 commit into
amule-project:masterfrom
got3nks:fix/slot-allocation-default-10
Jun 7, 2026
Merged

prefs: raise default SlotAllocation from 2 kB/s to 10 kB/s#898
mrjimenez merged 1 commit into
amule-project:masterfrom
got3nks:fix/slot-allocation-default-10

Conversation

@got3nks

@got3nks got3nks commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #896.

The persisted default for SlotAllocation is 2 kB/s (Preferences.cpp:1063); the UI spin-control default in the wxWidgets resource is 4 (muuli_wdr.cpp:1336). Both are stale: they were sensible defaults in the dial-up / early-ADSL era and have not tracked broadband growth.

SlotAllocation is the target kB/s per upload slot. CUploadQueue::GetMaxSlots() at UploadQueue.cpp:304 divides the configured upload cap by it (slots = round(MaxUpload / SlotAllocation)), bottom-clamps to MIN_UP_CLIENTS_ALLOWED = 2, and top-clamps to MAX_UP_CLIENTS_ALLOWED = 250. With the current default of 2, the 250 ceiling kicks in starting at ~500 kB/s of configured upload — i.e. anything around 4 Mbps and up. Above the ceiling, the per-slot target is no longer honoured (each peer ends up with MaxUpload / 250 instead of SlotAllocation kB/s) and the connection is fragmented into hundreds of tiny TCP sessions with diluted credit per peer.

Raising the default to 10 kB/s avoids the 250 cap up through typical fiber (~20 Mbps configured upload), keeps slot counts healthy on slow lines (50 kB/s → 5 slots instead of 25), and stays well above the historical per-eD2k-peer ~2.4 kB/s floor so each slot still completes 180 KB blocks at a steady pace.

Also aligns the wxSpinCtrl initial value (which was 4) with the persisted default — the two defaults were already inconsistent on master.

This only affects fresh installs: existing users keep whatever value is in their ~/.aMule/amule.conf. No migration, no silent mutation of user settings.

Tested: macOS local build (Apple Silicon, Homebrew) — clean.

The persisted default for SlotAllocation is 2 kB/s, set when dial-up
and early ADSL were the assumed broadband baseline. The UI spin-
control on the same setting defaults to 4, so the two have been
inconsistent. Both are stale on any modern uplink.

SlotAllocation is the target kB/s per upload slot, divided into the
configured MaxUpload by CUploadQueue::GetMaxSlots (UploadQueue.cpp:
304) to yield the slot count. Result is bottom-clamped to
MIN_UP_CLIENTS_ALLOWED=2 and top-clamped to MAX_UP_CLIENTS_ALLOWED=
250. With the current default of 2, the 250 ceiling kicks in at
~500 kB/s of configured upload (around 4 Mbps), above which the
per-slot target is no longer honoured -- each peer ends up with
MaxUpload/250 instead of SlotAllocation kB/s -- and the connection
is fragmented into hundreds of tiny TCP sessions with diluted
credit per peer.

Raising the default to 10 keeps the slot count below the 250 cap up
through ~20 Mbps configured upload, keeps slot counts healthy on
slow lines (50 kB/s -> 5 slots instead of 25), and stays well above
the historical per-eD2k-peer ~2.4 kB/s floor.

Align the UI default to the same value so the two sites no longer
disagree on what a fresh install means.

Existing user prefs are untouched -- only fresh installs (no
SlotAllocation entry in amule.conf) get the new value.

Fixes amule-project#896.
@mrjimenez
mrjimenez merged commit 7466b15 into amule-project:master Jun 7, 2026
7 checks passed
got3nks added a commit to got3nks/amule that referenced this pull request Jun 7, 2026
…ule-project#912)

Extends existing categories (preferring extensions over new lines):
- Performance/Upload: amule-project#898 SlotAllocation default raised.
- Networking & Discovery: wire-parser hardening list extended with
  amule-project#879/amule-project#882/amule-project#890/amule-project#886; new amuleweb security hardening bullet
  consolidating ngosang's amule-project#869-amule-project#874 triage (all landed in amule-project#875);
  amulegui list extended with amule-project#857; shared-folder watcher extended
  with amule-project#858.
- Packaging: Windows installer i18n line extended with amule-project#899.
- Internals & Refactoring: new docs-polish + code-quality bullets
  covering amule-project#851/amule-project#855/amule-project#862/amule-project#888/amule-project#900/amule-project#866/amule-project#867/amule-project#895 and amule-project#909/amule-project#910/amule-project#912.
- Translations: new pre-release final-wave bullet covering amule-project#847/amule-project#856/
  amule-project#891/amule-project#908/amule-project#860/amule-project#904/amule-project#859/amule-project#863/amule-project#861/amule-project#880/amule-project#911/amule-project#901/amule-project#902/amule-project#889/amule-project#868/amule-project#853.
- Bug Fixes & Stability: amule-project#850/amule-project#854/amule-project#878/amule-project#906.
- CI: ccache wiring (amule-project#892, amule-project#903) + CodeQL binutils-dev (amule-project#907).

Contributors footer gains mifritscher and nguyenhoangminhhieu2004-gif
(both first-time contributors).

PR index extended through amule-project#912.
mrjimenez pushed a commit that referenced this pull request Jun 8, 2026
Extends existing categories (preferring extensions over new lines):
- Performance/Upload: #898 SlotAllocation default raised.
- Networking & Discovery: wire-parser hardening list extended with
  #879/#882/#890/#886; new amuleweb security hardening bullet
  consolidating ngosang's #869-#874 triage (all landed in #875);
  amulegui list extended with #857; shared-folder watcher extended
  with #858.
- Packaging: Windows installer i18n line extended with #899.
- Internals & Refactoring: new docs-polish + code-quality bullets
  covering #851/#855/#862/#888/#900/#866/#867/#895 and #909/#910/#912.
- Translations: new pre-release final-wave bullet covering #847/#856/
  #891/#908/#860/#904/#859/#863/#861/#880/#911/#901/#902/#889/#868/#853.
- Bug Fixes & Stability: #850/#854/#878/#906.
- CI: ccache wiring (#892, #903) + CodeQL binutils-dev (#907).

Contributors footer gains mifritscher and nguyenhoangminhhieu2004-gif
(both first-time contributors).

PR index extended through #912.
@got3nks
got3nks deleted the fix/slot-allocation-default-10 branch June 8, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default "Slot Allocation" value (2 kB/s) is outdated for modern connections

2 participants