MySQL / XBMC 13.1 slow reaction
#1
Hi there,

this is my first post to this support forum, even though I'm a long time user of XBMC.

I run a couple of raspberrys and 2 zotacs as xbmc machines - all of them fueled by openelec (gotherm 3.1, openelec 4.0.7)

My general setup is:

Thecus NAS, complete 1GB ethernet cabling through my house, all xbmcs connected via cat6 cables. All xbmc boxes receive fixed IP-addresses from the dhcp-server, so does the NAS system. Performance from the NAS is approx 60-90MB/sec when reading via SMB.

During the last year I set up mysql as the central video-library for some of those xbmx-instances - which worked fine for me since I have all my digital movie-content stored on a central NAS. Performance was always good - no problems at all.

Somewhere around this spring (should be April or May) the mysql-performance decreased "suddenly" - not in the mood for deep-diving into the problem back then I just switched back to "local DB" - fine for now.

I used this weekend to perform some analysis of the problem - still not able to figure it all out.

Here the advancedsettings.xml which I used for the test:

Code:
<advancedsettings>
    <loglevel hide="false">1</loglevel>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.0.160</host>
        <port>3306</port>
        <user>testuser</user>
        <pass>test123</pass>
    </videodatabase>
</advancedsettings>

The NAS provides a MySQL-5.1.45 database. Wnating to rule out any performance issues on the DB-side I run a couple of tests using "hammerDB" - a couple of million datasets were created in a few minutes - so I am pretty sure I can rule out performance issues on the DB side.

I used the same login credentials for hammerDB and XBMC to eliminate side-effect due to access rights or similar.

Let me describe the actual problem:

1. XBMC starts slow. After the splash screen comes a balck screen for quite a while
2. Scraping is slower. Even though my internet speed is slow the scraping process is slower than before
3. Slow reaction. When I press some keys on the remote (eg context menu), it takes a couple of seconds (between 10 and 20) until it appears - same when entering the list of movies or starting a movie
4. Starting a movie is strange: After the "usual" waiting-period of 10-20 seconds first the audio starts - then another 10-20 seconds until the video starts - then all is fine (navigating through the movie)

The aforementioned timeouts feel like "freezes" - even the onscreen-debug info freezes... First I thought it would be some faulty DNS / Netbios resolution, but since I use the IP-address to identify the mysql-server it should not be a problem, right? And accessing the box from any other machine (read: non-XBMC) works fine.

Any ideas are very much appreciated.

debug-log is attached: debug.log

Pretty clueless...

Thx in advance for ideas.

cicero
Reply
#2
Because yours was running ok, the cause might be different, but I've just set up a central my.sql database and had similar issues. Searching led me to this forum. The answer for me was editing the my.sql configuration to add "skip-name-resolve". I also had the ip address in my settings (and have a hosts file anyway). The reason I mention it is that I also had the audio starting by itself before the video kicked in, and it would also sit there for quite some time before loading the menus. If you want to give it a go, I can find the instructions for you (I've been looking for the thread to say "thank you" to the person who posted the solution because I was about to give up entirely on a shared database, but I also found some clear instructions as to how to do it on another nas and that helped me to figure out how to do it on mine).
Reply
#3
Or get your name resolution (including your reverse name resolution) working properly.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
(2014-08-12, 11:48)nickr Wrote: Or get your name resolution (including your reverse name resolution) working properly.

That would be the correct wax - no doubt about it. I will check if my loadbalancer (acting as my DHCP server and DNS relay) will be capable of doing so. Always had some "issues" getting DNS and NETBIOS names resolved properly when NETBIOS master was NAS and DNS server was the router or similar...

Thx. for the advice.

(2014-08-12, 11:45)bilgepump Wrote: Because yours was running ok, the cause might be different, but I've just set up a central my.sql database and had similar issues. Searching led me to this forum. The answer for me was editing the my.sql configuration to add "skip-name-resolve". I also had the ip address in my settings (and have a hosts file anyway). The reason I mention it is that I also had the audio starting by itself before the video kicked in, and it would also sit there for quite some time before loading the menus. If you want to give it a go, I can find the instructions for you (I've been looking for the thread to say "thank you" to the person who posted the solution because I was about to give up entirely on a shared database, but I also found some clear instructions as to how to do it on another nas and that helped me to figure out how to do it on mine).

Thx for the suggestion. I will check where to put the my.sql config on my thecus NAS - it's always a bit tricky with this things since some config files are only "temporary". Will check out. Sounds like "the culprit" to me, anyway.

Will post if it helped.

thx,

cicero
Reply
#5
Mine (QNAP) already had a config file, I didn't have to create it, just amend it.
Reply
#6
Ok, thanks to @bilgepump - adding skip-name-resolve in the my.cnf file did the job. Great to have the central DB back... Now just distributing the advancedsettings.xml for the xbmc-boxes and I am done.
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL / XBMC 13.1 slow reaction0