jefere Riak KV cluster instead of mariadb?
Mariadb is only used to store the mail address, username, password (if no LDAP is used) and some other metadata. The mariadb is therefore important, but not an extremely speed-critical part. It is not worth investing a lot of time to switch to another product. If you are looking for performance, you need to optimize the volume where the SQLite databases are stored.