Any reason why my Media folder would have 13 million files in it? I don’t have a massive media library, about 1500 movies and 150 TV shows. I do have thumbnails, chapter gen and audio analysis on but I feel like 13 million files is excessive.
If you have video preview thumbnails enabled for your libraries, that could explain the high number of files. By default, these thumbnails are generated every 2s of video, so a two hour movies would have roughly 3600 thumbnail files. Multiply that by 1500 and you get over 5 million files for your movie library alone, not counting all the other metadata or your TV episodes (where the calculus is the same).
So no, 13 million files doesn’t seem particularly noteworthy or excessive.
You can increase the amount of time between thumbnails using the hidden server setting GenerateBIFFrameInterval, described here:
https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/
But for that to be effective, you’d need to delete all your current thumbnails and allow them to be regenerated.
Unlikely. These jpg pictures get concatenated into one file with the extension bif.
It does sound a bit high, yes.
My collection is similar to yours in terms of numbers, and I have only 160k files in the Media folder.
Do you happen to have also a photos library? Or music?
One thing you can do immediately is to
- stop plex server
- search and delete any files with the extension
.tmpfrom the plex data folder.
Maybe this can make a difference – if not in file numbers, but in data volume freed up.
Another idea:
verify that all files and folders in your plex data folder are accessible with full read/write privileges to Plex server. This can sometimes be tricky with containers.
If you have deleted and recreated full libraries recently-ish, it can take up to a week before the debris of the deleted libraries is swept away.
See that your server is running during the scheduled tasks.
And that you have the “cleanup” tasks actually enabled https://support.plex.tv/articles/201553286-scheduled-tasks/
I disabled thumbnail and voice analysis on all libraries and deleted all previously generated thumbnails. I also set GenerateBIFFrameInterval to 10, though I haven’t re-enabled thumbnail generation yet. Chapter generation is still active.
After these changes, disk usage dropped significantly—from ~150GB to 12GB—but I still have 29,921 folders and 17,818,199 files. There are no photos, but I do have a music library with about 20,000 tracks.
There are no .tmp files in the Plex folder, and the library itself is relatively new (about 3 weeks old). All scheduled tasks are enabled except for “Update all libraries during maintenance.”
At this point, if I delete the entire Media folder and let it regenerate, what exactly will I lose?
To add to Otto,
Have you checked / cleaned out the PhotoTranscoder directory (under Plex Media Server/Cache)? PhotoTranscoder accumulates junk very easily.
root@Gerbil:~# uname -a
Linux Gerbil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/ d9/ e4/ ef/ fa/
09/ 14/ 1f/ 2a/ 35/ 40/ 4b/ 56/ 61/ 6c/ 77/ 82/ 8d/ 98/ a3/ ae/ b9/ c4/ cf/ da/ e5/ f0/ fb/
0a/ 15/ 20/ 2b/ 36/ 41/ 4c/ 57/ 62/ 6d/ 78/ 83/ 8e/ 99/ a4/ af/ ba/ c5/ d0/ db/ e6/ f1/ fc/
root@Gerbil:
I’m just under Media but I think I found the culprit. Library/Application Support/Plex Media Server/Media/localhost/5/85536121fc90677bb276b20d9f6802af4ff5760.bundle/Contents/Indexes/tmp is 10gb and 17,775,975 files.
After removing it I’m at 2.27 GB in 29,921 folders and 42,224 files. Much better!
Were you able to identify which item caused this?
Because if you only deleted the folder, there is a chance that it might come back after the next library scan.
No idea even where to start looking.
The .bundle folder should have contained some hints like a poster.jpg etc.
Ah, then nope. It was empty except the tmp folder and it was so many files, they wouldn’t display. I know the bundle name and I’ll keep an eye on it as I scan and regenerate.
Thank you for the correction, I was unaware of that. For some reason I believed they were stored individually.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.