Re:Erlang/OTP by Example
by ilovecaching on Sunday October 21, 2018 @02:01AM
(#18266919)
- One big issue is that when there is a replication stream going between peers it will bottleneck how many fragments can be updated.
- Large tables make restarts really slow (have to read everything from ETS).
- Table dumps cause spikes in load.
- Uses a lot of RAM.
For net partitions, I just alert on it and fix it manually. Mnesia isn't bad as a cache, bad as a database.
a) Not sure if it changed, but mnesia startup was very brain damaged -- fixing up the local data from disc, then throwing it all away to load from peers is a lot of wasted time. It's much faster to remove all the local tables on disk before starting the node so it short circuits to copying from the peers. Even when it's faster, sending over half a terrabyte of data takes a while. Some sort of persistent transaction logs for peers would be nice.
b) network partitions aren't fun at all
c) we direct mnesia read and write for a key into a specific process to enforce serialization, and then we use dirty read/writes; so we skip all the locking.
d) we've certainly patched a lot of things in transaction sending and receiving over long distances, especially needed if your network isn't clean.
Anyway, thanks for your thoughts all over this thread.