xbmc on Atv2 is extremely slow after configuring MySQL

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jpcolin Offline
Member
Posts: 64
Joined: Aug 2011
Reputation: 0
Post: #1
Hi,

I tried configure my ATV2 to use mysql DB, the problem it is so slow now it is not usable anymore.
Before it worked perfect, menu were fast enough, but now it takes ages to navigate...

i followed the wiki instructions.
here is my advancedsettings:

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.15</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.1.15</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>


<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>smb://192.168.1.15/share/videos/Thumbs/</to>
</substitute>
</pathsubstitution>

<gui>
<algorithmdirtyregions>3</algorithmdirtyregions>
<nofliptimeout>0</nofliptimeout>
</gui>


</advancedsettings>

I have a synology nas and followed these instructions also:
http://quixventure.com/2011/12/configure...-for-xbmc/

I exported, changed my advancedsettings and then reimported my library (which took ages), so my library is present but navigating is slow...

any idea why it does not work like it should?
(This post was last modified: 2012-04-10 20:39 by jpcolin.)
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 10,796
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #2
read our wiki it has performance tips for mysql...

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
grywnn Offline
Donor
Posts: 379
Joined: Mar 2010
Reputation: 0
Location: Germany
Post: #3
...especially skip-name-resolve in my.ini is a live saver. Smile
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 20,249
Joined: Jan 2011
Reputation: 253
Location: Arizona, USA
Post: #4
Don't forget, sharing thumbnails will make things slow as well. Try removing that part of your advancedsettings.xml file to see if that's the culprit of your slow-down.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: debug log = debug log, Video library = Video library, SMB = SMB , userdata = userdata, etc
find quote
TechLife Offline
Donor
Posts: 576
Joined: Aug 2008
Reputation: 20
Location: Aurora, CO
Post: #5
I'd love to try the skip-name-resolve tweak but I'm on Fedora 14. Anyone know if there is an equivalent to the my.ini file?

EDIT: Found it. On a linux server, it's most likely /etc/my.cnf

*If I helped, please +rep below*
Windows Media Center PVR add-on (pvr.wmc) and Server (ServerWMC)
The XBMC team, plug-in devs, skinners, etc. do this for us for FREE in their spare time because they want to. Think about that for a second before you start bitching...
(This post was last modified: 2012-04-11 04:45 by TechLife.)
find quote
noner Offline
Senior Member
Posts: 115
Joined: May 2011
Reputation: 0
Post: #6
(2012-04-11 04:40)TechLife Wrote:  I'd love to try the skip-name-resolve tweak but I'm on Fedora 14. Anyone know if there is an equivalent to the my.ini file?

Yep

Its called skip-name-resolve

Smile
find quote
TechLife Offline
Donor
Posts: 576
Joined: Aug 2008
Reputation: 20
Location: Aurora, CO
Post: #7
(2012-04-11 04:44)noner Wrote:  
(2012-04-11 04:40)TechLife Wrote:  I'd love to try the skip-name-resolve tweak but I'm on Fedora 14. Anyone know if there is an equivalent to the my.ini file?

Yep

Its called skip-name-resolve

Smile

Thanks. But it was the actual file I was looking for. Wink

Found it in /etc/my.cnf

*If I helped, please +rep below*
Windows Media Center PVR add-on (pvr.wmc) and Server (ServerWMC)
The XBMC team, plug-in devs, skinners, etc. do this for us for FREE in their spare time because they want to. Think about that for a second before you start bitching...
(This post was last modified: 2012-04-11 05:19 by TechLife.)
find quote
noner Offline
Senior Member
Posts: 115
Joined: May 2011
Reputation: 0
Post: #8
Ah.. sorry.. my mistake
find quote
jpcolin Offline
Member
Posts: 64
Joined: Aug 2011
Reputation: 0
Post: #9
I'll try the skip-name-resolve trick, if i find how to add it in my synology DS410.

About the thumbs, if i don't share them, how will it work?
Will i have to rescan my library on all my devices to download the thumbs localy? orConfused

It just seems bizare to have a mysql library but not a centralized thumbs and fanart database...
find quote
DLeavy Offline
Fan
Posts: 328
Joined: Jun 2011
Reputation: 8
Post: #10
(2012-04-12 09:35)jpcolin Wrote:  I'll try the skip-name-resolve trick, if i find how to add it in my synology DS410.

About the thumbs, if i don't share them, how will it work?
Will i have to rescan my library on all my devices to download the thumbs localy? orConfused

It just seems bizare to have a mysql library but not a centralized thumbs and fanart database...

If you don't share them, you scan/update library on one of your machines and then manually copy the thumbnail directory to the others - not very elegant, but I believe there's something in the works to address this "shortcoming".

I do share my thumbnail directory, and the response isn't that bad - never more than a second to load the fanart in the background
find quote
BigO Offline
Senior Member
Posts: 168
Joined: May 2010
Reputation: 0
Post: #11
Were are the thumbs stored? Are they on a slow drive? are you on GB network?

My buddy is running his on a SSD on a GB network and his thumbs all load up nice and quick.

XBMC-ATV2 - Frodo
XBMC-LR - Zotac Zbox Plus - 36gb SSD - 3Gb Mem - Frodo
XBMC-BR - Foxcon 330i - 16gb SSD - 2Gb Mem - FrodoRc3
XBMC-Mini - MacMini - 128Gb OCZ Agility - 5Gb Mem - Frodo - Running SQL - Auto Library Update
Synology DiskStation Ds1512+(Dsm 4.3-3776) - 4gb Mem - 5*3tb Wd Reds [SHR] - 2GB Bonded Link - (SSD Cache WIP)

find quote
Ozymandyaz Offline
Member
Posts: 84
Joined: May 2011
Reputation: 0
Location: Toronto, ON
Post: #12
Hi JPColin -

I wrote the Quixventure guide and I'm sorry to hear that your set-up is running slow. XBMC/MySQL runs very quickly for me and I am only using a cheap DS110j as my MySQL server...

I am reading the speed up tweaks now and will try them out at home, then update the guide if they show any improvement.

If you make any interesting progress, let me know and I will add it to my guide as well!

EDIT: Just added the my.conf entry and I think it may have added a little extra bump in performance. Let me know if you need any help setting it up on the Synology, I'll probably add a post to Quixventure shortly!

Guide for MySQL database using Synology NAS
http://youtu.be/3PmmDtK65ks

Silent AppleTV with Crystalbuntu
http://quixventure.com/2011/12/crystalbu...roduction/
(This post was last modified: 2012-04-12 16:03 by Ozymandyaz.)
find quote
jpcolin Offline
Member
Posts: 64
Joined: Aug 2011
Reputation: 0
Post: #13
(2012-04-12 14:14)DLeavy Wrote:  [quote='jpcolin' pid='1073554' dateline='1334216122']

I do share my thumbnail directory, and the response isn't that bad - never more than a second to load the fanart in the background

There must be something wrong in my setup then!
Is more like 20-30s to load a menu!

I use a DS410 on a Dlink Gigabit router (of course ATV2 is 100Mbit)
I use SMB.
All is Cat5e Wired.

Until now the thumbs where on the ATV, and now on the Synology.

@Ozymandyaz
you have a setup with a synology as MySQL server and an ATV2 without the skip-name-resolve and it runs quickly? and you share the thumbs?
there must be something really wrong in my setup then
(This post was last modified: 2012-04-12 16:54 by jpcolin.)
find quote
DLeavy Offline
Fan
Posts: 328
Joined: Jun 2011
Reputation: 8
Post: #14
Well, you can determine if it's the MySQL database or the thumbs, by only changing one of them and testing - i.e use the MySQL database, but keep the thumbs local. See if you're still getting a performance hit.

Might also consider turning on debugging and posting a log debug log - this might tell you where it's spending all its time.
find quote
Ozymandyaz Offline
Member
Posts: 84
Joined: May 2011
Reputation: 0
Location: Toronto, ON
Post: #15
(2012-04-12 16:53)jpcolin Wrote:  
(2012-04-12 14:14)DLeavy Wrote:  [quote='jpcolin' pid='1073554' dateline='1334216122']

I do share my thumbnail directory, and the response isn't that bad - never more than a second to load the fanart in the background

There must be something wrong in my setup then!
Is more like 20-30s to load a menu!

I use a DS410 on a Dlink Gigabit router (of course ATV2 is 100Mbit)
I use SMB.
All is Cat5e Wired.

Until now the thumbs where on the ATV, and now on the Synology.

@Ozymandyaz
you have a setup with a synology as MySQL server and an ATV2 without the skip-name-resolve and it runs quickly? and you share the thumbs?
there must be something really wrong in my setup then

Its gotta be the thumbs... I use MySQL on the NAS and I have my thumbs shared via path substitution using NFS. All other connections are SMB... Maybe try NFS just for the thumbs? I have used SMB for thumbs and did not see much difference, so YMMV.. But yeah, a debug log may be a good idea, see what's really going on! There is probably a permission problem somewhere.

Guide for MySQL database using Synology NAS
http://youtu.be/3PmmDtK65ks

Silent AppleTV with Crystalbuntu
http://quixventure.com/2011/12/crystalbu...roduction/
find quote
Post Reply