Jump to content
dcrdev

MySQL Support

Recommended Posts

drashna

Also this would allow to spread the work load. My current setup is not capable of properly transcoding more than 3 streams at the same time on full HD, unfortunately this creates some friction in my house hold. I have the hardware laying around to setup a second server an increase to 6 streams and I already have a SQL server setup for other purposes.

 

Because I haven't seen anyone address it.... 

 

Transcoding to multiple clients and the SQL backend have nothing to do with each other. And changing it WILL NOT help with streaming. 

 

If you're having issues transcoding, it's a completely hardware issue. You need more processing power, and likely more cores.  Not a better backend for SQL.   In fact, changing the backend would only add to the issue. 

 

Personally, I had this same issue, until I moved to a dedicated server (as my storage server is running too much, and has some weird performance issues).  (a Xeon X5660, if you're curious).  I went from being able to do 2-3 streams at most, to ... well, never using more than 50% of the CPU. 

 

 

If you're having an issue with transcoding, throw a better CPU at the issue and it will solve the problem.  

 

 

 

 

Though, I do agree with the better reporting.  That would be nice.  A per user, historical report of what they've watched, what was transcoded or direct played, how much data has been uploaded/streamed, etc. 

Share this post


Link to post
Share on other sites
pir8radio

Because I haven't seen anyone address it.... 

 

Transcoding to multiple clients and the SQL backend have nothing to do with each other. And changing it WILL NOT help with streaming. 

 

If you're having issues transcoding, it's a completely hardware issue. You need more processing power, and likely more cores.  Not a better backend for SQL.   In fact, changing the backend would only add to the issue. 

 

Personally, I had this same issue, until I moved to a dedicated server (as my storage server is running too much, and has some weird performance issues).  (a Xeon X5660, if you're curious).  I went from being able to do 2-3 streams at most, to ... well, never using more than 50% of the CPU. 

 

 

If you're having an issue with transcoding, throw a better CPU at the issue and it will solve the problem.  

 

 

 

 

Though, I do agree with the better reporting.  That would be nice.  A per user, historical report of what they've watched, what was transcoded or direct played, how much data has been uploaded/streamed, etc. 

 

I think that user was just saying with mysql as a database that can be put on one server and multiple crappy hardware boxes could then use that database as one load balanced emby server to server more streams from multiple PC's...   Because he had a bunch of cheap pc's laying around, he would not have to buy a beefy server that could serve the equal amount of streams...     

Share this post


Link to post
Share on other sites
Dibbes

I think that user was just saying with mysql as a database that can be put on one server and multiple crappy hardware boxes could then use that database as one load balanced emby server to server more streams from multiple PC's...   Because he had a bunch of cheap pc's laying around, he would not have to buy a beefy server that could serve the equal amount of streams...     

 

Pretty much, yes... 

Share this post


Link to post
Share on other sites
Dibbes

bump

Share this post


Link to post
Share on other sites
muhfugen

I'd personally take any external SQL server support. Although if the devs do plan on implementing this, if possible it would be nice if it could be done in a vendor neutral way so it could be ran other SQL servers as well such as Microsoft SQL Server. It would also be a step towards having some high availability.

Edited by muhfugen

Share this post


Link to post
Share on other sites
quickmic

I'm also supporting this feature request

Share this post


Link to post
Share on other sites
Sven

That's indeed something we plan to do in the future...

But no planning yet...

Share this post


Link to post
Share on other sites
godfuture

any news with that topic?

Share this post


Link to post
Share on other sites
Luke

It's possible for the future, thanks.

Share this post


Link to post
Share on other sites
Luke

Why do you feel that you need it?

Share this post


Link to post
Share on other sites
BaconFeet

Docker swarm load balancing

Edited by BaconFeet
  • Like 1

Share this post


Link to post
Share on other sites
Dibbes

Multiple server access to the same database...

 

What I´d like to do is use different devices as server, depending on the material that´s hosted. For example, I have a Synology 412+, which is perfect for books, audiobooks, comics and music, but would fail miserably for 1080p encoding.

 

Tehn I´m using a 418Play for the kids to watch their cartoons, etc. on. The play is perfect for this when streaming to tablets, but does hiccup so once in a while to the Apple TV or Samsung TV, especially with subtitles. When that happens, a possibility to switch immediately to the main server when at home, would be nice.

 

Then, I have my current 8-core, 16GB RAM, 240GB SSD, 4 x 1 TB normal drives, Windows 2016 Server powered by a 800Watt supply. It serves multiple streams to various devices at the same time and does the job nicely.

 

Now, honestly, running 800W continuously is overkill for MP3/books and it does consume a lot of power, especially when not at home. The 412+ is a lot cheaper to run. The reason I´d like a shared database though is that I will use the normal server for livingroom entertainment, which includes MP3. I´d like to have music on when scrolling through movies/series, which means it has to be connected to the same server and, lastly, I wouldn´t have to mark the music as played manually on the main server.

 

Also, though this is a little more of a server integration issue I suppose, I´d like to see what´s playing on the same page from all the servers at once.

Edited by Dibbes

Share this post


Link to post
Share on other sites
Darkstyrm

Just adding my +1 vote to this. I am rooting for Microsoft SQL server.

 

Not a high priority for me though. It's more nerding out and possibly doing some reporting and scripting against the database, activity, creating alerts, and automation with the backend data.

 

On an unrelated note.. Also throwing out that uservoice is great for feedback and feature requests management :) just hate when there is a low limit amount of votes. But I'm sure this has already been looked at/suggested already.

Share this post


Link to post
Share on other sites
sfatula

I would love to see MySQL support (or Mariadb) as well, however, given the amount of other requests out there, I would not vote for this despite the fact I would love it. Would be able to easily do realtime replication, etc. Add some database triggers to do stuff I want it to do without modifying the code, etc. All that would indeed be great, however, I am sure this would be useful for a vast minority of users. 

Share this post


Link to post
Share on other sites
HeWhoWas

Throwing my 2c in: I run Emby on Kubernetes on top of odroid boards, which support hardware encoding but are limited to one transcode at a time. Being able to load balance requests across multiple containers would let me leverage the multiple encoders that are in the cluster.

Share this post


Link to post
Share on other sites
cayars

Besides things already mentioned I would love this because it would make running custom SQL very easy to do.

For example what Movies are available to be recorded with the DVR that I don't already have?

What movies are available on an HD channel that I only have an SD version of?

Same with recording/upgrading TV episodes.

What EPG listings have "Eagles", "Patriots" or even NFL in the title, description, etc

Same with Phillies, Flyers, 76ers or any sports team

How about finding all March Madness games

How about looking for missing episodes of TV Shows against the EPG listing based on "title" vs the season/episode number since the EPG often uses different Season/Episode numbering then the online meta-providers used by Emby which is a conflict.

I could go on a few pages with things like this I'd use direct DB access to accomplish.

 

Technically, this could all be done right now using Sqlite but the DB is locked while Emby is running so it's a no go.

Sure things like this could be done via a plugin but running pure SQL is so much easier for this type of thing and it makes for a lot of easy automation.

  • Like 1

Share this post


Link to post
Share on other sites
ebr

Besides things already mentioned I would love this because it would make running custom SQL very easy to do.

For example what Movies are available to be recorded with the DVR that I don't already have?

What movies are available on an HD channel that I only have an SD version of?

Same with recording/upgrading TV episodes.

What EPG listings have "Eagles", "Patriots" or even NFL in the title, description, etc

Same with Phillies, Flyers, 76ers or any sports team

How about finding all March Madness games

How about looking for missing episodes of TV Shows against the EPG listing based on "title" vs the season/episode number since the EPG often uses different Season/Episode numbering then the online meta-providers used by Emby which is a conflict.

I could go on a few pages with things like this I'd use direct DB access to accomplish.

 

Technically, this could all be done right now using Sqlite but the DB is locked while Emby is running so it's a no go.

Sure things like this could be done via a plugin but running pure SQL is so much easier for this type of thing and it makes for a lot of easy automation.

 

I just want to mention again that none of that is related to the actual database implementation.  IOW - switching to MySQL instead of SQLite would not guarantee any of that is any easier.  As you pointed out, this is simply due to a performance optimization we have implemented which gives us exclusive access to the DB.

 

What you are asking for is concurrent access to the database which is not really related to the actual database implementation and is potentially a much more involved task than simply supporting a different back end implementation.

 

That is just to say that simply implementing a different database will not yield most of the things people are asking for in this thread.

 

Also, you could easily take a snapshot of your database once a day and use that for these types of informational queries :).  That would be a much safer approach to such a thing regardless of the back end in use.

Share this post


Link to post
Share on other sites
cayars

Spoken from a POWER USER so keep this in mind.

 

It would come "automatically" by switching to any real relational database as they are built from the ground up to work this way (concurrent multi user use).

You would have to go out of your way to run the DB is any type of exclusive mode which is generally a NO NO as this is reserved for "administrative" type use.

When doing this, many DBs don't even give you full relational ability as they aren't made to run this way.

 

I've spent most of my career working on high end DB systems from PCs to Mids to Mainframes and clusters of those and doing massive rewrites of fortune 50 systems to switch DBs and technologies, so I'm very well versed in most things SQL/DB related. So yea, my "wish" is for a slightly different/selfish reason but I still agree with what everyone else has said as well.

 

I'd disagree with your statement about changing DBs not allowing the yield people have talked about in the thread which include:

 

  • Multiple server access to the same database (highly possible even without any core Emby changes other then supporting a true relational database). Worst case is minimal changes would be needed.
  • Load Balancing setups of above for performance needs or redundancy for those that need it
  • Moving DB functions to a dedicated server for much faster processing
  • Easy DB backup
  • Realtime Replication
  • Better allocated resources using multiple computers
  • Much higher performance on adequate hardware
  • More scalability of the platform in general
  • Much broader 3rd party tool use
Not knocking SQLite by any means, but it's a "toy DB" compared to much bigger true relational DBs.  It just can't compare to the performance you can get from other DBs or the scalibility/flexibility they offer.  This of course isn't for everyone but is nice to have if needed/wanted.
 
I certainly would not advocate switching completely over from SQLite as the default because it works, but it has limits and my system is pushing this already.  I can feel my system slow down and even stutter these days when doing EPG upgrades, or when another client is pulling back big lists of info even though I keep it optimized and already run my system on a i7 with multiple SSDs.  For people who want the highest level of performance or have special needs, being able to switch DB platforms would be a blessing.
 
I have mixed feelings about this in general however, because I know it could open up a can of worms for support which does need to be taken into consideration but at the same time would allow Emby to overnight become so much more powerful as well that it would leave the competition in the dust on the scalability front.
 
I certainly wouldn't "rank" this type of change above the LiveTV/DVR stuff that's been talked about as that would be a whole lot more important across the board but would rank it a close second. :)
 
But as stated in the first line this is from a power user and my "niche" environment.
  • Like 3

Share this post


Link to post
Share on other sites
ebr

I have mixed feelings about this in general however, because I know it could open up a can of worms for support which does need to be taken into consideration but at the same time would allow Emby to overnight become so much more powerful as well that it would leave the competition in the dust on the scalability front.

 

Yes, we would instantly become the "go-to" platform for every commercial VoD provider out there... ;)

 

Creating a completely scale-able, enterprise-ready version of Emby Server would be very cool but it would not (greatly) benefit 95% of true Personal Media Server implementations and it would mean we would have to take an entirely new step as a company in targeting more enterprise-level applications and would probably also mean a different level of product (Emby Enterprise, say).  This is something we very well may do in the future but, right now, we are continuing to focus on the true personal server implementations.

Share this post


Link to post
Share on other sites
cayars

Yes, we would instantly become the "go-to" platform for every commercial VoD provider out there... ;)

Me thinks you already have that following already. They know the better platform to use. :)

Creating a completely scale-able, enterprise-ready version of Emby Server would be very cool but it would not (greatly) benefit 95% of true Personal Media Server implementations and it would mean we would have to take an entirely new step as a company in targeting more enterprise-level applications and would probably also mean a different level of product (Emby Enterprise, say).  This is something we very well may do in the future but, right now, we are continuing to focus on the true personal server implementations.

Yea, I don't think anyone is asking for Emby to go full enterprise in features, just the ability to use a real relational sql database.

Many of the things I listed would be possible a lot easier just from having this.

 

This is a feature request like any other so maybe one day with enough votes... LOL

  • Like 1

Share this post


Link to post
Share on other sites
Dibbes

Yes, we would instantly become the "go-to" platform for every commercial VoD provider out there... ;)

 

Creating a completely scale-able, enterprise-ready version of Emby Server would be very cool but it would not (greatly) benefit 95% of true Personal Media Server implementations and it would mean we would have to take an entirely new step as a company in targeting more enterprise-level applications and would probably also mean a different level of product (Emby Enterprise, say).  This is something we very well may do in the future but, right now, we are continuing to focus on the true personal server implementations.

I hope you won't miss the boat at that point, as so many other soft- and hardware companies have. Even Microsoft lost billions thinking exactly like this... Emby is a very good product with lots and lots of possibilities, but, unless the path includes selling the company sooner rather than later, at one point soon you are going to have to take the leap to larger audiences.

Share this post


Link to post
Share on other sites
ebr

I hope you won't miss the boat at that point, as so many other soft- and hardware companies have. Even Microsoft lost billions thinking exactly like this... Emby is a very good product with lots and lots of possibilities, but, unless the path includes selling the company sooner rather than later, at one point soon you are going to have to take the leap to larger audiences.

 

And many, many companies have drowned by trying to take on too much too soon.  We want to stay in our main lane and address our core audience (Personal Media Servers) right now.  Who knows what the future holds but, right now, we still have a lot of work to do for just that audience.

  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...