Kodi + MySQL slow; The guide for performance tuning and the root cause - 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: Kodi + MySQL slow; The guide for performance tuning and the root cause (/showthread.php?tid=222156) |
RE: Kodi + MySQL slow; The guide for performance tuning and the root cause - Ballistic - 2015-06-24 (2015-05-22, 09:46)Milhouse Wrote:(2015-05-22, 03:55)telsin Wrote: So I recommend double checking your tables to make sure they are InnoDB too, not just the database. Open up phpmyadmin and lookie here: http://www.server-works.com/innodb.png Sofar i have not gotten any further with this issue. Movies/TV-Shows etc all load up reasonably fast concidering i have 4500+ movies and 200shows/15k episodes. The main problem has not changed. Which is the loading time of the main menu after startup. Kodi grabs the entire db instead of limiting it to the latest 25 results. Until the developers add a function to change this, i will still be running on XBMC 13.2 unfortunately. RE: Kodi + MySQL slow; The guide for performance tuning and the root cause - Ballistic - 2015-09-20 I solved this problem by moving to a smart-playlist friendly skin. Arctic zephyr to be precise. This skin makes it very easy to create smart playlists that you can apply as widget. In these smart playlists which you can basically change the mysql query. This way i limited it to 10 results which gives lightning fast results. RE: Kodi + MySQL slow; The guide for performance tuning and the root cause - stellenbosser - 2016-11-15 I'm afraid you are looking in the wrong place. You can do all you want to make MySQL faster, but it is not going to solve anything. I have a low spec MySQL server (Basic QNAP fileserver), and I use a Raspberry PI as Kodi client using MySQL. I added a smart playlist with 'afrikaans' in the Genre. Once the smart playlist was created, I pressed 'q' to while the playlist title was selected. It took between 20 and 30 minutes (not SECONDS - MINUTES) before the first song started playing. Enough time for me to log into Kodi Raspberry PI via ssh and to see what was going on. The processor was running at about 2.5% and kodi was only using 19% of RAM - in other words it was idling all the way. So I installed a MySQL client (command line) on the RPI. To get a list of the songs I was looking for could be retrieved with a simple SQL statement, so I executed "SELECT * FROM song WHERE lower(strGenres) LIKE '%afrikaans%'. 0.7seconds (Yes - less than 1 second) later I had information of all of the 1081 songs transferred to my Kodi RPI via my GB LAN connection. All this basically means is that whoever wrote the MySQL interface (or the framework for getting playlist information for that matter) basically does not know anything about programming. If it was developed properly you would have had your playlist ready and sorted in the sequence you preferred in less than 2 seconds. Ok, so there is a bad design in Kodi, but even with that there are ways to have kodi perform as if the playlist was always immediate. If you have a song, start playing it (in stead of locking the entire frontend - yet another BAD design - threads allows a good programmer to have a responsive frontend while some heavy lifting is happening where no one is aware of it) - there is no point in waiting till you have all 1000 items loaded if you tortoises are laughing at you. If you get the first song, PLAY it. If you managed to load another 20 songs by the time song 1 is at its end, then make a better decision on which one to play next. But really - the infrastructure needs attention!!!! Kodi + MySQL slow; The guide for performance tuning and the root cause - Memphiz - 2016-11-15 Finally someone who realised that kodi was created by a bunch of internetional idiots. There is light at the end of the tunnel now that we will see some proper, sane and obvious correct performance fixes from our new and first "real good programmer" named stellenbosser. Its so good to have you on board. Looking forward to finally learn something from you. RE: Kodi + MySQL slow; The guide for performance tuning and the root cause - cyber7 - 2016-12-20 (2016-11-15, 17:17)stellenbosser Wrote: I'm afraid you are looking in the wrong place. You can do all you want to make MySQL faster, but it is not going to solve anything. I have a low spec MySQL server (Basic QNAP fileserver), and I use a Raspberry PI as Kodi client using MySQL. I added a smart playlist with 'afrikaans' in the Genre. Once the smart playlist was created, I pressed 'q' to while the playlist title was selected. It took between 20 and 30 minutes (not SECONDS - MINUTES) before the first song started playing. Enough time for me to log into Kodi Raspberry PI via ssh and to see what was going on. The processor was running at about 2.5% and kodi was only using 19% of RAM - in other words it was idling all the way. So I installed a MySQL client (command line) on the RPI. To get a list of the songs I was looking for could be retrieved with a simple SQL statement, so I executed "SELECT * FROM song WHERE lower(strGenres) LIKE '%afrikaans%'. 0.7seconds (Yes - less than 1 second) later I had information of all of the 1081 songs transferred to my Kodi RPI via my GB LAN connection. All this basically means is that whoever wrote the MySQL interface (or the framework for getting playlist information for that matter) basically does not know anything about programming. If it was developed properly you would have had your playlist ready and sorted in the sequence you preferred in less than 2 seconds. Ok, so there is a bad design in Kodi, but even with that there are ways to have kodi perform as if the playlist was always immediate. If you have a song, start playing it (in stead of locking the entire frontend - yet another BAD design - threads allows a good programmer to have a responsive frontend while some heavy lifting is happening where no one is aware of it) - there is no point in waiting till you have all 1000 items loaded if you tortoises are laughing at you. If you get the first song, PLAY it. If you managed to load another 20 songs by the time song 1 is at its end, then make a better decision on which one to play next. But really - the infrastructure needs attention!!!! Hi stellenbosser! I am from Durbanville, so always good to see/hear someone local. I have a different problem and that is the indexing of movies in Kodi 17 is soooo slow, it makes for a real bad experience. Unfortunately I have a toddler (21 months) and another about to be born, but will start using your post as a pointer to get this mysql beast debuged. It seems you are going to assist with the coding, if so, I will let you know my findings. (+10,000 episodes and +8,000 movies) cheers cyber7 (www.cyber7.co.za) RE: Kodi + MySQL slow; The guide for performance tuning and the root cause - Ou812_2018 - 2019-07-14 (2015-03-27, 02:03)bambi73 Wrote: 000+ TVShows and 70000+ episodes in library. Nothing much what I can't do about it because I want it here . Unfortunately Kodi isn't optimized for such amounts. I set the procedures and triggers up as posted in 18.3 as I too have a rather large collection of shows. It made a huge speed difference but it seems to have broke some other items. The playCount and lastPlayed columns no longer update in files when I watch an episode. Also, the scrapper seems to be experiencing scapping issues. It tells me for each file I import that the information is unavailable. If I switch the tables back to being views and drop the functions and stored procedures, this start working again at a cost of very slow menu loads. Is there an update to this issue? I know this thread has aged a bit since it was first posted. |