Performance of MySQL/MariaDB library access vs local access
#1
Hi, I'm currently running with a headless windows 10 PC as a media server using SMB and an Nvidia Shield Pro as my primary Kodi device, plus a few other laptops. I want to get a second Nvidia Shield and then ensure my library database is synced up across devices (artwork, watched status, resume points etc), so I'm looking into MySQL and MariaDB guides.

One thing I was unsure of though - with my current setup, library navigation is very swift because all the files are stored on the shield itself, the hard-disk in my pc only needs to spin up when I actually start watching something. How does it work with a SQL database? Are the files themselves such as artworks only held on one device, are are they still held locally on each with some sort of periodic refresh/sync against the SQL database?

Just wondering if things will get laggy navigating the library if it needs to access cached artwork remotely?

Thanks
Reply
#2
(2021-03-11, 17:20)QuizKid Wrote: How does it work with a SQL database? Are the files themselves such as artworks only held on one device, are are they still held locally on each with some sort of periodic refresh/sync against the SQL database?

The MySQL/MariaDB database contains only metadata as well as URLs to your video source(s). Artwork is still stored locally (by default), but thumbnails can be stored on a centralized location via path substitution. An Nvidia Shield may not be properly fit for this.

Each Kodi client also has a local database (Textures13.db) referring to the cache. That database works together with the shared SQL database whether thumbs still need to be cached or not. You can basically use any Kodi client to update/scrape your media collection for new entries, all necessary thumbs will be download per Kodi client as necessary.

Which computer are you planning to run your MySQL database on?

Navigating the library is not laggy (with a proper 100/1000mbps connection), absent thumbnails may be cached but that is only a 1-time thing per thumbnail.
Reply
#3
(2021-03-11, 20:00)Klojum Wrote:
(2021-03-11, 17:20)QuizKid Wrote: How does it work with a SQL database? Are the files themselves such as artworks only held on one device, are are they still held locally on each with some sort of periodic refresh/sync against the SQL database?

The MySQL/MariaDB database contains only metadata as well as URLs to your video source(s). Artwork is still stored locally (by default), but thumbnails can be stored on a centralized location via path substitution. An Nvidia Shield may not be properly fit for this.

Each Kodi client also has a local database (Textures13.db) referring to the cache. That database works together with the shared SQL database whether thumbs still need to be cached or not. You can basically use any Kodi client to update/scrape your media collection for new entries, all necessary thumbs will be download per Kodi client as necessary.

Which computer are you planning to run your MySQL database on?

Navigating the library is not laggy (with a proper 100/1000mbps connection), absent thumbnails may be cached but that is only a 1-time thing per thumbnail.
Thanks, I was thinking I would keep it on the Windows machine with the media, as that is where the local artwork is stored anyway and will be on most the time. This sounds good, will pull the trigger!
Reply
#4
I use MariaDB on a windows 10 machine to several clients, and find no appreciable performance difference vs. some installations where I am using a local db on the SSD.   (Using gb ethernet network).
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#5
https://kodi.wiki/view/MySQL

Only guide you need. I use MariaDB instead, but they are drop in compatible. Gonna post my cnf file, I found some tweaks here on the forum somewhere. I think they made a difference, but I ultimately don't really know. No way to quantify I guess. One of those "feels faster" type things. Some of these settings are MariaDB only if I recall. I will say that I do notice a difference between MariaDB on an ssd vs a spinner. Not much but it's enough to notice.
Code:
[mysqld]
optimizer_search_depth = 1
skip-name-resolve
innodb_adaptive_hash_index = off
bind-address = 0.0.0.0
sort_buffer_size = 16M
Reply
#6
I'm running my MySQL 5.7 server on the SSD system drive on my daily Ubuntu file server.
Also tested MariaDB on a Raspberry Pi 4b running from an SSD at some point, it had virtually the same performance as the PC.
Reply
#7
Thanks for all the responses. I got this set up and it's working nicely.

@jmgibson1981 I'm interested in your cnf file optimizations but I'm a bit out of my depth now. Do you remember where you found this info?
Reply
#8
https://forum.kodi.tv/showthread.php?tid...hash_index

 I didn't use them all. Just the ones that seemed to have the biggest effect.
Reply

Logout Mark Read Team Forum Stats Members Help
Performance of MySQL/MariaDB library access vs local access0