Increase Resource utilization

Server Version#: 1.19.5.3112

Hello all, I have the opposite problem most people seem to have. When searching for answers all I could come across were people asking about too much resource utilization, but I have much more resources behind this server and would like to make use of it. Plex scanning can be kind of slow when scanning large libraries, seeming to only perform about 9 actions in parallel, but I would like to do 90 actions in parallel and have the raw resources to handle this. I was able to increase the database cache from the default to a much higher amount using the commands below, about a 10x increase in speed! While significant I’d like to increase the speed another 10x, for a total of 100x the default.

sqlite3 com.plexapp.plugins.library.db
PRAGMA default_cache_size = 6000000;

My server be straight sleepin. Help me make it hurt.

When default_cache_size is set to a positive value, it’s treated as the number of pages to cache. When it’s negative, it’s treated as the number of kilobytes to cache.

SQLite3’s default default_cache_size has been -2000 (2000*1024 bytes, or ~2 MiB) for a while.

SQLite3’s default page_size is 4096. So I think you’ve just set it to 6,000,000 * 4,096 bytes = ~22 GB.

That seems like an outrageous value. :slight_smile:

Edit: Learning more about this, it’s my understanding that this sets an upper limit. So I think this says “Up To 22 GB”, without preallocating anything.

I wonder if Plex relies on the default _cache_size value at all. It’s been deprecated, and Applications can specify the amount of cache for SQLite if they choose. I don’t know if Plex does or doesn’t.

How did you measure the performance improvement?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.