Server Version#: Version 1.24.5.5173
Player Version#: 4.70.0
I was having issues, this is with a brand new database adding content. I am getting slow database errors. The server is barely using any resources (see pic below). The CPU is idle, and the read writes are minimal during the library scan… Plex is running in a docker container, and has been working fine for years. It crashed and would not recover the other day.
New install, started fresh, had the issue on beta, so moved from beta to public release with fresh new database. Still had the errors. The database was on a Samsung 860 EVO 1tb, so I moved it to the faster raid array for testing. Still having issues.
Nov 27, 2021 13:15:24.838 [0x7f1c73d40b38] INFO - Plex Media Scanner v1.24.5.5173-8dcc73a59 - Docker Docker Container (LinuxServer.io) x86_64 - build: linux-x86_64 - GMT -08:00
Nov 27, 2021 13:15:24.839 [0x7f1c73d40b38] INFO - Linux version: 5.10.0-0.bpo.9-amd64, language: en-US
Nov 27, 2021 13:15:24.839 [0x7f1c73d40b38] INFO - Processor Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz
Nov 27, 2021 13:15:24.839 [0x7f1c73d40b38] INFO - /usr/lib/plexmediaserver/Plex Media Scanner --match --type 2 --log-file-suffix Matcher --item 125359
Nov 27, 2021 13:15:24.844 [0x7f1c76c61848] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.35.5, threadsafe=1
Nov 27, 2021 13:15:25.033 [0x7f1c76c61848] DEBUG - It took 40.000000 ms to retrieve 136 items.
Nov 27, 2021 13:15:25.037 [0x7f1c76c61848] DEBUG - Matcher: found 0 auxiliary files for Season 2021
Nov 27, 2021 13:15:25.073 [0x7f1c76c61848] DEBUG - It took 40.000000 ms to retrieve 136 items.
The problem is not the number of CPUs (processors) or even the number of cores.
The problem is the Per-Core speed.
In this package, 8 cores / 8211 = 1026 passmarks. The bare minimum for Plex is 700 Passmarks so you can see how low this is.
By comparison, an i7-7700 (8620 passmarks) with only 4 cores —> is twice as fast per core (thread).
This is the problem here. It’s “JUST BARELY” tripping the threshold as it’s adding media ; which is a lot of work.
The problem is :
Get a lock on the database
Make database queries
Make the updates
Release the database
Is causing PMS to warn because of the lower seed in conjunction with the amount of data involved with all the other tasks trying to gain access at the same time.
Would a pair of E5-2667 v2s make much of a difference? Is Plex sqllite using multithreading (Serialized mode?) Why is the CPU load never moving above 9% when doing these tasks?
My production server isn’t on a Xeon. It wouldn’t handle the load I have for it.
Production is on an i7-8809G CPU with QSV (NUC8-i7-HVK) with 10GbE Thunderbolt adapters. That machine has a Samsung 1TB 970 Pro NVMe SSD
The Xeon is my NAS.
For you, Get the per-thread speed as high as you can get it.
Remember, subtitle-burning IS single threaded and you’ll see the biggest gain there.
As for the DB, I don’t know how it’s accessed. There are two primary DB files which are used.
As I understand the fundamental problem with any SQLitte DB – walking fragmented lists (non-optimized) is extremely expensive.
Adding media , and all its associated metadata does interweave records due to them all being added physically at the end of the file.
It’s only after all additions are complete and db optimizated will the tables again be contiguous. At that point, there won’t be any soft errors reported.
So you see, this error isn’t really an error. It’s what happens when the per-thread CPU speed isn’t enough during media ingestion.
But will this difference matter that I have two CPUs that should equal 3052 total together that should be 858 passmarks faster than the single i7-8809G. Plus the extra 12 cores and 24 threads.
You can’t add Passmarks when doing a SINGLE-THREAD speed comparison.
We’re measuring the time for ONE thread to
Grab the database (Lock)
Perform its operation
Release the database (unlock)
It’s a single-threaded execution path. You could have 500 cores and it wouldn’t make any difference.
In the 2194 vs 1526, I have 43% more per-thread speed which is enough to make the difference. It can’t do more “work” but what it does, it does faster.