Jump to content

Emby server memory usage


parrish

Recommended Posts

@@jnheinz It's indeed not the easiest tool. 

That's not a big library. So that will not be the problem... Do you have any idea when the server is creating a big memory?

 

No for the moment, I am not aware of a method to create a crash/dump for the Emby Server...

Link to comment
Share on other sites

If you guys could offer some comparison with the latest version of Emby Server, 3.2.27, that would be helpful. There were a couple areas where I was able to identify some improvements, and made them for the new release. Thanks.

  • Like 2
Link to comment
Share on other sites

bfir3

If you guys could offer some comparison with the latest version of Emby Server, 3.2.27, that would be helpful. There were a couple areas where I was able to identify some improvements, and made them for the new release. Thanks.

 

It may be helpful to know which specific areas have seen some improvements so that the testers know what to look for.

Link to comment
Share on other sites

RedBaron164

I updated my server to 3.2.27.0 yesterday and shortly after the upgrade it was using about 220mb of memory. My memory usage today is currently sitting at 445mb after about 24 hours. So it has climbed but 400mb of memory usage is not unusual from what I've seen in the past. But I'm still keeping an eye on it. Yesterday before the upgrade Emby was using about 2.4gb of ram but it took about a week to climb up that high. And just for reference my library.db is 630mb.

Link to comment
Share on other sites

UnderMiner

Hello,

I am using server version 3.2.27.0 and the memory has increased to 8GB in less than 24 hours.

I experienced the same issues with the last two previous server versions with the memory creeping up to 12GB and forcing a restart.  I believe in my case the issues happen when recording live TV but I have not done extensive troubleshooting to prove that this is the cause.  I have had a few incidents where the recording continues and the memory increases.  It locks up the server and indicates that the recording continues past the end of the program.  If I restart the system, the program is recorded as intended and likely the server was simply locked at 100% CPU (FFMPEG and Emby) and 100% memory.

I attached the example from a few moments ago that shows an active recording for a program that finished over 30 minutes ago.  Use this link for the screen capture https://1drv.ms/i/s!AnfmLnbQksWOhTtK8jvhxZf-_TL1

 

Hopefully we find a solution soon.

Edited by UnderMiner
Link to comment
Share on other sites

Happy2Play

Is this issue only related to Live TV and Recording?  As I have never seen Emby over 1GB, unless I have MCM update things then of course Emby goes crazy.

Link to comment
Share on other sites

pir8radio

Is this issue only related to Live TV and Recording?  As I have never seen Emby over 1GB, unless I have MCM update things then of course Emby goes crazy.

 

There has to be something else in common with these guys, I have Live TV and recording and my memory usage has not increased since adding live TV to my setup.

 

You can clearly see the emby server update on 8-14-17 whatever was done to help memory usage seems to have done something. My emby server seems to be consuming less ram so far, but I never had the issues reported in this thread, my server has always consumed around 4.5GB of ram and levels off there.   There has to be some other common link between everyone with the memory issue.

 

*This graph is for the emby server application ONLY not the whole server

 

59950c38cb414_chart.png

Edited by pir8radio
  • Like 1
Link to comment
Share on other sites

Hello,

I am using server version 3.2.27.0 and the memory has increased to 8GB in less than 24 hours.

I experienced the same issues with the last two previous server versions with the memory creeping up to 12GB and forcing a restart.  I believe in my case the issues happen when recording live TV but I have not done extensive troubleshooting to prove that this is the cause.  I have had a few incidents where the recording continues and the memory increases.  It locks up the server and indicates that the recording continues past the end of the program.  If I restart the system, the program is recorded as intended and likely the server was simply locked at 100% CPU (FFMPEG and Emby) and 100% memory.

I attached the example from a few moments ago that shows an active recording for a program that finished over 30 minutes ago.  Use this link for the screen capture https://1drv.ms/i/s!AnfmLnbQksWOhTtK8jvhxZf-_TL1

 

Hopefully we find a solution soon.

 

What tuner do you have?

Link to comment
Share on other sites

UnderMiner

I have an HDHomeRun CONNECT by Silicon Dust Model: HDHR4-2US. They actually issued a firmware and software update yesterday which I will apply.

Link to comment
Share on other sites

RedBaron164

I've been keeping an eye on my Emby server and so far it seems to be gaining about 100mb of memory usage every 24 hours. It's currently up to 650mb of memory used, yesterday at this time it was 550mb and the day before that it was 450mb. So tomorrow I suspect it will be up to 750mb.

 

I've had LiveTV setup on my server for over a year now using two HDHomeRun CONNECT Model: HDHR4-2US Tuners. Currently I only have two shows being recorded on a nightly basis.

Link to comment
Share on other sites

TheTabman

Since updating to 3.2.27 at the 2017/08/15 memory consumption climbed steadily from ~300mb to ~1gb. I think I only connected 3 times to my server from a Kodi box With the normal Emby for Kodi add-on. During that I also added 4 or 5 new TV Episodes and one movie.
No live or ip TV at all.

Here's a perfmon screenshot of that time period:

599708caedc55_perf27.jpg

Edited by TheTabman
Link to comment
Share on other sites

revengineer

Some early feedback from the .net core testers:

 

5998b886cb9a1_Untitled.png

Memory usage is not the same as a memory leak. If there is a leak such we are experiencing, memory will increase until the server becomes unresponsive no matter how small the initial memory foot print is.

Link to comment
Share on other sites

revengineer

I appreciate it. I just hope that this thread finally gives critical mass to make the memory analysis a priority. It's been going on for very long and it is a problem.

Link to comment
Share on other sites

That's true, but is not always the same problem?

We need to find the right way to reproduce this "issue" and then try to solve that...

Link to comment
Share on other sites

Happy2Play

It is system related or it would affect everyone and everyone could reproduce it. :) 

Link to comment
Share on other sites

revengineer

It is system related or it would affect everyone and everyone could reproduce it. :)

I completely agree. And I believe to track this down a more methodological approach is needed to find out what a "problem system" is. We have a lot of information here sprinkled throughout the posts that is hard to pull together, and the information needed may not be complete. I suggest that the developers put together a questionnaire with possibly relevant configuration setting, so that commonality can be more readily established. Then we need guided testing of scenarios to narrow down the root cause. For example, my fastest memory leaks have been associated with viewing life TV through emby with my HD Homerun Prime on my Android device from outside my local network. Viewing freezes repeatedly on from hotel networks with poor wifi. When I return after such travel, I find emby to consume large amounts of memory. I see folks mentioning life TV above, but I do not know if this is something most of us have in common.

 

Pir8radio posted an interesting memory profile that very much reflects what I have been seeing. There is a slow creep of memory with some short-lived spikes on top of it. The short-lived spikes are likely the execution of scheduled tasks. I have done a bunch of testing yesterday and found that while the short-term increase can be significant, the all or most of the memory is released after some time.

 

For a moment I though I had a way to reproduce this by reloading the server log many times in a row. With each reload, the server used 5 MB more memory. After stopping the reloads, most but not all of the memory was released even after waiting about 10 minutes. However, my hopes were crushed when I did some browsing in the emby interface and suddenly memory usage was 10 MB less than when I started the reload test. So it seems that memory usage is not well correlated with current activity, which is likely why the memory management issues are so hard to track down.

 

Throughout the testing, the memory grew by 10s of MB, but the increase could not be tracked down to a specific activity. Overall, I have spent substantial amounts of time (not just yesterday) on trying to figure this and another important problem with the emby shutdown failure, and I have supplied debugging information on these issues in the past. However, nothing got fixed and follow ups died down quickly. This is where my frustration comes from that was reflected in my response to Luke above.

Link to comment
Share on other sites

bfishernc

I am adding my name to the list with this problem; happy to help troubleshoot if needed.

 

I am a pretty new user (about 1 month) - currently running 3.2.27 on Windows; I only use Emby for TV; I have no other plugins installed; and I have this issue.

 

I am running on Win10 on a VM with 4GB of memory.  Emby seems to run fine until we record something long (ie. golf tournament, football game) and then we have memory issues.  The VM eventually hits maximum memory and crashes the VM.

Link to comment
Share on other sites

lexisdude

If you guys could offer some comparison with the latest version of Emby Server, 3.2.27, that would be helpful. There were a couple areas where I was able to identify some improvements, and made them for the new release. Thanks.

It appears that the change has dropped my memory consumption from about 2.05 to about 1.4GB; so its a positive improvement.

 

I have been monitoring it for the past 5 days. In this; I am monitoring resting memory levels and not process levels for memory - because I feel the bottom line is the most important thing to illustrate if Emby is releasing memory and not holding it hostage.Depending on the usage and how many database calls / scripts are running in the background - I have seen it peak to about 4GB ; but go back to a resting state after completing.

 

My library size is sitting steady at about 1.4GB, The only reason I bring the library size up - is when there was corruption/inflation issues to the database - which was not being reported as a problem; is when I was seeing the exe remaining high on memory usage

Edited by lexisdude
Link to comment
Share on other sites

Happy2Play

With a little testing on my side, as others have noticed at least on windows, the service consumes 2 to 3 times as much memory (over time) as running the application..

Link to comment
Share on other sites

bfishernc

And it's directly hitting the 4GB memory limit. Or is it in steps?

I'm not sure, I will try to watch the memory consumption closer next time

Link to comment
Share on other sites

revengineer

Here is my use case from tonight. At 7 pm, memory usage was 770 MB. From 9-10 pm, a show was recorded from Live TV with conversion to mkv. Also from 8:30-10:30pm my daughter watched a movie from Roku. I checked memory usage at 9:30 pm, and it was 890 MB, at 10 pm it was 904 MB. So the increase in memory usage is not linear with time. At 11 pm, memory usage was still 904 MB. So none of the 130 MB of memory that was allocated for the earlier activities was ever released.

 

EDIT 8/21/17: Attached server log for period of interest.

server-63638784001-cropped.txt

Edited by revengineer
Link to comment
Share on other sites

Here is my use case from tonight. At 7 pm, memory usage was 770 MB. From 9-10 pm, a show was recorded from Live TV with conversion to mkv. Also from 8:30-10:30pm my daughter watched a movie from Roku. I checked memory usage at 9:30 pm, and it was 890 MB, at 10 pm it was 904 MB. So the increase in memory usage is not linear with time. At 11 pm, memory usage was still 904 MB. So none of the 130 MB of memory that was allocated for the earlier activities was ever released.

 

Can you attach the server log from this time frame? What tuner do you have? Thanks.

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...