mySQL woes

OK the scraping of the MYSQL server machine (RPi3, OSMC) took a long time. Longest than any that I have experienced.
I am experiencing a lot of lag even when I am browsing the menus in Kodi and sometimes it takes several seconds before it moves to the next movie in list when browsing even after couple of reboots. Does it depend on me had installed Aeon MQ 7 skin on it? But I am not using that skin at the moment.

The Client machine which in my case is my PC running the same Kodi version as the MYSQL server machine (RPi3, running kodi 16.1 - osmc) has now these settings in advancedsettings.xml:

<!-- General Settings -->
<advancedsettings>
<playcountminimumpercent>95</playcountminimumpercent>

<!-- Streaming Optimization -->
<network>
 <buffermode>1</buffermode> <!-- Choose what to buffer:
             0    Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) (default)
             1    Buffer all filesystems, both internet and local
             2    Only buffer true internet filesystems (streams) (http, etc.)
             3    No buffer -->
 <readbufferfactor>5.0</readbufferfactor> <!-- Multiplier to fill the buffer -->
 <cachemembuffersize>52428800</cachemembuffersize>   <!-- Cache size; this must be (free ram / 3) * 1024 * 1024 -->
 <disableipv6>true</disableipv6> <!-- Disable ipv6, more resources available for RPi-->
</network>

<!-- MySQL Library -->
<videodatabase>
 <type>mysql</type>
 <host>10.0.1.120</host>
 <port>3306</port>
 <user>osmc</user>
 <pass>osmc</pass>
</videodatabase>


<!--
<musicdatabase>
 <type>mysql</type>
 <host>10.0.1.120</host>
 <port>3306</port>
 <user>osmc</user>
 <pass>osmc</pass>
</musicdatabase>
-->

<!-- Video Library Tweaks -->
<videolibrary>
 <importwatchedstate>false</importwatchedstate>
 <importresumepoint>true</importresumepoint>
</videolibrary>

<!-- Path Substitution For Client Side-->


<pathsubstitution>
 <substitute>
  <from>special://masterprofile/passwords.xml</from>
  <to>smb://10.0.1.120:445/.kodi/userdata/passwords.xml</to>
 </substitute>

 <substitute>
  <from>special://masterprofile/sources.xml</from>
  <to>smb://10.0.1.120:445/.kodi/userdata/sources.xml</to>
 </substitute>
 
 <substitute>
  <from>special://masterprofile/Thumbnails/</from>
  <to>smb://10.0.1.120:445/.kodi/userdata/Thumbnails/</to>
 </substitute>
 
</pathsubstitution>


</advancedsettings>

The only things that is not being loaded in my client machine are the fanarts and the thumbnails for the moves and TV shows. Have I missed a substitute?

Thank you in advance.

To be honest I never have used that kind of substitutions. The path substitutions I was referring to are just to ensure that all clients can access the media files in the same way.

For sure you should not do the thumbnails substitution as thumbnails always should be stored and retrieved local on each client.

Took away this section from advancedsettings.xml:

The thumbnails and fanarts are now loaded in client server. Thank you @fzinken

What I don’t understand is this sluggish lag when browsing in RPi3 (MYSQL server) which is my main RPi. Very annoying. :unamused:

Either a misconfiguration on that device or one of the add ons playing up

Don’t have any video add-on. This is a new RPi. Apart from vnc, mysql and phpmyadmin I haven’t installed anything on it.
The phpmyadmin, I realized I have to have apache as well, but did not install apache.

Can it be the anything in the advancedsettings.xml that isn’t suppose to be?!

<!-- General Settings -->
<advancedsettings>
<playcountminimumpercent>95</playcountminimumpercent>

<!-- Streaming Optimization -->
<network>
 <buffermode>1</buffermode> <!-- Choose what to buffer:
             0    Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) (default)
             1    Buffer all filesystems, both internet and local
             2    Only buffer true internet filesystems (streams) (http, etc.)
             3    No buffer -->
 <readbufferfactor>5.0</readbufferfactor> <!-- Multiplier to fill the buffer -->
 <cachemembuffersize>52428800</cachemembuffersize>   <!-- Cache size; this must be (free ram / 3) * 1024 * 1024 -->
 <disableipv6>true</disableipv6> <!-- Disable ipv6, more resources available for RPi-->
</network>

<!-- MySQL Library -->
<videodatabase>
 <type>mysql</type>
 <host>127.0.0.1</host>
 <port>3306</port>
 <user>osmc</user>
 <pass>osmc</pass>
</videodatabase>


<!--
<musicdatabase>
 <type>mysql</type>
 <host>127.0.0.1</host>
 <port>3306</port>
 <user>osmc</user>
 <pass>osmc</pass>
</musicdatabase>
-->

<!-- Video Library Tweaks -->
<videolibrary>
 <importwatchedstate>false</importwatchedstate>
 <importresumepoint>true</importresumepoint>
</videolibrary>

<!-- Path Substitution For Client Side-->

<!-- Uncomment for Client Side
<pathsubstitution>
 <substitute>
  <from>special://masterprofile/passwords.xml</from>
  <to>smb://10.0.1.120:445/.kodi/userdata/passwords.xml</to>
 </substitute>

 <substitute>
  <from>special://masterprofile/sources.xml</from>
  <to>smb://10.0.1.120:445/.kodi/userdata/sources.xml</to>
 </substitute>

</pathsubstitution>

-->


</advancedsettings>

Don’t understand. :confused:

I did purge phpmyadmin and that helped with sluggishness of the machine:
sudo apt-get purge phpmyadmin

and then

sudo apt-get autoremove

Pretty sure phpmyadmin will bring in apache2 as a dependency.

If performance still isn’t good you need to tune MySQL. That’s beyond the scope of the OSMC forum

1 Like

Search the kodi forum for texturecache.py it will preload the fanart which is probably what is slowing you down

1 Like

@sam_nazarko when @fzinken first mentioned about phpmyadmin, I went and read upon it, and that is what I thought. But when I got phpmyadmin installed, it needed apache to be restarted, and then it said it isn’t there. so I thought I have to install apache separately. when I purged apache2, it gave me this:

root@SimorghOSMC:/home/osmc# sudo apt-get purge apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  apache2*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 28727 files and directories currently installed.)
Removing apache2 (2.4.10-10+deb8u7) ...
Purging configuration files for apache2 (2.4.10-10+deb8u7) ...
dpkg: warning: while removing apache2, directory '/var/www/html' not empty so no                                                         t removed
root@SimorghOSMC:/home/osmc#

So far the performance is back to what I would consider normal.
I might wipe everything and start a new installation of osmc to just have everything clean and fresh from scratch.

Leave phpmyadmin out.
You actually can install it later on any device you want doesn’t have to be on the one where the MYSQL server is running

1 Like

I suspected that I could do that. Because it should connect to another server where MYSQL is running.
Thank you @fzinken for clarifying. Appreciated. The machine is much more responsive now. No sluggish, no nothing. :thumbsup:

@Dilligaf Would you please expand on that?
What does it do?

It preloads the artwork into Kodi so it doesn’t have to search/load it when an item is first browsed to

That sounds interesting. Will it use much more CPU/Memory?
Does it matter that I have part of my movie/TV show library scraped with MediaElch from https://www.kvibes.de/mediaelch/ and then transfered to my RPi?

It definitely speeds up library browsing on lower powered devices like the Pi It only uses cpu/memory when it does its scan, it does NOT run continuously

1 Like

Here is the Kodi forum thread [RELEASE] Texture Cache Maintenance utility

1 Like