Sunday, August 14, 2011

MDL: Optimizing XBMC

There are a number of tweaks that I had to make on XBMC to make it work a little better with my setup.

First – since I am using MySQL I had to add some indexes and make a small change to the MySQL server.

By default it appears that MySQL wants to do a reverse DNS lookup to all client connections.  This makes the initial connection very slow, to disable this behavior add the following to my.ini in the [mysqld] section:


The following indexes also improve performance:

use XBMC_video;
ALTER TABLE movie ADD INDEX idMovie(idMovie);
ALTER TABLE movie ADD INDEX idFile(idFile);

Another change that is essential because of the shared MySQL database is the sharing of the thumbnail directory – otherwise the thumbnails will only appear on the XBMC client that discovers the media.  To get around this I created a symbolic link on the Linux box to the shared Thumbnail directory on Windows.

Connecting to Windows shares from Linux has caused me all sorts of issues.  I initially tried mounting shares in fstab, but if the Windows box wasn’t available during Linux boot the shares were unavailable.  I switched to automounter which resolved the issue.

There are some other SAMBA tweaks to improve performance – in theory this was supposed to prevent video from stopping if it was paused or looking at info.  So far it is only partially successful.

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

Finally, ever time I upgrade something in XBMC or a supporting component the autostart fails to actually, you know, autostart XBMC.  To fix this edit the /etc/uxlaunch/uxlaunch file with the correct home directory.

Technorati Tags: ,,