CPU usage

General discussion about Universal Media Server (no support or requests)
Post Reply
SoNic67
Posts: 5
Joined: Thu Jun 01, 2023 2:10 am

CPU usage

Post by SoNic67 »

I have just installed the UMS on my PC and I see the CPU usage is pretty high 10-33% of my CPU, from OpenJDK Platform Binary. My CPU has 20 cores, 3.30-4.00 GHz.
Is that normal? Will it eventually became less?

LE: It seems that the scanning of files is "stuck" at a folder with DFF files (SACD music)... Eliminated that folder and now it's at a 3D video file. Log:

Code: Select all

15:07:51 DEBUG HikariPool-2 - Pool stats (total=10, active=0, idle=10, waiting=0)
15:07:51 DEBUG HikariPool-1 - Pool stats (total=10, active=8, idle=2, waiting=0)
15:07:51 DEBUG HikariPool-2 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
15:07:51 DEBUG HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
15:08:21 DEBUG HikariPool-1 - Pool stats (total=10, active=8, idle=2, waiting=0)
15:08:21 DEBUG HikariPool-2 - Pool stats (total=10, active=0, idle=10, waiting=0)
15:08:21 DEBUG HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
15:08:21 DEBUG HikariPool-2 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
15:08:52 DEBUG HikariPool-1 - Pool stats (total=10, active=8, idle=2, waiting=0)
15:08:52 DEBUG HikariPool-2 - Pool stats (total=10, active=0, idle=10, waiting=0)
15:08:52 DEBUG HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
15:08:52 DEBUG HikariPool-2 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
15:09:22 DEBUG HikariPool-1 - Pool stats (total=10, active=8, idle=2, waiting=0)
15:09:22 DEBUG HikariPool-2 - Pool stats (total=10, active=0, idle=10, waiting=0)
15:09:22 DEBUG HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
15:09:22 DEBUG HikariPool-2 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
SoNic67
Posts: 5
Joined: Thu Jun 01, 2023 2:10 am

Re: CPU usage

Post by SoNic67 »

Trace logs added.
LE: Trace logs deleted.
Last edited by SoNic67 on Fri Jun 02, 2023 3:35 am, edited 1 time in total.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: CPU usage

Post by mik_s »

This is normal when first installing UMS as it does a scan on all your shared files to find out what formats they are and gathers their metadata. This greatly speeds up access when you are browsing your files on your renderer.
Depending on how large your collection is it could take a while, but only needs to be done once. After that only new files will be scanned which will take next to no time.

UMS will also use a lot of CPU when it is transcoding as it needs to be done in realtime, maybe a bit faster, to create a buffer so the video does not stutter. Once the buffer is large enough then it will ease off.

There was a few errors in your logs but may be due to problems with your files. There are 50+ .flac files that don't have a FLAC header so it is reported that those are not real FLAC files.

Code: Select all

ERROR 2023-05-31 15:13:07.062 [Library Scanner] net.pms.dlna.DLNAMediaInfo Error reading audio tag for "05 - Serenade.flac": D:\My Music\Roxy Music\Roxy Music (1973) Stranded (HDCD 1999)\05 - Serenade.flac Flac Header not found, not a flac file
TRACE 2023-05-31 15:13:07.062 [Library Scanner] net.pms.dlna.DLNAMediaInfo 
org.jaudiotagger.audio.exceptions.CannotReadException: D:\My Music\Roxy Music\Roxy Music (1973) Stranded (HDCD 1999)\05 - Serenade.flac Flac Header not found, not a flac file
	at org.jaudiotagger.audio.flac.FlacStreamReader.findStream(FlacStreamReader.java:69)
	at org.jaudiotagger.audio.flac.FlacInfoReader.read(FlacInfoReader.java:50)
	at org.jaudiotagger.audio.flac.FlacFileReader.getEncodingInfo(FlacFileReader.java:40)
	at org.jaudiotagger.audio.generic.AudioFileReader2.read(AudioFileReader2.java:60)
	at org.jaudiotagger.audio.AudioFileIO.readFile(AudioFileIO.java:356)
	at org.jaudiotagger.audio.AudioFileIO.read(AudioFileIO.java:192)
	at net.pms.dlna.DLNAMediaInfo.parse(DLNAMediaInfo.java:604)
	at net.pms.dlna.RealFile.isValid(RealFile.java:122)
	at net.pms.dlna.DLNAResource.addChild(DLNAResource.java:551)
	at net.pms.dlna.VirtualFile.manageFile(VirtualFile.java:160)
	at net.pms.dlna.VirtualFile.analyzeChildren(VirtualFile.java:246)
	at net.pms.dlna.RootFolder.scan(RootFolder.java:313)
	at net.pms.dlna.RootFolder.scan(RootFolder.java:323)
	at net.pms.dlna.RootFolder.scan(RootFolder.java:323)
	at net.pms.dlna.RootFolder.startScan(RootFolder.java:266)
	at net.pms.service.LibraryScanner.lambda$scanLibrary$0(LibraryScanner.java:48)
	at java.base/java.lang.Thread.run(Unknown Source)
INFO  2023-05-31 15:13:07.062 [Library Scanner] net.pms.dlna.RealFile The file D:\My Music\Roxy Music\Roxy Music (1973) Stranded (HDCD 1999)\05 - Serenade.flac could not be parsed. It will be hidden
Maybe they are MP3's but named wrong? or if they are really flacs there could be something wrong with them or a bug somewhere in UMS.

This should not cause any problems to UMS as it will just hide these and carry on.
I had similar problems when adding my music library, some of the files were throwing errors too but it was mainly because they had corrupted or missing metadata that UMS could not read. I had to manually add in the missing data once I figured out what they were.
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.
SoNic67
Posts: 5
Joined: Thu Jun 01, 2023 2:10 am

Re: CPU usage

Post by SoNic67 »

Thank you for the reply!
Yes, this morning I saw that the CPU usage relented.
There were two folders that were showing "processing" forever, I moved those out of the shared folder, and then the scanning completed.
One was DFF files (DSD audio) and the other was a 3D h264 (TOU).

The FLAC files that are not recognized have probably errors. That specific file you linked is not shown in foobar2000 either.
Post Reply