Kodi Community Forum
~1 minute delay when starting XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: ~1 minute delay when starting XBMC (/showthread.php?tid=162603)

Pages: 1 2 3 4 5 6 7


RE: ~1 minute delay when starting XBMC - Dilligaf - 2013-06-15

Could it maybe be a MySql issue? It seems you've tried everything on the XBMC end, can you try a MySql remove/reinstall or an install on a different machine?


RE: ~1 minute delay when starting XBMC - seth.feinberg - 2013-06-15

@Dilligaf, thanks for the suggestion! unfortunately I thought of that but its installed on a Synology NAS and the install is just a click of a checkbox asking to "Enable MySQL". I'm sure there's some backend Linux stuff I could do to uninstall and reinstall it but considering it worked flawlessly under Eden I'm not sure I want to risk monkeying around with it just to fix a 30-50 second "freeze". Don't get me wrong, I am extremely interested in fixing this issue, I'm just not sure that particular course of action would be worth it.

However, your suggestion and thinking about MySQL specifically made me realize that one other thing that DID change in the switch to Frodo is that I stopped using the <name> tag in advancedsettings.xml. Previously my databases were labeled xbmc_MusicXX and xbmc_VideoXX and now there's only MyVideos75. Then I found this under the Users tab of MyPHPAdmin:

http://imgur.com/dAJLHM6

I really don't understand exactly what that is, but it is CLEARLY referring to the old naming convention for the MySQL database. Does anybody have any advice on how to alter it and/or make the MySQL db accessible to all users including xbmc? I don't care about the security, MySQL is only used in my LAN and its only used for XBMC.


RE: ~1 minute delay when starting XBMC - Dilligaf - 2013-06-15

Your link is broken. Do you have a laptop or other pc that you could install MySql for testing?? The name is only used if you want/need multiple databases such as kids and adults or whatever. You can grant xbmc full proivileges from the MySql command line as detailed in the wiki.


RE: ~1 minute delay when starting XBMC - seth.feinberg - 2013-06-15

(2013-06-15, 02:28)Dilligaf Wrote: Your link is broken. Do you have a laptop or other pc that you could install MySql for testing?? The name is only used if you want/need multiple databases such as kids and adults or whatever. You can grant xbmc full proivileges from the MySql command line as detailed in the wiki.

There was a period at the end that I have now removed. thanks for letting me know.

I do have another machine to test it on and I will as soon as I exhaust this MySQL permissions rabbit hole. that just seems like a very involved test and I'd like to test everything else before jumping in. The name is from dharma where a name was needed that I just kept because I liked having the tables prefixed with xbmc in MySQL. I know I don't need the names and I was having issues so I removed the tag, but I'm obviously still having issues. I read the wiki but that seems to imply that it is to make the MySQL MORE secure, whereas I want to allow ANY user on my LAN full access to avoid any issues with root squashing etc...


RE: ~1 minute delay when starting XBMC - Dilligaf - 2013-06-15

GRANT ALL ON *.* TO 'xbmc';

will give xbmc full control.


RE: ~1 minute delay when starting XBMC - Kib - 2013-06-15

After seeing another user with an older type of synology and very poor MySQL performance and after looking on the internet I now think all your issues are because of this.

Several types of Synology have an option to install MySQL on them but some have poor CPU and memory leading to horrible mySQL performance


RE: ~1 minute delay when starting XBMC - seth.feinberg - 2013-06-16

thanks so much. when we started talking about MySQL I was in the midst of re-adding both my sources back to xbmc (since I had attempted without MySQL) and I again experienced that strange behavior of NO "freeze" after adding the first source (TV Shows) when attempting a manual update and after adding the second source (Movies), again a freeze. But its down to about 25seconds, so thats a plus, here's a log with 2 attempted manual updates: http://pastebin.com/vpEunyCJ

I typed that GRANT ALL ON *.* TO 'xbmc'; into MySQL and here's a screenshot of the users tab of my PHPMyAdmin: http://imgur.com/SqCHqdE I was worried that since I root squash all to 501 that I'd need to add that user but doesn't seem to be the completely fixing the issue. Thanks for your info though!


RE: ~1 minute delay when starting XBMC - Dilligaf - 2013-06-16

I could say start over and add movies first to see what happens but I'm willing to bet that the freeze won't happen until you add TV then. It's probably database size that's causing the delay. On a weak NAS with limited memory MySql is likely pushing it to its limits and you have the choice of living with it, using local databases (yuck!) or hosting MySql on a more powerful machine. My advise would be to live with it.


RE: ~1 minute delay when starting XBMC - seth.feinberg - 2013-06-16

ahh, I already re-added the sources Movies first and as you predicted, the "freeze" didn't happen til I added TV Shows. I am running MySQL on a Synology 1812+ With 3gb of RAM, my movies folder is ~4.8tb and my TV is about 8, does it sound like this setup would be pushing the limits? I think you are totally right and your advise is the best route, but I would like to know for sure...if possible. Any way I can?

P.S. thanks so much for your help, just knowing what the issue probably is (despite not being able to fix it) is mounds of relief to my psyche.


RE: ~1 minute delay when starting XBMC - Dilligaf - 2013-06-16

I'm not really familiar with the Synology lineup but there should be some way of monitoring system resources/memory/processor


RE: ~1 minute delay when starting XBMC - seth.feinberg - 2013-06-18

This is the monitoring tool during like 4 consecutive manual library updates: http://imgur.com/6coFHKQ The CPU never went over 51% and the Memory held remarkably steady (maybe a little too steady) at 29%. Should I be concerned by how much of the memory is cached?

Nothing seems to be testing the limits of my NAS, but still if I look at processes (they are mostly generically named like java and python), one of the python process's seems to consistently use 25% of my cpu. See here: here: http://imgur.com/Kquupo4 and here: http://imgur.com/yeMXSdv

On another possibly (but hopefully not) unrelated note, while I was running the manual updates to see what the Synology Monitoring tool would turn up I was keeping a very close eye on the debug log. Here: http://pastebin.com/kybzd1eK at line 648 there's, for example, this:
Code:
18:24:02 T:2564   DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
18:24:12 T:9132   DEBUG: Suspended the Sink

I hit Update Library, nearly instantly when I pulled up the context menu. and I tried it a few more times, this "DEBUG: Suspended the Sink" shows up precisely 10 secs after I initiate a manual Library Update and while xbmc is "frozen". And this appears to happen every time. I click Manual Update, 10 seconds later it prints Suspended the sink and then 25-40 seconds later the Library update starts.

I've asked before but never really gotten an answer, what is this sink thats being suspended?


RE: ~1 minute delay when starting XBMC - Dilligaf - 2013-06-18

I've never messed with it but the my.ini has plenty of settings that can affect speed and memory usage, the fact that memory didn't peak may indicate that it is set conservatively. My MySql install (Windows Server) actually has 5 or 6 different my.ini files to choose from included, you may want to have a look at the file.


RE: ~1 minute delay when starting XBMC - seth.feinberg - 2013-06-18

(2013-06-18, 02:18)Dilligaf Wrote: I've never messed with it but the my.ini has plenty of settings that can affect speed and memory usage, the fact that memory didn't peak may indicate that it is set conservatively. My MySql install (Windows Server) actually has 5 or 6 different my.ini files to choose from included, you may want to have a look at the file.

OO that is a really good point. I'll look into settings to include in my.cnf. I'm currently rocking this:
Code:
nasislike> cat my.cnf
# The MySQL server
[mysqld]
port    =3306
socket        = /tmp/mysql.sock
skip-name-resolve
skip-external-locking
but that's a great place to keep looking.

I did some digging and can answer my own question about the large amount of cached memory. Apparently its just how modern Linux OS's deal with memory, which I should've realized from Android working the same way.

Any chance you know anything about what this sink is that keeps getting suspended? (I realize you not answering it probably means no, but I'm half-hoping someone else will swoop in and enlighten me)


RE: ~1 minute delay when starting XBMC - Dilligaf - 2013-06-18

I don't have a clue about the sink, my guess would be audio related but just a guess


RE: ~1 minute delay when starting XBMC - seth.feinberg - 2013-06-18

(2013-06-18, 03:42)Dilligaf Wrote: I don't have a clue about the sink, my guess would be audio related but just a guess

I think your guess is right, but hoping for more specificity to see how its related to my issue...
Thanks again!