v17 17.4 using mysql for video and music database, slow GUI
#1
So after I got fed up with the default nosql Kodi db not updating the way I expect I decided to go ahead and install mysql-server, allow privileges for 'kodi' user and configure my advancedsettings.xml like this


  <videodatabase>
    <type>mysql</type>
    <host>127.0.0.1</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>127.0.0.1</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>


And sure enough, now I have the true article sql DBs with my sorta big music collection and assorted Movies / TV Shows.

Kodi runs on Ubuntu 16.04 LTS dedicated HTPC with 4 CPU cores like so -

vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel® Atom™ CPU  330   @ 1.60GHz
stepping        : 2
microcode       : 0x213
cpu MHz         : 1599.976
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
bugs            :
bogomips        : 3199.95
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 48 bits virtual

And 16 GB or RAM, which during flac playback looks like this -

 [defuentes@defuentes-Aspire-R3610 ~/.kodi/userdata]$ cat /proc/meminfo
MemTotal:        1531424 kB
MemFree:           70548 kB
MemAvailable:     670216 kB
Buffers:           10392 kB
Cached:           681612 kB
SwapCached:           68 kB
Active:           631776 kB
Inactive:         651740 kB
Active(anon):     293144 kB
Inactive(anon):   299988 kB
Active(file):     338632 kB
Inactive(file):   351752 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       7807072 kB
SwapFree:        7803088 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:        591616 kB
Mapped:            48500 kB
Shmem:              1500 kB
Slab:             100068 kB
SReclaimable:      77892 kB
SUnreclaim:        22176 kB
KernelStack:        4752 kB
PageTables:        10196 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     8572784 kB
Committed_AS:    1407180 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:    397312 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      147008 kB
DirectMap2M:     1425408 kB

I think thats enough hardware to properly run both Kodi and mysql-server, correct me if Im wrong.

Now the thing is, the Kodi GUI has become sluggish since this configuration was implemented, specially for music collection; I dont know about Kodi internals but I can't believe that *that* many queries are being made on DB to slow things  down so much other than initial DB population...

Linux 'top' command sometimes shows mysqld process taking up really high share of CPU utilization, sometimes showing over 200% !!!!

Are there any further settings I need to tweak to speed things up on the GUI side? I really dont want to fall back to default nosql DB...

Thanks in advance
Reply
#2
So you are running Ubuntu 16.04 LTS on an Intel® Atom™ CPU 330 @ 1.60GHz which also now runs MySQL Server? On 16GB internal memory?
That Intel Atom is basically on of the, if not the, slowest Intel machine Kodi still runs on.
Reply
#3
(2017-10-14, 23:04)Klojum Wrote: So you are running Ubuntu 16.04 LTS on an Intel® Atom™ CPU 330 @ 1.60GHz which also now runs MySQL Server? On 16GB internal memory?
That Intel Atom is basically on of the, if not the, slowest Intel machine Kodi still runs on.

Well thats not good, I mean the PC is a few years old for sure; but a 4 core Atom being the slowest CPU supported is not what I expected.

I mean sure, I can't playback x265 but I can live with that...

Guess Ill have to bite the bullet on this one.
Reply

Logout Mark Read Team Forum Stats Members Help
17.4 using mysql for video and music database, slow GUI0