High load Twonky Media-Server
Posted in Technical on January 31st, 2012 by iyoung – Be the first to commentHad some strange issues with my Western Digital mybook live lately, load going up like crazy all down to Twonky media server, often it will sit at 95% cpu usage.
Incase anyone else is having the same issue just thought I would run through how I got it sorted. Firstly you need to enable SSH access I think I mentioned it earlier on this blog, if you search it, or if not Google that part.
I then disabled Twonky, by running: -
/etc/init.d/twonky stop
Then moved the twonky startup script out of init.d and into root’s home, so it would no longer start on reboot.
Then I installed a more efficient but to be fair less attractive looking media server called mediatomb, using the following command: -
apt-get update && apt-get install mediatomb
Once it’s installed you need to tweak it’s config particularly if you have a PS3 you want to stream to. In this section of the config I changed the ui to be on, enabled an account and changed the port (had to add the port).
<server>
<ui enabled="yes" show-tooltips="yes">
<accounts enabled="yes" session-timeout="30">
<account user="userblah" password="passblah"/>
</accounts>
</ui>
<port>50000</port>
The next important thing to change is the following, add caching=”no” to the storage element: -
<storage caching="no">
<sqlite3 enabled="yes">
<database-file>mediatomb.db</database-file>
</sqlite3>
<mysql enabled="no">
<host>localhost</host>
<username>mediatomb</username>
<database>mediatomb</database>
</mysql>
</storage>
I then searched through the file for all mention of PS3 and uncommented the lines that needed to be uncommented such as:
<protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->
And
<!-- Uncomment the line below for PS3 divx support --> <map from="avi" to="video/divx"/>
Once you have done all that then you need to restart mediatomb as it will have started after you installed it. Do that by running the following: -
/etc/init.d/mediatomb restart
Now you can encourage mediatomb to pick up your data and start indexing it all. Open a browser and point it at the IP of your WD mybook live box, and use a :50000 if that is the port you are running mediatomb on, you will get an interface like this, once logged in using the username and password from the config.xml earlier: -

Mediatomb
The difference will be that you will have just one directory in the database part. So move to the file system and locate your media directory. On the right of the screen is a + icon with a arrow around it, click that to add the directory to be watched. If unsure set it to periodic checking, full initial scan and set the time to say 60 seconds.
In around 60 seconds it will kick in and start indexing all your files, once it’s complete you should be up and running and you should see all your content in that database view.