Wondering if anyone else has this issue. I see various posts about it but no-one ever seems to come up with an answer or at least a statement that its normal. First let me state that this server is running in an Unraid Container. Ryzen 5950x, 64 gigs of ram, on an M.2 Firecuda Drive. That being said, the same thing was happening on my previous server which was on a Windows machine a year ago.
I have a reasonably sized library with over 2500 TV series between 3 libraries, 2500 movies between 2 libraries, and nearly 1million audio tracks between 3 libraries. My metadata folder alone is over 850 Gigs and my database files are 2.61GB for com.plexapp.plugins.library.db and 9.62GB for com.plexapp.plugins.library.blobs.db.
While the butler is running a database optimization the server is unresponsible. This has always been an issue for years however with smaller libraries it’s not noticeable because it is a much quicker operation. Assuming as my library grows this problem will continue to worsen. The process at the moment takes roughly 15 minutes to complete. I see a point in time where my server will be unusable for much longer as it continues to expand.
Is this something that devs are aware of as the dollar cost per TB of storage continues to crash and people get larger and larger libraries? The process does eventually finish and nothing has lead me to believe there is actually an issue here. Some earlier posts indicated that the DB files should not be over a few hundred megs but I find that hard to believe in a library with over 1 million assets, though correct me if I am wrong. If that is the case, how can I run a database check on a docker container in Unraid?
Optimizing the database runs the SQLite VACUUM command. The db has to be closed during the process, which is why the server becomes non-responsive.
The butler task runs once per week during the maintenance window. If this is inconvenient, you can run the command manually. Plex Media Server must be stopped to do so. See the Repair a Corrupted Database for instructions.
You can also use @ChuckPA’s PlexDBRepair utility instead of issuing the SQLite commands via the CLI. See usage scenarios C and D in the README. Note that PMS must still be stopped.
C. Database sizes excessively large when compared to amount of media indexed (item count)
1. Check - (Option 1) - Make certain both databases are fully intact (repair if needed)
2. Vacuum - (Option 2) - Instruct SQLite to rebuild its tables and recover unused space.
3. Reinex - (Option 3) - Rebuild Indexes.
4. Exit - (Option 8)
D. User interface has become 'sluggish' as more media was added
1. Check - (Option 1) - Confirm there is no database damage
2. Repair - (Option 4) - You are not really repairing. You are rebuilding the DB in perfect sorted order.
3. Reindex - (Option 3) - Rebuild Indexes.
4. Exit - (Option 8)
Edit: You can use WebTools-NG to manually initiate butler tasks, including database optimization.
From the settings I see, the butler runs the optimization once every 3 days? I just want to confirm. Is that some kind of override as in if i uncheck that will it instead run weekly? If that is the case it would be preferable. But I have always interpreted that setting as it will either run every 3 days or not at all.