-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running on router: memory allocation of 327660 bytes failed #1679
Comments
327660 is 319KB. So your system couldn't even allocate 300KB more memory. You could check with any tools, like top or ps, to monitor how many
|
I ran I'm currently using https://github.com/go-gost/gost/ with a tun interface with good results (e.g. no memory issues), but it is much slower than shadowsocks overall. |
Well, I don't think it would help, theoretically. Jemalloc is superior to libc's default memory allocator only when threads >12, which normally wouldn't happen in resource limited system, like routers. You may also try to lower shadowsocks-rust/crates/shadowsocks-service/src/local/tun/tcp.rs Lines 46 to 47 in 15ed4a8
|
Thanks for the tip. The tunnel lasts much longer with that adjustment, but I ultimately end up with |
For speedtests, packets may be piled up in these two channels:
You may try to modify it to a bounded channel to limit the total pending packets in memory. |
I am trying to run this on a router, and while it works, it only works for a very short period of time. Shortly after I set it as the default route, I get the following message before it aborts:
memory allocation of 327660 bytes failed
.This is a Linksys EA6900 router with 255MB of memory. Do you have any thoughts/suggestions on how I can overcome this issue? I am also currently bypassing Shadowsocks for my DNS resolvers to avoid overwhelming it with UDP requests.
For reference, this is how I am invoking it:
The text was updated successfully, but these errors were encountered: