SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Headless SongKong Remote Memory Config

Hi Paul,

I normally process about 1,000 tracks at a time with SongKong, but I’m considering running it against my full library (~170k tracks). I’ve tuned my songkongremote.sh to handle my usual workload while leaving headroom for larger jobs. My goal is to have a single, stable configuration that won’t run out of memory even with the full library. Performance is secondary to stability.

Current configuration:

./linuxjre/bin/java \
  -Xms1024m \
  -XX:MaxRAMPercentage=50 \
  -XX:MetaspaceSize=128m \
  -XX:MaxMetaspaceSize=256m \
  -XX:+UseG1GC \
  -XX:MaxGCPauseMillis=100 \
  -XX:+HeapDumpOnOutOfMemoryError \
  -Dcom.mchange.v2.log.MLog=com.mchange.v2.log.jdk14logging.Jdk14MLog \
  -Dorg.jboss.logging.provider=jdk \
  -Djava.util.logging.config.class=com.jthink.songkong.logging.StandardLogging \
  -Dhttps.protocols=TLSv1.1,TLSv1.2 \
  --add-opens java.base/java.lang=ALL-UNNAMED \
  -jar lib/songkong-11.7.jar -r

System specs: 8 GB RAM, Ubuntu 22.04.5 LTS.

Do you see any issues with this setup for both small (~1k track) and large (~170k track) jobs? Would you recommend using a fixed -Xmx instead of MaxRAMPercentage for this scenario?

The way SongKong works is it only processes a few folders a time (based on how may cpus you have) and only details for these folders are stored in memory, once they have been processed the information is stored in database. So this way however large your music collection is the amount of memory required is fairly consistent.

However, if the application has plenty of memory available then in it may hang onto memory for longer than absolutely neccessary instead of spending time releasing the memory (garbage collection) . So if you allow it to use more memory with higher values for MaxRAMPercentage or XmX then it probably will.

More importantly, the implementation is not perfect so there are some items that are stored in memory rather than database that will gradually get larger for larger music collections. So if the collection is very large and there is not enough memory that could be a problem, but I dont have a 170k collection so these scenarios have not undergone much testing.

I have tested upto 50,000 files without issue.

So in summary it looks okay and I would suggest you try it, if there is an issue I can then consider further.