It looks like it’s done but for some reason there is a typo in my logs saying that it “Started Discard” when it should’ve been “Finished Discard” just like what you see in yours. Odd.
please do the following for me?
This is going to be a big file test.
Please set the count= to match how much memory you have (GB → MB conversion). I show 64GB (65536 MB)
cd /some/junky/place
dd if=/dev/zero of=dummy.file bs=1M count=65536
dd if=dummy.file of=/dev/null bs=1M
rm dummy.file
Let’s see what that perf is.
Here you go:
root@nuc:/home# dd if=/dev/zero of=dummy.file bs=1M count=32768
32768+0 records in
32768+0 records out
34359738368 bytes (34 GB, 32 GiB) copied, 66.0926 s, 520 MB/s
root@nuc:/home# dd if=dummy.file of=/dev/null bs=1M
32768+0 records in
32768+0 records out
34359738368 bytes (34 GB, 32 GiB) copied, 25.1522 s, 1.4 GB/s
root@nuc:/home# rm dummy.file
I’m using a WD Black SN750 250GB NVMe SSD on this NUC and I see it has these sequential speeds:
3100 MBps (read) / 1600 MBps (write)
I don’t know how to interpret dd tests in Linux but that 520 MBps worries me.
Here’s a sysbench test if it matters:
root@nuc:/home/benchmark# sysbench fileio prepare
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)
128 files, 16384Kb each, 2048Mb total
Creating files for the test...
Extra file open flags: (none)
Creating file test_file.0
Creating file test_file.1
Creating file test_file.2
Creating file test_file.3
Creating file test_file.4
Creating file test_file.5
Creating file test_file.6
Creating file test_file.7
Creating file test_file.8
Creating file test_file.9
Creating file test_file.10
Creating file test_file.11
Creating file test_file.12
Creating file test_file.13
Creating file test_file.14
Creating file test_file.15
Creating file test_file.16
Creating file test_file.17
Creating file test_file.18
Creating file test_file.19
Creating file test_file.20
Creating file test_file.21
Creating file test_file.22
Creating file test_file.23
Creating file test_file.24
Creating file test_file.25
Creating file test_file.26
Creating file test_file.27
Creating file test_file.28
Creating file test_file.29
Creating file test_file.30
Creating file test_file.31
Creating file test_file.32
Creating file test_file.33
Creating file test_file.34
Creating file test_file.35
Creating file test_file.36
Creating file test_file.37
Creating file test_file.38
Creating file test_file.39
Creating file test_file.40
Creating file test_file.41
Creating file test_file.42
Creating file test_file.43
Creating file test_file.44
Creating file test_file.45
Creating file test_file.46
Creating file test_file.47
Creating file test_file.48
Creating file test_file.49
Creating file test_file.50
Creating file test_file.51
Creating file test_file.52
Creating file test_file.53
Creating file test_file.54
Creating file test_file.55
Creating file test_file.56
Creating file test_file.57
Creating file test_file.58
Creating file test_file.59
Creating file test_file.60
Creating file test_file.61
Creating file test_file.62
Creating file test_file.63
Creating file test_file.64
Creating file test_file.65
Creating file test_file.66
Creating file test_file.67
Creating file test_file.68
Creating file test_file.69
Creating file test_file.70
Creating file test_file.71
Creating file test_file.72
Creating file test_file.73
Creating file test_file.74
Creating file test_file.75
Creating file test_file.76
Creating file test_file.77
Creating file test_file.78
Creating file test_file.79
Creating file test_file.80
Creating file test_file.81
Creating file test_file.82
Creating file test_file.83
Creating file test_file.84
Creating file test_file.85
Creating file test_file.86
Creating file test_file.87
Creating file test_file.88
Creating file test_file.89
Creating file test_file.90
Creating file test_file.91
Creating file test_file.92
Creating file test_file.93
Creating file test_file.94
Creating file test_file.95
Creating file test_file.96
Creating file test_file.97
Creating file test_file.98
Creating file test_file.99
Creating file test_file.100
Creating file test_file.101
Creating file test_file.102
Creating file test_file.103
Creating file test_file.104
Creating file test_file.105
Creating file test_file.106
Creating file test_file.107
Creating file test_file.108
Creating file test_file.109
Creating file test_file.110
Creating file test_file.111
Creating file test_file.112
Creating file test_file.113
Creating file test_file.114
Creating file test_file.115
Creating file test_file.116
Creating file test_file.117
Creating file test_file.118
Creating file test_file.119
Creating file test_file.120
Creating file test_file.121
Creating file test_file.122
Creating file test_file.123
Creating file test_file.124
Creating file test_file.125
Creating file test_file.126
Creating file test_file.127
2147483648 bytes written in 2.39 seconds (856.36 MiB/sec).
root@nuc:/home/benchmark# sysbench fileio --file-test-mode=rndrw run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...
Threads started!
File operations:
reads/s: 3901.97
writes/s: 2601.31
fsyncs/s: 8333.49
Throughput:
read, MiB/s: 60.97
written, MiB/s: 40.65
General statistics:
total time: 10.0091s
total number of events: 148393
Latency (ms):
min: 0.00
avg: 0.07
max: 9.50
95th percentile: 0.26
sum: 9968.39
Threads fairness:
events (avg/stddev): 148393.0000/0.00
execution time (avg/stddev): 9.9684/0.00
@ChuckPa do you have any more ideas?
only one.
- Sign out of Plex/web
- Stop Plex
- Rename
LibrarytoLibrary.save - Start Plex
- Use Incognito window – Sign in (http://127.0.0.1:32400/web)
- Create a “TEST” server (unique name to avoid conflict with the default friendly name)
Now see what happens.
If this works – then it was damaged somewhere so deep that nothing found it.
Watch history can be easily migrated so don’t delete the old DB yet
So this is basically starting from scratch but with the ability of importing Watched history, correct?
Oh and btw, there was another update to PMS today and the same exact thing happened after the update (inaccessible PMS until restart).
It looks like there were two versions that were released today. I’m running plexupdate via a cron job and when this happened earlier there inaccessible issue was there. After I restarted PMS, it worked again and I noticed that there’s another update. I then forced the same script (plexupdate.sh) and surprisingly there was no issue at all after the installation of the 2nd update. So not sure what’s going on.
Installation logs for the cron job:
Jul 13 06:25:02 nuc plexupdate: Retrieving list of available distributions
Jul 13 06:25:04 nuc plexupdate: Downloading release "plexmediaserver_1.23.4.4805-186bae04e_amd64.deb"
Jul 13 06:25:06 nuc plexupdate: File downloaded
Jul 13 06:25:06 nuc plexupdate: (Reading database ... 104291 files and directories currently installed.)
Jul 13 06:25:06 nuc plexupdate: Preparing to unpack .../plexmediaserver_1.23.4.4805-186bae04e_amd64.deb ...
Jul 13 06:25:06 nuc plexupdate: PlexMediaServer install: Pre-installation Validation.
Jul 13 06:25:07 nuc plexupdate: PlexMediaServer install: Pre-installation Validation complete.
Jul 13 06:25:07 nuc plexupdate: Unpacking plexmediaserver (1.23.4.4805-186bae04e) over (1.23.4.4775-b7e0c30f2) ...
Jul 13 06:25:11 nuc plexupdate: Setting up plexmediaserver (1.23.4.4805-186bae04e) ...
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: PlexMediaServer-1.23.4.4805-186bae04e - Installation starting.
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install:
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Now installing based on:
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Installation Type: Update
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Process Control: systemd
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Plex User: plex
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Plex Group: plex
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Video Group: render
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Metadata Dir: /home/plex/Library/Application Support
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Temp Directory: /home/plex/Transcode
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Lang Encoding: en_US.UTF-8
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Config file used: /etc/systemd/system/plexmediaserver.service.d/override.conf
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Intel i915 Hardware: Found
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Nvidia GPU card: Not Found
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install:
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: OpenCL: Installed
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Intel Gmmlib: Installed
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Intel IGC Core: Installed
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Intel IGC OpenCL: Installed
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Intel OpenCL: Installed
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Intel OCLoc: Installed
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Intel Zero GPU: Installed
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install:
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Completing final configuration.
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: Starting Plex Media Server.
Jul 13 06:25:12 nuc plexupdate: PlexMediaServer install: PlexMediaServer-1.23.4.4805-186bae04e - Installation successful. Errors: 0, Warnings: 0
Jul 13 06:25:12 nuc plexupdate: Processing triggers for mime-support (3.62) ...
Installation logs for the manual update:
Jul 13 13:25:56 nuc systemd[1]: Stopping Plex Media Server...
Jul 13 13:25:56 nuc systemd[1]: plexmediaserver.service: Succeeded.
Jul 13 13:25:56 nuc systemd[1]: Stopped Plex Media Server.
Jul 13 13:25:56 nuc kevindd992002: PlexMediaServer install: Pre-installation Validation.
Jul 13 13:25:56 nuc logger[9143]: PlexMediaServer install: Pre-installation Validation complete.
Jul 13 13:26:01 nuc logger[9332]: PlexMediaServer install: PlexMediaServer-1.23.5.4801-bc4dd58bb - Installation starting.
Jul 13 13:26:01 nuc logger[9334]: PlexMediaServer install: Now installing based on:
Jul 13 13:26:01 nuc logger[9341]: PlexMediaServer install: Installation Type: Update
Jul 13 13:26:01 nuc logger[9343]: PlexMediaServer install: Process Control: systemd
Jul 13 13:26:01 nuc logger[9345]: PlexMediaServer install: Plex User: plex
Jul 13 13:26:01 nuc logger[9347]: PlexMediaServer install: Plex Group: plex
Jul 13 13:26:01 nuc logger[9349]: PlexMediaServer install: Video Group: render
Jul 13 13:26:01 nuc logger[9351]: PlexMediaServer install: Metadata Dir: /home/plex/Library/Application Support
Jul 13 13:26:01 nuc logger[9353]: PlexMediaServer install: Temp Directory: /home/plex/Transcode
Jul 13 13:26:01 nuc logger[9355]: PlexMediaServer install: Lang Encoding: en_US.UTF-8
Jul 13 13:26:01 nuc logger[9367]: PlexMediaServer install: Config file used: /etc/systemd/system/plexmediaserver.service.d/override.conf
Jul 13 13:26:01 nuc logger[9369]: PlexMediaServer install: Intel i915 Hardware: Found
Jul 13 13:26:01 nuc logger[9371]: PlexMediaServer install: Nvidia GPU card: Not Found
Jul 13 13:26:01 nuc logger[9373]: PlexMediaServer install:
Jul 13 13:26:01 nuc logger[9375]: PlexMediaServer install: OpenCL: Installed
Jul 13 13:26:01 nuc logger[9377]: PlexMediaServer install: Intel Gmmlib: Installed
Jul 13 13:26:01 nuc logger[9379]: PlexMediaServer install: Intel IGC Core: Installed
Jul 13 13:26:01 nuc logger[9381]: PlexMediaServer install: Intel IGC OpenCL: Installed
Jul 13 13:26:01 nuc logger[9383]: PlexMediaServer install: Intel OpenCL: Installed
Jul 13 13:26:01 nuc logger[9385]: PlexMediaServer install: Intel OCLoc: Installed
Jul 13 13:26:01 nuc logger[9387]: PlexMediaServer install: Intel Zero GPU: Installed
Jul 13 13:26:01 nuc logger[9389]: PlexMediaServer install:
Jul 13 13:26:01 nuc logger[9391]: PlexMediaServer install: Completing final configuration.
Jul 13 13:26:01 nuc systemd[1]: Reloading.
Jul 13 13:26:01 nuc systemd-udevd[9438]: Using default interface naming scheme 'v240'.
Jul 13 13:26:01 nuc systemd-udevd[9430]: Using default interface naming scheme 'v240'.
Jul 13 13:26:01 nuc systemd[1]: /lib/systemd/system/smbd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; please update the unit file accordingly.
Jul 13 13:26:01 nuc systemd[1]: /etc/systemd/system/plexmediaserver.service.d/override.conf:4: Failed to parse mode value, ignoring: 0002 # this must be octal - See warning below
Jul 13 13:26:01 nuc systemd[1]: /lib/systemd/system/nmbd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/nmbd.pid → /run/samba/nmbd.pid; please update the unit file accordingly.
Jul 13 13:26:01 nuc systemd[1]: /lib/systemd/system/rpc-statd.service:13: PIDFile= references path below legacy directory /var/run/, updating /var/run/rpc.statd.pid → /run/rpc.statd.pid; please update the unit file accordingly.
Jul 13 13:26:01 nuc logger[9520]: PlexMediaServer install: Starting Plex Media Server.
Jul 13 13:26:01 nuc systemd[1]: Starting Plex Media Server...
Jul 13 13:26:01 nuc systemd[1]: Started Plex Media Server.
Jul 13 13:26:01 nuc logger[9540]: PlexMediaServer install: PlexMediaServer-1.23.5.4801-bc4dd58bb - Installation successful. Errors: 0, Warnings: 0
I didn’t dig into it but the plexupdate.sh script downloads a corrupted file that will leave a hung/not running server. Manually downloading and dpkg install runs fine.
Hmm, that’s weird. If that’s the case, then the problem would also be present on my Debian box which uses the same plexupdate.sh script. I have only encountered this issue once on my Debian box and it was not because of the script, it was because of a botched beta version itself.
Also, I should’ve encountered the same issue earlier when I ran plexupdate.sh manually, no?
@ChuckPa so I tried recreating my PMS on the Debian box first because this has way content. I still see the slow queries in the logs:
This Debian box uses a SATA SSD and an Intel(R) Pentium(R) Silver J5005 CPU. It’s slower than the NUC but I still don’t think it should warrant those slow queries.
How much media do you have indexed?
Even with my 150,000 test episode database installed, I do not get that slowness on SATA-3 SSD.
Debian box:
65 movies
34 tv shows
NUC:
982 movies
133 tv shows
So for both boxes, they have really very small media databases.
I don’t really feel the slowness when navigating the GUI. What I’m worried about are those SLOW QUERY logs. I’m not even sure what those mean because the slowness doesn’t present itself when navigating through the libraries.
Maybe it’s just the CPU. How about we ignore it. I might being sensitive and the Celeron might be triggering when doing certain things.
Even on the NUC? Or should I try recreating the PMS on the NUC as well?
More importantly, how do I solve the issue of the inaccessible PMS after update issue on the NUC?
yes, even on a NUC.
I have a NUC7-i3-BNK with all media mounted over NFS and I can bury it.
What I fail to understand for you is why, with so little media compared to what i index for testing, your NUC struggles.
It’s as if the SSD isn’t being trimmed ?
Did you enable SSD trim ? It’s not enabled by default.
When you trim, be prepared, it will sit there and stall for a bit. The I/O load is intense as all unused pages are freed on the SSD
sudo systemctl enable fstrim.service
sudo systemctl start fstrim.service
^^ making it start is when the HDD LED will light nearly solid until done.
With your NUC, don’t you have any of those SLOW QUERY events in the PMS logs? Not even one bit?
Yes, I enabled trim when we were discussing it a few days ago. It did run but finished quickly for both systems. How do I ensure that an SSD is fully trimmed though?

