Operating System: Debian 12 (system footprint around 70M); Alpine has been tried too, not much better
Hardware Configuration: 1 vCPU / 384MB RAM
Server-side Application: V2bX (VLESS + Reality)
2. Problem Description (The Issue)
When under high concurrency or heavy traffic during speed tests, once the speed reaches around 500 Mbps, the V2bX process is OOM-killed by the system (status 9/KILL).
Speedtest is the only thing that triggers it; 8k and cloud drive downloads are fine.
Core contradiction:
Tried reducing the buffer to 4 MB, but it still OOM-killed. Very odd.
3. Troubleshooting
A. Go Runtime Environment Tuning
Configured environment variables in the systemd service file to suppress Go’s memory scaling (garbage collector growth).
Result: It still OOM-killed.
B. Bandwidth Limiting Attempt
Tried limiting to 100 Mbps, but speedtest kills the v2bx process
C. Kernel Buffer Adjustment
Tried modifying net.ipv4.tcp_rmem and tcp_wmem to around 4 MB; not much effect.
Later observed that speedtest uses a lot of concurrent TCP packets, reaching 250+, not sure if that’s the issue (single-threaded runs won’t crash, but speeds are only around 30). In practice it’s fine, not going to worry about it.
What swap are you using for this LXC? Is it using the host’s swap?
Whatever shows up inside the container isn’t surprising.
With 384 MB of RAM and 128 MB, SS2022 used as an exit for other machines can still run at high speed.
What is that on their end—an E3 or some other weird thing?
Would this 384 MB crash just from a speed test?
Not sure what’s going on, but swap can be enabled on a Ryzen 9950X—the CPU isn’t under much load, and the memory ran out (OOM). Still, SS overhead should be lower than VLESS Reality, right?
Then I don’t have any tricks left; turning swap on is indeed useless.
Try Alpine + 3xui and see. My previous 256 MB deployment ran this fast for a long time without any issues.
Curious how you configured swap. I remember LXC can’t configure swap inside the container itself, right? I guess you didn’t actually enable it.
With such a small amount of memory, if you don’t need edge nodes, it’s better not to use V2bX; its memory footprint isn’t small, you can just roll your own configuration.
That still seems too large. I saw you mentioned latency of 300ms earlier; this parameter should be determined based on RTT and target bandwidth by calculating the bandwidth-delay product. Moreover, your system and V2bX itself probably take up a fair amount of memory; try setting it below 16MB, preferably starting with 8MB; if it stays stable, then gradually adjust upward, for example:
If the node is only for your own use and the number of concurrent connections isn’t large, you can go a bit higher, but it’s not recommended to exceed 16MB."}
Sorry, man. I spent the morning tweaking things and still couldn’t get it right; had AI generate a Markdown file, and it’s full of errors. I set the parameter to over 4m; even with a 100m limit it still runs out of memory (speedtest always crashes, but uploading 8k and downloading from the cloud drive nothing happens—don’t know what’s going on).
Running Speedtest will indeed spike the number of concurrent connections, and 384MB of memory is not suitable for high-concurrency load testing. You can see whether a single-threaded speed test can meet your needs, and set a reasonable value to use for now.
Still, I would recommend against using a panel on such a low-memory machine, especially since V2board’s memory usage isn’t low; running bare-metal plus a hand-tuned configuration can free up a large portion of memory.
Later I checked and it looks like vendor-provided swap, but the speedtest process dies too quickly—if you don’t need it, it crashes. But in real use it’s fine; I’m not going to bother with it anymore.