The bridge is running on this device with OpenWrt firmware. After a week or so the tmp space in RAM with a size of 494 MB fills up completely. This is annoying because it stops other applications from working as they can’t use tmp space anymore.
Every time this happens I restart tor and clean up the tmp space. Turns out that especially cached-descriptors and the diff-cache folder inside /tmp/lib/tor grow very fast. Only two days after a restart cached-descriptors already uses 127.2M and diff-cache 95.6M.
I’ve been lowering MaxMemInQueues without any success. It looks like the tmp space gets full even more quickly. Currently MaxMemInQueues is set to 112 MB which should be more than enough given the tmp space size of 494 MB.
Is MaxMemInQueues the only way to handle this problem or is there a better way?
2 Likes
AFAIK there are two ways of approaching this issue. Tweaking TOR and configuring linux. Feel free to comment if you think you can help with the first, I think the latter offers at least these options:
- Assign a limited tmpfs space to TOR
- Restart TOR regularly
- Delete diff-cache files
Option 1 is easy to implement:
mount -t tmpfs -o size=350M tmpfs /tmp/lib/tor
Pro: TOR doesn’t affect other applications anymore
Con: TOR keeps crashing
Option 2 is probably the easiest to implement and the only one that really solves the issue. The only question is: how frequently?
On option 3, looking at their timestamp the oldest files in /tmp/lib/tor/diff-cache just seem to be lingering around. It looks like TOR just didn’t clean them up. Anyone knows if removing them harms TOR?
1 Like
What about creating a swap file?
1 Like
Good point! Interesting and worth trying.
Thank you 