UMS reads whole HDD every time it starts

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
isma
Posts: 1
Joined: Tue Mar 21, 2023 6:53 am

UMS reads whole HDD every time it starts

Post by isma »

Hello forum
I'm new to UMS, so far it seems quite good, I can play stuff I used to have to convert to MPEG myself.

There's a huge BUT, however, every time I restart the little N5095 based server, UMS reads the whole 1.8Tb of videos I'm trying to share!
Not only it takes forever but also I think it'll wear down the HDD for no reason at all.
It also seems to be reading using threads, which is even worse since the reading head goes all over the place and the reading speed goes down from 120Mbps to about 8Mbps.

While I did the initial setup, I disabled checking the contents automatically but it still does even though it already created a ~102Mb database in the HOME directory. I also tried once leaving it enabled but it did the same.

Did I miss some important configuration?
Is there a reason for it to do that?
Can I prevent it somehow and make it read only new or changed files?

Linux 6.1.0-6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.15-1 (2023-03-05) x86_64 GNU/Linux

Code: Select all

^CINFO  13:04:05.915 [File watcher] Exception in thread "File watcher" java.nio.file.ClosedWatchServiceException
INFO  13:04:05.916 [File watcher]       at java.base/sun.nio.fs.AbstractWatchService.checkOpen(Unknown Source)
INFO  13:04:05.916 [File watcher]       at java.base/sun.nio.fs.AbstractWatchService.take(Unknown Source)
INFO  13:04:05.916 [File watcher]       at net.pms.util.FileWatcher.lambda$start$0(FileWatcher.java:211)
INFO  13:04:05.916 [File watcher]       at java.base/java.lang.Thread.run(Unknown Source)
WARN  13:04:06.078 [Library Scanner] Unhandled exception while resolving Soul Hunter - 03: Task net.pms.util.APIUtils$$Lambda$552/0x00000008
012124c0@4f6417f4 rejected from java.util.concurrent.ThreadPoolExecutor@5e0b517f[Terminated, pool size = 0, active threads = 0, queued tasks
 = 0, completed tasks = 18481]
WARN  13:04:06.342 [Library Scanner] Unhandled exception while resolving Soul Hunter - 04: Task net.pms.util.APIUtils$$Lambda$552/0x00000008
012124c0@54cde0f0 rejected from java.util.concurrent.ThreadPoolExecutor@5e0b517f[Terminated, pool size = 0, active threads = 0, queued tasks
 = 0, completed tasks = 18481]
WARN  13:04:06.607 [Library Scanner] Unhandled exception while resolving Soul Hunter - 05: Task net.pms.util.APIUtils$$Lambda$552/0x00000008
012124c0@571912c4 rejected from java.util.concurrent.ThreadPoolExecutor@5e0b517f[Terminated, pool size = 0, active threads = 0, queued tasks
 = 0, completed tasks = 18481]
INFO  13:04:06.797 [UMS Shutdown] Stopping Universal Media Server 13.2.0
User avatar
mik_s
Moderator
Posts: 1114
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: UMS reads whole HDD every time it starts

Post by mik_s »

When first run UMS will scan all your shared folders for media type, subtitles, thumbnails, metadata etc and stores this in the database which can take a while but next time it runs it just checks to see if anything has changed and only do a detailed scan on those new files which usually takes seconds.

Scanning 1.8Tb of videos will take a while and if one finished when UMS has QUIT then it will continue from where it left off next time. Depending on how powerful that computer is it could take even longer if it is slow.

UMS also watches for new files added to your shared folders while it is running and scans them immediately.

For this to work you have to have the cache enabled (database). It should not scan when cache is disabled as there is no point but does make it slow browsing your files on your renderer as each directory must be read from disk.

A database of ~102Mb is expected for that number of videos you have, maybe on the small side if everything has been scanned.

From that snippet of the log it seems the library scanner was still working when UMS stopped so it was not finished scanning. I would need to see the full logs to be sure it was behaving properly (see the section in red above)
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Post Reply