If you are doing this on a broader scope than personal use, such as providing a packaged solution for others as you mention, you might want to receive written permission prior to doing so.
The other obvious problem is that if Plex makes code changes in the binary it could cause these solutions to cease to work, or worse cause corruption to a database, at any time. These tweaks incur a certain maintenance cost and risk.
Chuck, can you poke somebody about modifying the default database page size?
It’s currently 1024 which is SO OLD. Like dawn-of-SQLite old, back when block devices had such small blocks, dinosaurs roamed the earth, and you and I were learning about computers. Even wildly-conservative SQLite has defaulted to 4096 forever, and they target literal embedded systems.
I’ve been using bigger values forever, but 4096 (at least) is a no-brainer.
(The template database file that ships with Plex is 1024. That’s also the right place to modify it on a brand new system. Before first run, the other files don’t exist.)
I’d be happy to grab some links and resources and even some generic benchmarks if that would be helpful for a discussion.
And I understand that you target relatively small systems. It’s funny how these days 1 GB is considered small-ish.
(The fact the template database’s page_size is 1024 is probably a really neat indication that the SAME file has been used by Plex for a very, very long time. That’s kinda cool history.)
Then i’ll not use this script, but I reaally hope that Plex will give more space for cache, because obviously this has become ridiculsly little in 2022
Now start PMS and let me know how much quicker it is
(You speak of cache size , yes that’s one issue, locality of reference in a flat-file database is the bigger issue here. Export/Import makes the tables contiguous again )
If you have a ‘larger’ DB, I’m 100% certain the internal links are splattered all over the place. This action fixes that.
I realize there are always risks associated with doing stuff like your script (big or small).
Just curious, what are the potential risks with running your script?
Also, for Docker installs, would the script be run on the host where the data is persisted too since you say to stop PMS?
I’m interested in trying to run this but want to make sure I do it properly for my system. I quickly looked through the script and even though bash scripting isn’t my forte, I am able to understand enough programming/logic to figure out what is going on.
Regarding your last post, is there a new link to download the latest version with the extra precautionary test you added or is the same link earlier up in the thread updated?