Jump to content

Emby Resources


Sireone
Go to solution Solved by Sireone,

Recommended Posts

Sireone

So I finally got my library scan to finish (After 7 hours!).  I'm running my Ubuntu 16.04 Emby server on a Hyper-V VM. When I had it set to 4GB RAM, it would crash on a library scan after about 45mins.  This was because it would run out of RAM every time.  I tried many things including upgrading from Ubuntu 15.10 to 16.04, then Mono 4.2.1 to now 4.4.2.  Then I finally said, if its running out of RAM....just add more!  I then set the VM to 2GB of initial RAM and up to 8GB of Dynamic RAM. This allowed the scan to finish.  The next day, while the server was still operational, I noticed that it would still fill up, all 8GB used!  So there still something causing Emby to use so much RAM.  I've read on other posts that they've seen Emby consume about 512MB RAM.

 

Below is a screenshot of what the processes looked like with 4GB RAM.  It's similar when 8GB is being used.  Are there supposed to be so many mono-sgen processes spawned?

 

Also attached the server log when scanned for over 7 hours.  Maybe someone can see what it's actually doing for so long.

 

 

ServerLog.txt

post-82161-0-81677200-1472387889_thumb.jpg

Link to comment
Share on other sites

Hi, welcome. Can you please try removing plugins and seeing if the issue persists with the core server? thanks!

Link to comment
Share on other sites

Sireone

Hi, welcome. Can you please try removing plugins and seeing if the issue persists with the core server? thanks!

 

All plugins removed..same issue.  This is one hour in...

ServerLog2.txt

post-82161-0-56868000-1472410205_thumb.jpg

Link to comment
Share on other sites

Sireone

Luke, is there any reason why so many mono-sgen processes are spawned?  My next scan took almost 8 hours to run, with no plugins installed. Is there any advanced debugging that can be enabled so I can assist in troubleshooting?  This can't be normal.

post-82161-0-82695900-1472468101_thumb.jpg

ServerLog3.txt

Link to comment
Share on other sites

Sireone

That's the mono garbage collector.

 

Can this be tweaked for better performance?  I've seen other threads where some people modified the following.  I think my environment is set to 250/128 respectfully.

 

MONO_THREADS_PER_CPU="500",MONO_GC_PARAMS="nursery-size=512m"

 

Thoughts?  I'm dying here.  Scans are now taking 7+ hours and often still crashes.

 

-Devon

Link to comment
Share on other sites

  • 2 weeks later...

There's definitely something wrong with Emby and Mono 4.4.2.  I've done everything I can think of and this server is still not running right.  I've completely removed/re-installed Mono and Emby, same results.  Scans are taking 4+ hours (Really?).  Mono is taking up way too much RAM.  When the system is idle (no current scheduled tasks running or media playing), Emby/Mono is using 70%+ RAM (Why?).  Response from the web console is extremely slow when trying to display the My Media page (I get the spinning circle for minutes before anything shows up.  I checked the size of the library.db file, 3GB+ (is this normal?),  I'm out of ideas and have no clue what to try next.

post-82161-0-69316300-1473524028_thumb.jpg

Link to comment
Share on other sites

  • 3 weeks later...

So in an effort to get to the bottom of what's going on with Emby, I decided to move my setup from a Ubuntu 16.04 VM to Windows 2012 R2 server with 16GB RAM and an AMD 8-core FX Processor.  I know my hardware can handle Emby, but not for the life of me can I figure out why it has to use so much RAM and CPU.  My library consists of about 1500 movies (in a single folder) and 2500 tv shows (folder per series). All running on my Synology DS413 NAS.  

 

When I run a library scan, it takes over two hours (4+ on Linux), every time.  Now, when I look the CPU/RAM usage, it's absurd!  7GB+ RAM? What exactly is Emby doing?

 

I've installed Emby 5 times from scratch on different hardware so I'm now leading towards it being software related.

 

In contrast, my Plex install (on the same server, pointing at the same sources) doesn't even use more than 70MB of RAM.  And it's been running for more than a month.  When I add movies, Plex finds it in less than a minute (Emby 2+ hours).

 

See the below screenshot as well as my latest server log.

 

Help!!!

 

-Devon

post-82161-0-78318400-1475102237_thumb.jpg

Log.txt

Link to comment
Share on other sites

  • Solution

Solved!!!!

 

So it seems that the reason why Emby was grabbing so much RAM was because I had a folder in my movie share called extrafanart with over 6000+ images and 3GB+ in size.  For some reason, it seems that library scans was parsing this folder and retaining this in RAM.  I've since deleted this folder and now Emby uses about 500MB RAM and scans in about 44 minutes (Not great, but better).  It was probably the same issue when I was running under Ubuntu and Mono grabbing all those resources.

 

Now, I'm going to want it enable this in the future with my Kodi setup, so I'm wondering if there's a way to exclude these subfolders from scanning my movie share?

 

Thoughts?

 

-Devon

  • Like 1
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...