Jump to content

Performance Improvements


G1zm0

Recommended Posts

G1zm0

I'm using EmbyServer on my Synology (DS1815+ with 6GB RAM ).

So far so good.

But my database is getting bigger as time progresses.
I was wondering if I can improve the performance.

Just opening "Home screen" on one of my devices takes a long time.
One tip once mentioned is placing the db on a SSD. My library.db is 261.452 KB

 

For my synology I was thinking placing this on an external usb stick.
When looking through the folders I saw all the data in the folder /volume1/@appstore/EmbyServer/var/data/.

Is it wise and will it improve the performace if I place this folder with a symlink on an usb stick??

 

Thnx

Link to comment
Share on other sites

G1zm0

Hi @Luke,

 

It is difficult to to report a problem when there is no real problem to report.
The response time of my Synology DS1815+ is slow, because I have one volume on WD Red HDDs, not a fast SSD
There are no errors in the log, the hardware is just slow.

I have no problems streaming my media to the various clients
 

Maybe @solabc1 has some tips how to improve the database performance?
I can add a log if you want, there is just not much to see.

Link to comment
Share on other sites

G1zm0

If I move all the data in the folder /volume1/@appstore/EmbyServer/var/data/ with a symlink on an usb stick, will this improve the performance on my synology?
And has this consequences for the updating/upgrading process.

Link to comment
Share on other sites

I guess it depends on the I/O performance of the USB stick vs the internal drive.

Link to comment
Share on other sites

G1zm0

And the upgrade process?

BTW: I placed the folder on the stick and the volume is less busy, the drives are cooler and the interface is more responsive.

Edited by G1zm0
Link to comment
Share on other sites

mikeraburn

@@G1zm0

What device are you using to play from your Synology?

I am using a Roku Ultra?

 

The stick idea has my interest.

 

Sent from my SM-T560NU using Tapatalk

Link to comment
Share on other sites

G1zm0

@Luke
 upgraded yesterday to Version 3.2.20.0 without any problems.

 

@mikeraburn

I stream to a mix of devices: Android phone or WIN10 Laptop with Emby Theatre or Kodi
I have an Ipad, that need transcoding sometimes. I use a MXIII with Kodi at home and at my sisters place and a MII3 with Kodi at my brothers place.

Usually it are all direct streams or direct play. My Synology DS1815+ can handle without any problems 4 streams or more, I did upgraded the standard RAM from 2 to 6 GB to be safe.

 

Edit: Important fact:my content is usually 720p h264

Edited by G1zm0
Link to comment
Share on other sites

  • 2 weeks later...
Dewey80

Hey @@G1zm0,

 

I'm interested in setting up something similar... how did you go about moving the database folder to the usb?

 

I'm running into a bit of a snag trying to move the ~/var/data/ folder out of volume1 ahead of creating the symlink; its permissions are set to the embysrv user and that user has no access to telnet/SSH, so stuck in a bit of a catch-22... I was looking at doing a sudo su chmod to give my admin account permission to move it but seemed to have stuffed it up somehow... I'm a bit of linux novice  :wacko:

 

Any brief explanation on the steps you took would be very helpful!

 

Thx, D

Link to comment
Share on other sites

Marcel1808
Hi @@G1zm0,

 

many thanks for your effort.

Could you please describe how this works with the symlink on the diskstation.

How do I get to the folder / volume1 / @@Appstore / EmbyServer / var / data /?

Currently I have an SSD connected to the E-SATA.

I would like to copy the database.

I would be very glad about a help position.

Thanks and greetings from Germany,

 

Marcel

Link to comment
Share on other sites

G1zm0

@Dewey80 @Marchel1808

 

Ok, this is a little tricky of you are not so familiair with command line interfaces.

In general this is what I did:

1. Shutdown Emby Server on your Synology from the Package Centre

should be easy

2. Login with Putty on your NAS. This is the difficult part.

Enable SSH on your NAS. Control Panel -> Teminal & SNMP -> Enable SSH service

 

In Putty typ the Hostname (or IP address) of your NAS

Port is default 22, but I have a different one for security reasons.

When logged in elevated your acces with

sudo -i
You'll be asked for the root password. That is the password for the "admin" account.

This account should be disabled (for security), but you can use it like this.

Go to the folder

cd /volume1/@appstore/EmbyServer/var/data/
3. Copy the folder to the USB-stick

 

Make sure you know the correct path!!, this can vary for every USB-stick.

It can be /volumeUSB2/usbshare/ or /volumeUSB-1/usbshare/, check this!

I created a folder named "Emby" on the stick, that is were I've put the data-folder in.

This is the copy command

cp -R /volume1/@appstore/EmbyServer/var/data/ /volumeUSB1/usbshare/Emby/data/
Be aware, this folder is BIG, it can take a while!

4. Rename the old folder

mv /volume1/@appstore/EmbyServer/var/data /volume1/@appstore/EmbyServer/var/data_old
5. Create a symlink to the folder on the USB-stick

ln -s /volumeUSB1/usbshare/Emby/data /volume1/@appstore/EmbyServer/var/data
6. Give Emby rights to the folder
chown -R embysvr /volumeUSB1/usbshare/Emby/data/
7. Restart Emby on your Synology from the Package Centre

8. If everything works remove old folder

rm -rf /volume1/@appstore/EmbyServer/var/data_old
Especially the trick logging in your NAS using SSH is difficult if you've never done this before.

Google this first, watch some tutorials on YouTube.

Be carefull, you can mess up your complete NAS of you don't know what you are doing.

I don't take responsibility If I made a mistake somewhere.

 

edit: fixed some typo's by suggestion from @@Dewey80

Edited by G1zm0
  • Like 6
Link to comment
Share on other sites

Dewey80

Hey @@G1zm0

 

Thanks so much for the super detailed step-through! More than I was expecting, thanks for taking the time  :D  really helped for a linux novice like myself!!

 

Just a few corrections to the above should @Marchel1808 or anyone else wish to also do this.

 

Step 3: I needed to add a -R option to get it to copy

cp -R /volume1/@appstore/EmbyServer/var/data/ /volumeUSB1/usbshare/Emby/data/

Step 5: I needed to remove the / at the end to link the folder

ln -s /volumeUSB1/usbshare/Emby/data /volume1/@appstore/EmbyServer/var/data

 

Step 6: Slight typo in the user

chown -R embysvr /volumeUSB1/usbshare/Emby/data/

Everything is up and running, and hopefully I now see a performance improvement  :ph34r:

 

Cheers mate,

Dewey

Edited by Dewey80
  • Like 4
Link to comment
Share on other sites

Marcel1808

Hey @@G1zm0 & @@Dewey80

 

Thanks for the detailed instructions.
I had tried it on the weekend already but it did not quite work with my knowledge.
But by the instructions and the corrections of @@Dewey80 it runs super!
My wife and children are happy, the Emby on my DS716-II finally running fast.
Thanks to you!
Amazing  :D
 
Greetings from Germany,
Marcel
Edited by Marcel1808
Link to comment
Share on other sites

barat

Hmm .. this thing sounds nice ... any pendrive recommendations? I assume, that mostly read speed and access time is important?

 

BTW. Isn't this equal to changing "Cache path" under Advanced Emby settings?

Link to comment
Share on other sites

G1zm0

@@barat

I have a known brand that is fast and reliable  as my pen drive. I don't want a cheap drive that will fail on me when I most need it.

And it is not the same as changing the "cache path", because you only change the path to the database folder and it's content.
The path to the cache is still the same.

Link to comment
Share on other sites

  • 1 month later...

Yeah I must say, @@G1zm0's method does work.

 

Emby became very very sluggish as of late. Whenever browsing to the home screen I would need to wait several minutes sometimes just for the home screen to load. I could hear how the disks in my NAS were working. I am not sure what would cause this behavior. My volume on the NAS is 93% full - perhaps the HDDs just get sluggish as they become more full.

 

I grabbed a Sandisk Ultra Dual drive that I was not using. I did not want to use up my only USB 3.0 port on the front of the NAS so I ended up plugging the flash drive into one of the USB 2.0 ports in the back. After running the commands in @@G1zm0's post and restarting Emby, I definitely did see a performance improvement. Emby is a lot more snappy, which is great.

 

This got me thinking, perhaps more can be moved to the flash drive, like metadata (images)? I think I will try that one of these days, however all metadata currently resides next to my media, not in the Emby build in metadata folder, so first I would need to start using the metadata folder.

 

Anyway, thank you @@G1zm0!

Link to comment
Share on other sites

  • 1 year later...
dnoronha

bumping this thread for visibility.

 

I'm running a DS1813+  with Emby Server v. 3.6.0.82.

 

I heard some good things about emby, decided to install this on my synology 1813+.  From day 1 the user interface was slow and not usable (roughly 45 seconds to load pages)

I attempted to install the latest beta (3.6.0.82, the performance improved marginally but load times were still not usable - ie. click a page... grab coffee.. come back.. it's loaded)

 

Performing the change @@G1zm0 suggested resolved most if not all load time issues.

This may be inherently the way the synology is setup.

 

In any case  thanks @G1zmo your solution resolved my issue and has made my emby experience that much better!

 

Daniel

Link to comment
Share on other sites

  • 4 weeks later...
majorsl

As a Synology 1817+ owner, I'd like to toss out that if you have a spare bay (or the dedicated cache card slot) you can add a read-only cache drive that does about the same thing while also preserving the location and redundancy of the database on the RAID volume.

 

I'm watching my real-time hit rate for the cache as I'm loading tv/movie directories with the Emby client and my hit rate is 60-90%, so I'm not seeing this slowness.

 

I'm sure that still isn't quite as fast as a dedicated flash as described here, but it is definitely better than on spinning drives without any tweaking to do.

 

Plus, with a decent sized read-cache SSD you're going to benefit with other services you're running on the Synology - not just Emby.

Edited by majorsl
Link to comment
Share on other sites

solabc16

Thanks for the information @@majorsl, it's a good point and a good option for those with capable systems.

 

Between now and the next stable I'm going to review the basis for this thread in more detail.

 

Emby Server's demands really aren't (or shouldn't be) such that we need to get this innovative as far as library browsing and general navigating is concerned; especially on more recent platforms,

 

Transcoding is of course a different animal.

 

Best

- James

Link to comment
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...