Jump to content

Emby server memory usage


parrish

Recommended Posts

TheKamakaZi

@@TheKamakaZi can you please post some of the info like in this post https://emby.media/community/index.php?/topic/49196-emby-server-memory-usage/?p=482919 So we can start trying to find a pattern.

 

You mean like this:

 

Hi guys,

 

Thought I would throw my hat into the ring.

 

Running Emby (3.2.30.0) docker on FreeNAS 10.0.4 (yes, Corral, but once I got used to it, it's not so bad). 

Host is a boot2docker VM with 3GB RAM, and 2 cores.

Server is an HP Gen9 MicroServer running a Celeron G1610T with 16GB RAM, and 5x 6TB IronWolf HDDs.

My library is rather extensive: 800 Movies, 8970 Episodes, 3267 songs.

 

Chapter image extraction is enabled on scanning. DLNA server still enabled with Blast Alive messages.

No external tuner, no instances of Emby for Kodi, no plugins installed, no Live TV as yet. 

 

I have been keeping an eye on the mono-sgen process' memory usage the past few days, and in the past 4 days since the last reboot, it has risen to 1.142GB RAM consumed.

 

Just restarted, and immediate memory usage after startup is ~282MB. Will continue to monitor and update on my findings.

 
Link to comment
Share on other sites

revengineer
 

Following @@dcook example, my info is shown below. I DO have a memory leak issue. On day 5, I have reached 1.25 GB. Growth is between 100 and 300 MB per day, it seems depending upon use. It seems like is higher when HD Homerun TV tuner was used to record or watch life TV. 

 

Virtual Machine?: NO

OS: Windows Server 2012 64bit

CPU: Intel Core i3 2100T @ 2.5 GHz

GPU: intel onboard graphics

RAM: 12 GB

Drive type Emby/OS Is installed on: SSD

 

Media Storage Location: Internal HDD WD Blue 2 TB

 

Emby Version: 3.2.29.0 Stable (but memory leak issues date back to when I started using emby a couple of years ago)

Emby Meta Data Storage: NOT saved to media folder

Emby DLNA: Disabled (everything unchecked)

Emby Plugins in use: Coverart, Server Config Backup, Trailers, Folder Sync, email notifications, auto organize (only first 3 have been in use since I first installed emby.

Emby Live TV Tuner: HD Homerun

Emby Live TV Guide Provider: Schedules Direct

Emby Live TV Recordings Scheduled: As needed but typically not more than 1/day.

 

-Download images in advance is CHECKED

-Enable real time monitoring is UNCHECKED

-Enable chapter image extraction is UNCHECKED

-Download subtitles: Movies subtitles English, German

-Hardware acceleration: NONE

-Enable automatic port mapping is UNCHECKED

 

 

Media Info:

MP3: 0

Movies: 700

TV Series: 2

TV Episodes: 20

Total Media Library Size: 1.5 TB 

 

Client Devices used to watch: Roku4, Roku2, Android app, FireTV app

Link to comment
Share on other sites

RedBaron164

After disabling DLNA and Automatic Port Mapping and rebooting the server yesterday my Memory usage is still climbing, after less than 24 hours it was up over 1gb.

 

I believe I have finally found something that allows me to reproduce this issue quickly, instead of waiting for 3 days. I started to notice that every time I would connect with a Client the memory usage would increase. But after I close the client the memory usage on the server doesn't drop. So I restarted the Emby server and then I launched Chrome from a different computer, connected to the site, then closed and relaunched Chrome and reconnected to the site several times over the course of 15 minutes and drove the memory usage up from 200mb up to 600mb. It also appeared that the more browsing I do through my music/movies/etc the faster the memory usage grew. After this test I closed all my clients and waited to see if the memory usage would drop and after about 30 minutes it did eventually go down to about 400mb. Then I launched a client again and it shot back up to 650mb and hasn't gone back down. Hopefully this can be reproduced by other users and proves helpful. I attached the server log from this morning in case it's useful.

 

 

System Info for comparison:

 

Virtual Machine?: Yes
Hypervisor: Hyper-V 2012 R2
OS: Windows Server 2012 R2 64bit
Windows Updates: Fully up to date
CPU: AMD Opteron 6272
GPU: onboard graphics
RAM: 4 GB
Drive type OS Is installed on a VHD sitting on a RAID array, Emby database/logs are on a VHD on a secondary SSD
Age of install: 2+ years
Media Storage Location: Separate Windows 2012 R2 Server
 
Emby Version: 3.2.30.0 Stable
Emby Running as a Service: Yes
Emby Meta Data Storage: Saved to media folder
Emby DLNA: Disabled (everything unchecked)
Emby Plugins in use: Server Config Backup, Trailers, Rotten Tomatoes Reviews
Emby Live TV Tuner: Two HD Homerun Connect Tuners
Emby Live TV Guide Provider: Schedules Direct
Emby Live TV Recordings Scheduled: Currently 1 or 2 a day, new seasons have not started yet
 
-Download images in advance is CHECKED
-Enable real time monitoring is CHECKED
-Enable chapter image extraction is UNCHECKED
-Download subtitles: Unchecked
-Hardware acceleration: Video Acceleration API (VA API)
-Enable automatic port mapping is UNCHECKED
 
 
Media Info:
MP3: 27308
Movies: 1386
TV Series: 139
TV Episodes: 11517
Total Media Library Size: 8 TB 
 
Library.db size: 782mb
 
Client Devices used to watch (In Order of usage, highest to lowest): Web App (Via Chrome), FireTV app, Windows 10 App, Emby Theater

 

 

server-63639852256.txt

Link to comment
Share on other sites

PenkethBoy

Suggestion as a test - to those affected - try shutting down your homerun's for a couple of days and reboot the server after switching the HD off - so you have a clean start.

Link to comment
Share on other sites

PenkethBoy

@@RedBaron164 - what you are describing is caching on the server - and it will hang on to that for a period - just in case you come back "quickly"

 

OPened 6 Chrome browser windows - browsed around on each - server memory went up by 50mb total - waiting on it dropping back below 400MB

 

There could still be a leak element in that but as you ram usage went back to the rest level of ~400mb - maybe not

Link to comment
Share on other sites

RedBaron164

@@PenkethBoy - Yeah just thought it was worth mentioning, closest I've gotten to seeing anything causing a significant memory increase. I enabled debug logging to see if it shows anything extra.

Link to comment
Share on other sites

jnheinz

@@RedBaron164 - We brought this up very early on.  We believed there was a link to visiting the Emby Server Dashboard & the memory leak.  It may be wider than just the Dashboard, but I believe the web server is a good candidate.  We suggested the people affected may be those who tinker around with or leave the web interface up all the time.

 

Here is my data ->

 

Virtual Machine?: Yes
Hypervisor: Originally VMware ESXi 6.0, now migrated to KVM for troubleshooting
OS: Windows Server 2012 R2
Windows Updates: Up to date within 6 months
CPU: Originally Intel Atom C2758, now AMD FX-8320E
GPU: VM/Emulated
RAM: 4GB (32GB available on hypervisor)
Drive type: SSD
Age of install: ~1 1/2 years
Media Storage Location: 4U Whitebox Server running UnRAID 6.2.3, serving media content via SMB.
 
Emby Version: 3.2.29.0 Stable
Emby Running as a Service: Yes
Emby Meta Data Storage: Saved to media folder
Emby DLNA: Disabled (everything unchecked)
Emby Plugins in use: Server Config Backup, Emby Kodi Sync Queue, Rotten Tomatoes Reviews, PushBullet Notifications, Podcasts
Emby Live TV Tuner: None (removed HDHomeRun)
Emby Live TV Guide Provider: None
Emby Live TV Recordings Scheduled: None
 
-Download images in advance is CHECKED
-Enable real time monitoring is CHECKED
-Enable chapter image extraction is CHECKED
-Download subtitles: Movies & Shows, English, perfect match only.
-Hardware acceleration: None
-Enable automatic port mapping is UNCHECKED
 
 
Media Info:
MP3: ~300
Movies: ~1700
TV Series: ~90
TV Episodes: ~10000
Total Media Library Size: ~20TB 
 
 
 
Client Devices used to watch (In Order of usage, highest to lowest): NVIDIA Shield running SPMC 16.7 (Emby for Kodi), Fire TV Stick running SPMC 16.6 (Emby for Kodi), Roku Stick (Blue Neon Night), Roku 2 (Blue Neon Night), Fire TV running SPMC 16.6 (Emby for Kodi)
Link to comment
Share on other sites

jnheinz

Additionally, some people are claiming 1GB+ is normal.  Some people claim 400-500MB is normal.  Can a developer provide feedback on this?  What is normal for an idling Emby Server?  @@Luke @@Sven

Link to comment
Share on other sites

RedBaron164

@@jnheinz Ok, I apparently missed that, as I would definitely fall into that category. I'm going to be keeping it closed and try to avoid using the web interface for a few days and see how the memory usage is effected.

Link to comment
Share on other sites

Untoten

Went to 15gb in less than 12 hours now.  Month and a half of this, it's now unusable, what was the last stable version?  I am going to have to reinstall from scratch.

@@Luke, how do I downgrade/find the old Exe?

Link to comment
Share on other sites

Went to 15gb in less than 12 hours now.  Month and a half of this, it's now unusable, what was the last stable version?  I am going to have to reinstall from scratch.

 

@@Luke, how do I downgrade/find the old Exe?

 

If you are using 15GB of RAM in 12 hours you have some serious problems.

 

I suggest you remove all plugins, tuners, and anything else custom you have.

 

I have been running Emby for almost 2 years now and have never had memory issues like you are describing, so it must be something else on your system causing the problem.

Link to comment
Share on other sites

TheKamakaZi

Server seems to be holding steady at 1.286GB. 

 

No activity on the server since this morning.

 

I did have a thought, though. What happens when you limit the mono process' garbage collector memory size using something like 

setenv MONO_GC_PARAMS max-heap-size=XXX
?
Edited by TheKamakaZi
Link to comment
Share on other sites

Untoten

If you are using 15GB of RAM in 12 hours you have some serious problems.

 

I suggest you remove all plugins, tuners, and anything else custom you have.

 

I have been running Emby for almost 2 years now and have never had memory issues like you are describing, so it must be something else on your system causing the problem.

I just reinstalled a month or two ago, been using it for 3 years now.  Never had this issue until everyone else did.  No one is using livetv or anything else.

Edited by Untoten
Link to comment
Share on other sites

Something must have changed on your system then or you have some combination of hardware or plugins that non one else has.  Otherwise every single Emby user would have the same memory issue.

 

Have you tried installing the portable version?  Perhaps on different hardware?  Maybe you have a bad memory chip?

Link to comment
Share on other sites

revengineer

I just reinstalled a month or two ago, been using it for 3 years now.  Never had this issue until everyone else did.  No one is using livetv or anything else.

Did reinstalling help?

 

On my end, I have had 6 straight days of memory increases. I started with 400 MB, today I am at 1.4 GB. Memory use fluctuates quite a bit and most of the memory seems to get released eventually. Unfortunately 10%-20% does not and this adds up over time. My conclusion is that 3.2.29 is leaking memory for me as all previous version in the past 2+ years since I started using emby.

 

Memory usage may differ for all of use depending on the number of media files and/or TV stations we have. However, if there are no changes in the server configuration and number of files we serve, there is no reason for the memory need to be twice as large on day six than on day three in an idle state.

 

I need to abort the leak test now and reboot the server to trouble shoot a separate emby issue with my Roku. 

 

I think it's great how we are working together to figure this out, but I am still waiting for the devs to get more proactive and guide the process.

  • Like 1
Link to comment
Share on other sites

jnheinz

Did reinstalling help?

 

On my end, I have had 6 straight days of memory increases. I started with 400 MB, today I am at 1.4 GB. Memory use fluctuates quite a bit and most of the memory seems to get released eventually. Unfortunately 10%-20% does not and this adds up over time. My conclusion is that 3.2.29 is leaking memory for me as all previous version in the past 2+ years since I started using emby.

 

Memory usage may differ for all of use depending on the number of media files and/or TV stations we have. However, if there are no changes in the server configuration and number of files we serve, there is no reason for the memory need to be twice as large on day six than on day three in an idle state.

 

I need to abort the leak test now and reboot the server to trouble shoot a separate emby issue with my Roku. 

 

I think it's great how we are working together to figure this out, but I am still waiting for the devs to get more proactive and guide the process.

 

@@revengineer I would tend to agree with all of this post.  I did 5 days straight & ended up at 1.5GB with no end in sight.  I threw my hands up this morning & am just finishing up a migration from Windows Server 2012 R2 to an Emby Server 3.2.30 installation running on Ubuntu Server 16.04 LTS.  I am honestly not sure why I even put this on Windows.  I did a config restore using the plug-in & just added the libraries back.  Exact same plug-ins & everything.  Letting it catch up on updating the NFO files across the board.

 

I would put my money on that I will not have a memory leak in Linux.

 

I think we need some guidance from developers.  The number of users does seem to be snowballing a bit.  Started out with about 3-4 of us.  Certainly not the entire populace by any means, but the issue may be getting masked due to users rebooting regularly, never visiting the dashboard?  I don't know.

Edited by jnheinz
Link to comment
Share on other sites

Happy2Play

@@revengineer I would tend to agree with all of this post.  I did 5 days straight & ended up at 1.5GB with no end in sight.  I threw my hands up this morning & am just finishing up a migration from Windows Server 2012 R2 to an Emby Server 3.2.30 installation running on Ubuntu Server 16.04 LTS.  I am honestly not sure why I even put this on Windows.  I did a config restore using the plug-in & just added the libraries back.  Exact same plug-ins & everything.  Letting it catch up on updating the NFO files across the board.

 

I would put my money on that I will not have a memory leak in Linux.

 

I think we need some guidance from developers.  The number of users does seem to be snowballing a bit.  Started out with about 3-4 of us.  Certainly not the entire populace by any means, but the issue may be getting masked due to users rebooting regularly, never visiting the dashboard?  I don't know.

 

Aren't most of the users having this issue on non-windows systems?

 

But I have no issues on WHS 2011 or Windows 10.  But I don't do any Live TV stuff.

 

Personally I don't think it is the OS.  But more toward how Emby is being used.

Edited by Happy2Play
Link to comment
Share on other sites

jnheinz

Aren't most of the users having this issue on non-windows systems?

 

But I have no issues on WHS 2011 or Windows 10.  But I don't do any Live TV stuff.

 

Personally I don't think it is the OS.  But more toward how Emby is being used.

 

@@Happy2Play I believe it is exactly opposite.  All Windows Emby Server instances that I have seen?

Link to comment
Share on other sites

I have Emby on Windows 10 with no memory leak

 

Its used daily usually with 2 or 3 streams at a time.

 

 

 

@@Happy2Play I believe it is exactly opposite.  All Windows Emby Server instances that I have seen?

Link to comment
Share on other sites

TylerV76

Here is a right now with 1 stream going:

 

 

59a9fcb9544a9_Capture1.jpg

 

 

Same here on both my windows 10 setups. Currently with a stream going. Ive never seen emby hit over 300MB. 

 

post-212463-0-50548900-1504314157_thumb.jpg

Link to comment
Share on other sites

Happy2Play

I don't understand why you guys think anything under 1GB is a LEAK or excessive usage.

 

Anything between 0-800MB is normat depending on your library.  It has been that way from day one.  Or at least for me and 38TB of data it has.

 

 

 

 

 

 

Sorry looks like others are agreeing that they don't have or see a memory leak.

Edited by Happy2Play
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...