MaxMemInCellQueues minimum of 500MB is too large for low-RAM relays (Raspberry Pi)
This is related to #9646 (moved).
Based on discussion in that ticket, I attempted to set my MaxMemInCellQueues to 384MB on my Raspberry Pi relay, which has a hardware maximum of 512MB RAM (and boots with about 485MB usable physical memory when running Raspbian).
This results in the following error:
[warn] MaxMemInCellQueues must be at least 500 MB for now. Ideally, have it as large as you can afford.
Ideally, this setting would be flexible, and allow lower values, possibly calculated as some percentage of total available physical memory (or possibly not, depending on how much time you'd like to spend mucking with it).
If Tor has 500MB in cell queues on a 512MB Raspberry Pi, though, the Pi is already guaranteed to be hitting swap if the out-of-memory killer hasn't already come around to 'fix' things. I took a complete guess at 384MB as a reasonable value for a machine that boots with 485MB free.
Under non-botnet network conditions, a Raspberry Pi can happily sustain at least 2 to 3 Mbps of traffic as a relay, and that's without extensive tuning. I think it's worth the effort to keep these low-cost, low-resource, physically small boxes in mind when working on Tor, as many of them scattered around the world would be a fairly easy accomplishment and might do a lot to beef up the network.
Also, the libgcrypt folks have been working hard in the last 30 days on ARM assembly language implementations of algorithms which Tor uses; if you assume these implementations will eventually cross-pollinate into libraries used by Tor, a Raspberry Pi may one day be able to relay a lot more than 2-3Mbps.