Skip to content

Out of memory (OOM) on openwrt low ram routers #465

@salvatorebattiato

Description

@salvatorebattiato

Describe the bug

I'm trying to move from a sing-box vless over ws configuration to wstunnel, since it's a simpler yet effective solution for my case. I have a Xiaomi AX3000T router wired to a firewalled network with a real bw of 700MBit/s and connecting to my vps with 4000Mbit/s real bw via cloudflare cdn. The inbound for the wstunnel is tproxy. The program goes out of memory in load intensive situations (like speedtests and parallel downloads), right after around 128MB ram usage.

To Reproduce

Run the client in an env with low ram

Expected behavior

Sing-box is able to provide a consistent 200MBit/s speedtests with plain ws to my vps (privacy is not my concern, since all my traffic is already tls encrypted) using around 32MB memory while wstunnel pushes to 360+ Mbit/s before crashing at 130+ MB memory usage. The router has no swap memory capability, since there's no usb available. I'm pretty sure that sing-box go websocket implementation is worse than rust fastwebsockets in terms of performance, but for some reason the backpressure in the ws implementation is not driven by any memory usage constraint.

Your wstunnel setup

Paste your logs of wstunnel, started with --log-lvl=DEBUG, and with the command line used

-- the logs look clean and the tunnel works as intended. The kernel takes over and kills the program --

Desktop (please complete the following information):

  • OS: openWRT linux
  • Version 24.10.2

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions