SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

CPU usage during acoustic analysis

When I’ve loaded a couple thousand songs in Jaikoz, and I start the acoustic analysis on them, I expect it to use most of my CPU cycles. After all, the decoding of an MP3, the mathematical analysis of it, etc. are all very CPU intensive tasks. However, when I monitor the CPU usage, it is only around 20% most of the time, with 1 spike of 80+% per song analysed.

This is odd, isn’t it? Shouldn’t it just use the maximum CPU power available and make analysis faster? I know that it also sends and receives data, but that should not prevent it from using, on average, more CPU time, right?

Acoustic analysis takes about 25 seconds per song on my PC.

Could this be a problem with settings, and/or the genpuid program, and/or is there anything I can do to speed things up? Is the time (~25s/song) normal?

Acoustic analysis is the slowest task but you only ever have to do it once per track, 25seconds seems a bit slow.

Ive found that acoustic analysis doe use alot of cpu, but I think some songs take significantly more resources than others. Ive actually implemented multi-threading for acoustic analysis but in my own tests I didn’t get much improvement in throughput because the cpu was already under heavy usage with just one thread. Ill take another look when I have time, I know you have a PC but what operating system are you running on (Windows/Linux)?

I think I have found the (or at least part of the) problem.

Using Wireshark I found out that genpuid always tries to connect to the MusicIP server through port 10001 first. When that fails, it uses port 80 as a fallback. Port 10001 is blocked here, port 80 isn’t. So it has to wait for a timeout on the connect to port 10001 before it falls back to port 80.

And since Jaikoz starts genpuid over for each song, it needs to wait for the timeout for each song. When using genpuid in recursive mode (-r), the timeout only occurs once.

I don’t have the router password to unblock this, however, and the guy who does is on holiday :s

At least now we know what causes this :slight_smile:

Good work !

I’ll think about the consequences of this wrt jaikoz. (I cant use recursive mode because the analysis has to be done on the records as selected and in the order they appear on screen which might not relate to the filesystem)