Database and Multi server

Hi,



I was wondering why Plex is using SQLite instead of a faster server like MySQL.

MySQL exists on most systems and can handle a bigger load of data without loosing how fast it works.



This would also ease up taking backups on the system.

I know more people than me, would love to be able to set up more than one system that share the workload.



Web talks with MySQL

  • Server 1 (Movies)
  • Server 2 (TV Shows)
  • Server 3 (Music)
  • Server 4 (Movies)



    Each server would just talk to the MySQL server and therefor just remove most of the workload on the system disk of each server.

    Even this project (PHP Client for Plex) could be a great help, since PHP works on most systems also. Either run it just as a “program” with the php installation OR with Apache HTTP Server.



    Please comment, both developers and users. :slight_smile:

Because that’s way too complicated/“techie” for the average user to set up :slight_smile: One of the great things about PMS (in my opinion) is that it only takes a few clicks to get it installed & running. We’d have far fewer users if you had to screw around with a MySQL install before it’d do anything!

I don’t know how hard it would be to install on Mac, but on Windows and Linux it wouldn’t be a problem. :slight_smile:

Since Windows installation of MySQL is a MSI package, you can install it quietly, and therefor include it in the installer.

After that, there is just a few commands, that you also can have in the setup package.



Same in the Linux installation, you just point on what packages you need for the installation to work, and then as same as the windows installation just a few commands.



Nothing for the user to concern about. :slight_smile:

Are you running into performance issues with the existing database?



As far as backups, SQLite features (but we haven’t taken advantage of yet) live backups.

The performance issues is that I have about 2,8 TB TV shows.

When it’s on the same server, it takes hard on server to host all that.



I would like to move the web and the database so I can split up the work on 2 servers.

I don’t think your issues have anything to do with SQLite since SQLite is very fast compared to mysql in single-user/few-user environments.



MySQL would only speed up large environments with many concurrent users.

I agree with Mr Twister.



You can try optimizing your database. Then, it would be helpful to know which requests are running slowly; if it’s just the web management interface, there are known issues with large libraries. Otherwise, if it’s the clients, check the logs for something like this:



<br />
SLOW QUERY: It took X ms to retrieve Y items<br />


Thread necromancy! :smiley:



I actually came here looking for MySQL status, to see how or if it was supported. I’m of the mind that, IF MySQL was EVER offered, it should strictly be in the realm of “for expert use only” - basically for people that really know what they’re doing in terms of using a database.



I use a program called sqlyog which make hand editing a MySQL database trivial. While the web front end does everything I want it to, I could do it faster by manually manipulating certain fields of the database myself.



I agree that MySQL is rather overkill for Plex, but for geeks, it would be a nice advanced option :smiley:

sqlite is crap unless it’s for a single user on a device.
Even when using SSD’s or ramdisk for the database you’ll still see this kind of crap:
WARN - SLOW QUERY: It took 290.000000 ms to retrieve 8 items.

I can do a fresh load of plex with a new library & still see those kind of issues in the logs.
Optimizing the database doesn’t help, all versions to current do that same thing.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.