Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Database and Multi server

SleepwalkerSleepwalker Posts: 69Members, Plex Pass Plex Pass
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. :)

Comments

  • jamjam Plex Dev Team Posts: 4,303Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    Because that's way too complicated/"techie" for the average user to set up :) 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!
  • SleepwalkerSleepwalker Posts: 69Members, Plex Pass Plex Pass
    I don't know how hard it would be to install on Mac, but on Windows and Linux it wouldn't be a problem. :)
    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. :)
  • elanelan CTO and Co-founder MauiPosts: 6,981Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    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.

    instagram @elan // the wife's photography site.
    the Medium page // the dog's twitter feed.

  • SleepwalkerSleepwalker Posts: 69Members, Plex Pass Plex Pass
    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.
  • Mr.TwisterMr.Twister Posts: 12Members
    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.
  • elanelan CTO and Co-founder MauiPosts: 6,981Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    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:

    SLOW QUERY: It took X ms to retrieve Y items
    

    instagram @elan // the wife's photography site.
    the Medium page // the dog's twitter feed.

  • mauirixxxmauirixxx Posts: 156Members, Plex Pass Plex Pass
    Thread necromancy! :D

    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 :D
    -- mauirixxx
    Linux - Unofficial CentOS 6 install instructions - step by step!
    WIndows - Easy edit your hosts file to resolve localhost to 127.0.0.1 - only needed if you time out trying to manage your Plex server locally in Windows Vista / 7 and http://localhost:32400/manage keeps timing out!

    TV Shows getting listed wrong?
    Verify your files are named per the Plex Media Server guide - if they're not, use FileBot to quickly and painlessly rename your media into a format Plex Media Server recommends!
  • pcmercpcmerc Posts: 15Members, Plex Pass Plex Pass

    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.

Sign In or Register to comment.