Kodi Community Forum

Full Version: sqlite for multi room installation ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello there,

I am having speed issues with my multiple XBMC machines setup (two Win7 and one XBMCBuntu PC) when using a centralised mysql database. The mysql database is on a quad-core 3.2 ghz win7 pc with gigabit lan. A single installation with a local sqlite database is 10 times faster. With mysql it sometimes takes 5-10 seconds, depending on the connection to show the movie list, even on the local quad-core!

So I was wondering if it wasn't possible to use the thin sqlite database as a multi room setup. Maybe with symlinks from the other machines to the database on the server pc?

Has anyone tried this? Does it even work and is it really faster?
It could be due to the hard drive in your server spinning down when not in use. Maybe try an SSD, or else set it to spin 24/7 (that's not good for the hdd though).
my nas is running 24/7 and the quad-core win 7 hosting the mysql server also. i also tried all those mysql tweaking hints with just a slight performance improvement. any thoughts on sqlite?
sqlite doesn't like multiple users. If you only used one XBMC install at a time (full stop) then it would be okay, but at that point you could just share the DB files directly.

Also, if you are sharing thumbnails using the MySQL (wiki) wiki guide then that can cause slow-downs as well.
I have now tried sqlite as multi room setup with the userdata/database folder shared via symlink on a network share and it fails to work with more than one client. so no recommendation for this.

on the other hand when using a mysql database it is very fast when using a local thumbnails cache and not sharing the thumbnails cache on a network drive as I did before. does anyone have a good way to synchronize the thumbnails folder between xbmcbuntu and windows 7 maybe by using some kind of synching tool?
(2012-04-26, 10:07)iceman1000 Wrote: [ -> ]does anyone have a good way to synchronize the thumbnails folder between xbmcbuntu and windows 7 maybe by using some kind of synching tool?

I use a simple BATCH script on my windows server that syncs ALL files across my machines. It is designed so that any changes I make to images on 1 machine are reflected to other machines. Additionally, if I create playlists or add new media paths these are reflected to other machines with a central data store on my server which everything syncs too.

It makes each machine completely independent but still synched. The only real issue is the amount of useless thumbs XBMC generates and the fact the thumb cache gets pretty big (6GB last I checked for mine) so it can take the script a long time to check each machine for new thumbs. This results in a new show added to my server requiring 15 minutes or so to have thumbs loaded to each HTPC machine. The more that are online in my home, the longer it takes to check each one.

Whole system works well though and reliable. Would be happy to post my script which should be easy to adapt from simple batch.
(2012-04-25, 10:01)iceman1000 Wrote: [ -> ]Hello there,

I am having speed issues with my multiple XBMC machines setup (two Win7 and one XBMCBuntu PC) when using a centralised mysql database. The mysql database is on a quad-core 3.2 ghz win7 pc with gigabit lan. A single installation with a local sqlite database is 10 times faster. With mysql it sometimes takes 5-10 seconds, depending on the connection to show the movie list, even on the local quad-core!

So I was wondering if it wasn't possible to use the thin sqlite database as a multi room setup. Maybe with symlinks from the other machines to the database on the server pc?

Has anyone tried this? Does it even work and is it really faster?

I had all sorts of speed problems with my centralized mysql db until I figured out how to add 'skip-name-resolve' to mysql ini file (was a bit tricky since I am running it on a Synology NAS) - instantly faster after I did this.

XBMC wiki also recommends making sure you're using the IP address and not the hostname for referring to your mysql server from advancedsettings.xml (though this had negligible impact for me).
Thank you guys for your quick replies!

@krease: I already tried all those mysql speed hints (ip, caching etc) - gave me only a slightly faster installation.

the problem is the thumbs being on the server/nas. Just the mysql database with local thumbs speeds up xbmc movie-menu 10 times !

@phsyraxion: I am trying with rsync and unison but I'm not done with it yet - quite difficult for me to use it with linux and windows. I would really love to see your batch script, maybe it would work for me too. Would you post it?
I wouldn't mind seeing the script you wrote, either. No sense reinventing the wheel.