3x-ui/internal
MHSanaei 69ad8b76e1
perf(memory): report real RSS and cut footprint via GOGC + periodic release
The Usage card showed runtime.MemStats.Sys, a never-shrinking high-water mark of reserved address space that also counts memory already returned to the OS, so it overstated real usage (e.g. ~300 MB on an idle 1-client server). Report process RSS instead so the number matches the OS and drops as memory is freed.

Replace the auto GOMEMLIMIT that targeted ~90 percent of total system RAM (a near no-op while the heap sits far below the limit, and a GC-thrash risk on small/shared VPS per go.dev/doc/gc-guide) with: a lower default GOGC (XUI_GOGC, default 75), a periodic debug.FreeOSMemory job (XUI_MEMORY_RELEASE_INTERVAL, default 10m, 0 disables), and a soft limit applied only from an explicit budget (GOMEMLIMIT, XUI_MEMORY_LIMIT, or a real cgroup cap at 90 percent).
2026-06-25 22:16:38 +02:00
..
config feat(panel): surface dev-build version in UI, bot, and CLI 2026-06-25 02:36:41 +02:00
database feat(iplimit): gate IP limit on fail2ban and reset stale limits 2026-06-22 23:15:58 +02:00
eventbus perf: prevent cron job overlap, auto-set GOMEMLIMIT, fix tgbot userStates race 2026-06-22 02:48:58 +02:00
logger refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
mtproto refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
sub fix(sub): recover {{TRAFFIC_USED}} for clients with orphaned traffic rows 2026-06-25 18:18:47 +02:00
tunnelmonitor feat(xray): add tunnel health monitor (#5480) 2026-06-24 22:01:37 +02:00
util perf(memory): report real RSS and cut footprint via GOGC + periodic release 2026-06-25 22:16:38 +02:00
web perf(memory): report real RSS and cut footprint via GOGC + periodic release 2026-06-25 22:16:38 +02:00
xray feat(panel): surface dev-build version in UI, bot, and CLI 2026-06-25 02:36:41 +02:00