Jump to content

Library scan hangs and eats ram when I add a photos collection


TheShanMan

Recommended Posts

TheShanMan
A year or two ago I tried adding photos to my library and had a horrible experience. Scans would take forever and as far as I could tell, would simply hang at some percentage.

 

About a week ago I figured I'd give it a try again. Same experience. It hangs at some percentage and after a day I finally give up. Additionally when I check Process Explorer, Emby is typically consuming 10's of gigabytes of ram and it has 1 cpu pegged.

 

If I remove photos from my library, it all returns to normal (emby becomes more responsive, it doesn't consume a ton of memory, and scans take ~ 2 minutes). FWIW I have ~43000 photos on a network share.

 

I've attached a log file in which I started the server and immediately created a photos library and let it scan for a few hours. At the time I killed the server and grabbed the log file, the process was pegging a cpu and was consuming 6.5 GB of ram.

 


Link to comment
Share on other sites

I think that very large photo libraries are an area of opportunity for improvement in the future. Thanks.

Link to comment
Share on other sites

TheShanMan

This is so funny. I was literally working on a reply as you posted.

 

So it's best to leave photos out for now then (or at least keep the libraries very limited). Would you say this is a low priority, i.e. months if not more than a year from now? It kinda sounds like that from your response.

 

FYI the biggest reason I'd like to add photos is for Theater's photo screensaver that's supposed to be available at some point (I don't see it at the moment). So if it would be possible for that screensaver to use photos that aren't part of the library, I wouldn't have quite as much desire to see this optimized. And if not, the photo screensaver might be a reason to bump up the priority on optimizing photo collections. :)

Link to comment
Share on other sites

i think with each new release the server is getting more and more efficient so it should always continue to be re-evaluated.

Link to comment
Share on other sites

TheShanMan

OK, but from my limited vantage point this seems more like something that needs dedicated photo scanning effort, not general incremental efficiency improvements, right? Now, it could be that the fix for this problem is simple (e.g. fixing a major memory/resource leak - which does seem to be the case here) but it seems to me that the problem will most likely be found if someone looks specifically into my problem (or someone else with a similar photos problem) as opposed to someone just working on efficiency improvements as a general/vague task.

 

Just my thoughts as a fellow software engineer (yet not familiar with emby code/architecture). I appreciate you having a look, acknowledging the issue, and giving me an idea of what to expect. :)

Link to comment
Share on other sites

kkhan

I have a very large photo collection and had the same initial experience but I persevered by adding 10% of the collection at a time.  That worked. The downside is that my regular daily scan can take anything up to an hour though normally it completes in around 35 minutes but either way that is not as issue as it happens when everyone is asleep.

Link to comment
Share on other sites

dcook

Did you try adding photos to the library in smaller groups?  I suspect that its just the initial scan that is having trouble with your large amount of photos.  Or do you find accessing the photos after the initial scan is completed to also be slow?

Link to comment
Share on other sites

TheShanMan

That's a good suggestion, however I would be pretty unhappy with scans that take more than maybe 5 minutes because of the way I often add content and want to access it immediately.T

 

This is why I've been a proponent of more advanced scan configurations, like being able to configure one scan to exclude photos and another to only scan photos, and schedule/trigger them individually. I would be happy to live with 35 minute scan times on my photos if it was a photos-only scan that happened overnight and everything else was scannable on demand.

 

Heck, I'd even be happy if the scheduled scan feature remained as is but I could script a REST call to scan a subset of my library (i.e. exclude photos).

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