Moving SQLDB onto new Vero4k+?

Hello! My new Vero4k+ arrived this morning - many thanks to @sam_nazarko and the team for all the work they’ve put into getting orders out the door over the last couple of months.

While the Vero4k+ will be replacing an old Pi 2, I also still have another Pi 2 running in another room so I will still be continuing to use a SQL DB at the back end. Right now, i’m running MySQL across the network from the server that also contains all the media.

I’m keen to realise as much warp speed from the 4k+ as I possibly can (performance of the second Pi 2 is less important), so my thought was to relocate the database from the media server to something (either MySQL or possibly Maria) running locally on the Vero4K+ itself, removing the network, the old server and its slow storage as a bottleneck for what is the most used device. Before doing that though, I was please hoping for a sanity check on my thinking.

Is running a database on the Vero4k+ likely to yield the faster user experience i’m hoping for? Am I introducing additional wear and premature end of life to the eMMC in the 4k+ by pummeling it with a running database? Any other considerations that I may not have thought of?

Thanks everyone :slight_smile:

I don’t believe you will improve performance by any noticable amount. I think that db query times are returned in the Kodi log? Maybe you can post some of yours and someone with a local MySQL db could post theirs for comparison.

What kind of server is the MySQL database on? Most likely, as @actiona said you probably will not see much increase of performance by moving it to the Vero.

I used to have my database on a Linux Mint laptop and moved it to my Vero 4K thinking it would speed things up. I didn’t really see any difference (I didn’t check query times, I’m going by user experience). I’m actually going to move the database back to a Linux Mint laptop that I don’t use anymore so if I’m doing work on the Vero and need to reboot it doesn’t bother other systems using the database.

Really, the database should be on the most stable system you have. The one that you only reboot when there is a power outage.

I changed over my SQL setup from MySQL to MariaDB (still on the same machine) and saw a noticeable (though not huge) difference. That’s more likely to give you a boost than moving the SQL databases somewhere else. I also found a post on the Kodi forum about optimizing the MariaDB installation. I had to modify the recommendations a bit because some of the settings were depreciated with the newer version of MariaDB and caused the MariaDB server to crash. Here’s what I added to the server section of the MariaDB my.ini file. What each of them does is discussed in more detail in the post to which I linked.

innodb_buffer_pool_size=2G
innodb_buffer_pool_instances=2
innodb_adaptive_hash_index=OFF
character-set-server=utf8
skip-name-resolve
optimizer_search_depth=1
key-buffer-size=64k

BTW, I am very new to MariaDB, so some of these changes might not really be needed. Please take this advice with at least a couple grains of salt.

Is using mariadb really any faster than just sqlite on local storage?

seems to me the main resource hog would be the thumbnails etc; not the metadata text (are the thumbnails still cached locally or are they db blobs too?)

surely querying a remote database is slower than reading a local one even off sdcard?

Thats a different comparison! Here discussion was about shared MySQL on remote server or local Vero and then about MySQL vs MariaDB.

It costs nothing to try! FYI when you install the “mysql-server” package on the Vero, you get mariadb 10 anyway.

1 Like