Multiple mumble servers, single process

Mon, 4 Apr 2016 (tags:linux, performance)

I was using this trick for years, but I had to get back to and couldn't remember how exactly it was done, so making it a blog entry will keep my memory fresh.

I had to run multiple mumble servers, with different settings for different people. I didn't want to waste multiple processes on it because I was in believe that my server should be on the lean side. And there is a way, instead of starting multiple instances with different config files and different processes you can start virtual mumble servers in a single process and each will have its own thread (and threads are more lightweight than processes).

It can be done in runtime with python library called mice and this is how it's used:

import mice
mice.m.getAllServers()
 
#mice.m.newServer()
 
s1 = mice.m.getServer(1)
s1.stop()
s1.setConf('registername','regular')
s1.setConf('port',        'XYZ'    )
s1.setConf('password',    'XYZ'    )
s1.start()
 
s2 = mice.m.getServer(2)
s2.stop()
s2.setConf('registername','family')
s2.setConf('port',        'XYZ'   )
s2.setConf('password',    'XYZ'   )
s2.start()
 
s3 = mice.m.getServer(3)
s3.stop()
s3.setConf('registername','vip')
s3.setConf('port',        'XYZ')
s3.setConf('password',    'XYZ')
s3.start()
 
The mice required the mumble server ice protocol description, that needed to be placed in /usr/share/slice/Murmur.ice (it differs between server versions) and can be found for example here.