RAM: transient peak ~22 GB during login/teleport (steady state 9 GB) #262

Closed
opened 2026-10-03 04:18:36 +00:00 by sky_line · 2 comments
Owner

Baltimare party session (83 avatars, 4K, 5090), ~9 min uptime after login plus two teleports:

  • VmRSS 9.0 GB (RssAnon 8.3 GB), VmHWM 22.3 GB. A transient spike about 13 GB above steady state, freed afterwards.
  • On a 16 GB machine this would swap or get OOM-killed even though steady state fits.

Suspects:

  • The decode burst at login/TP arrival: J2C decodes at full size before scale-down ("scaled-down 25202"; TextureFetchFullData fetches whole assets up to 128 MB). Many concurrent decode threads, each holding raw + decoded buffers.
  • Mesh decode/unzip bursts. The raw-mesh LRU is 256 MB, but the decode table and in-flight copies are outside that budget.
  • Staging / CPU texture copies before residency trims them.
  • Object cache / LLSD parsing of large region caches on arrival.

Plan:

  1. Log RSS (statm) every 250 ms through login and a teleport; add per-subsystem counters for in-flight decode bytes (texture, mesh), staging and CPU tex copies, and correlate.
  2. Cap concurrent in-flight decode bytes (a semaphore by bytes, not count).
  3. Decode at the needed discard level instead of full size then downscale.
  4. Throttle the arrival burst.

Target: peak RSS within ~1.5x of steady state.

Baltimare party session (83 avatars, 4K, 5090), ~9 min uptime after login plus two teleports: - VmRSS 9.0 GB (RssAnon 8.3 GB), **VmHWM 22.3 GB**. A transient spike about 13 GB above steady state, freed afterwards. - On a 16 GB machine this would swap or get OOM-killed even though steady state fits. Suspects: - The decode burst at login/TP arrival: J2C decodes at full size before scale-down ("scaled-down 25202"; TextureFetchFullData fetches whole assets up to 128 MB). Many concurrent decode threads, each holding raw + decoded buffers. - Mesh decode/unzip bursts. The raw-mesh LRU is 256 MB, but the decode table and in-flight copies are outside that budget. - Staging / CPU texture copies before residency trims them. - Object cache / LLSD parsing of large region caches on arrival. Plan: 1. Log RSS (statm) every 250 ms through login and a teleport; add per-subsystem counters for in-flight decode bytes (texture, mesh), staging and CPU tex copies, and correlate. 2. Cap concurrent in-flight decode bytes (a semaphore by bytes, not count). 3. Decode at the needed discard level instead of full size then downscale. 4. Throttle the arrival burst. Target: peak RSS within ~1.5x of steady state.
Author
Owner

Part of #405 (RAM/VRAM management epic).

Part of #405 (RAM/VRAM management epic).
sky_line added this to the Slipstream project 2026-10-06 15:04:14 +00:00
Author
Owner

Verified 2026-10-10: this session's RSS peak (VmHWM 5.9 GB) is within 0.1 GB of steady state (5.8 GB) including login, and the long Zindra flight peaked at ~11 GB against the original 22 GB transient. Closing; reopen with a log if a login / teleport spike returns.

Verified 2026-10-10: this session's RSS peak (VmHWM 5.9 GB) is within 0.1 GB of steady state (5.8 GB) including login, and the long Zindra flight peaked at ~11 GB against the original 22 GB transient. Closing; reopen with a log if a login / teleport spike returns.
sky_line 2026-10-10 04:53:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
sky_line/Slipstream#262
No description provided.