Repository navigation
Low-resource mode: suspend copy trading, schedule ML training, resource view - #57
Merged
yonixnetwork merged 2 commits intoOct 8, 2026
Merged
Conversation
…ce view The 2 GB / 2 vCPU droplet (16 GB database) ran at load 8-12 with 345 MB free and 1.3 GB swap. Keep the trading core reliable on it; nothing is deleted and Solana execution is unchanged. - SYSTEM_RESOURCE_MODE (NORMAL / LOW_RESOURCE / EMERGENCY, default LOW_RESOURCE) and COPY_TRADING_STATUS (ACTIVE / THROTTLED / SUSPENDED, default SUSPENDED), changeable from the dashboard (yonixalpha_core.operating_mode). - Resource level NORMAL / WARNING / CRITICAL from /proc with configurable thresholds (yonixalpha_core.resources); CRITICAL pauses priority-3 work only. - Copy engine: SUSPENDED stops target watching, copy entries, outcomes, wallet profiles and enrichment, and keeps managing open copy positions; THROTTLED watches less often. Step timers start due on the first pass. - ml: training once a day in LOW_RESOURCE and never while CRITICAL (recorded as SKIPPED with the reason); wallet ML pauses with copy trading. Inference is unaffected. - ML Review: review_status CURRENT / STALE / RUNNING / PENDING / FAILED, 202 with no result, automatic refreshes deferred while CRITICAL, explicit Refresh button. - API: GET /system/resources, PUT /system/resource-mode, GET/POST /copy/trading-status (resume refused unless the COPY_* thresholds hold; audited). - UI: Server resources panel on System Health, copy-trading status banner with the resume check, review status lines. - Heartbeats carry CPU seconds; worker DB pools 5 + 10 (API 10 + 10). - Postgres (prod): explicit defaults, effective_cache_size 512MB, no parallel workers, jit off. - db_health: mode, per-service memory / CPU, Redis, Solana pipeline latency. - docs/LOW_RESOURCE_MODE.md: pre-deploy report, changes, PR #56, staged rollout, after-deploy table, 8 GB values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vpuZ1UX4MXz7NCF7wrtDv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vpuZ1UX4MXz7NCF7wrtDv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keeps the trading core reliable on the 2 GB / 2 vCPU droplet. The database is about 16 GB; measured load was 8–12, with 345 MB free and 1.3 GB of swap in use.
This PR deletes no data, keeps the copy-trading code, and does not change Solana execution, risk or position management. Full report:
docs/LOW_RESOURCE_MODE.md.Changes
Modes and status
SYSTEM_RESOURCE_MODE: NORMAL / LOW_RESOURCE / EMERGENCY. The default is LOW_RESOURCE.COPY_TRADING_STATUS: ACTIVE / THROTTLED / SUSPENDED. The default is SUSPENDED..env. The dashboard can change them at runtime; the value is stored inplatform_settings.operating_mode.yonixalpha_core.operating_mode.Resource level
/proc: available memory, load per CPU, and Linux memory pressure (PSI).RESOURCE_*settings.yonixalpha_core.resources.Copy engine
ml service
ML Review
review_statusvalues: CURRENT / STALE / RUNNING / PENDING / FAILED.API
GET /system/resourcesPUT /system/resource-modeGET /copy/trading-statusandPOST /copy/trading-status. Resuming returns 409 unless all fourCOPY_*thresholds hold. Auto-resume is off. Changes are audited.UI
Infrastructure
effective_cache_size=512MB,max_parallel_workers_per_gather=0,jit=off. A deploy restarts Postgres for a few seconds.Measurement
db_healthnow prints the mode, per-service memory and CPU, Redis, and Solana pipeline latency.Tests
Rollout
Staged, as
docs/LOW_RESOURCE_MODE.mdsection 4 describes:Not yet measured on the server: per-process memory/CPU (
docker stats), and the after-deploy figures.🤖 Generated with Claude Code
https://claude.ai/code/session_015vpuZ1UX4MXz7NCF7wrtDv
Generated by Claude Code