SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Memory usage

Jaikoz uses 400 MB of memory by default, and that is supposedly good for 10,000 songs. Is there a “rule of thumb” on how much more memory to allocate when the song library is bigger than that - i.e., so manymore MB of memory for each 10,000 additional songs?

No, not really - I generally recommend you work in batches though.

Say you’ve worked in batches and have finished Autocorrecting 70,000 + songs. Next you wish to remove duplicates. How does one do that? Do you need to load all 70,000 songs?

For this yes you would.

So in this instance just increase your memory allocation to whatever you can, load the files and run delete duplicates. But I wouldn’t recommend running with this many files in normal circumstances.

Translation: No, remove duplicates do not work for 100% of users of this program due to the way it has been written.

Okay MAzE5h1p69wB we have gone though this, yes Jaikoz does not scale indefinitently to super huge collections, because when originally written a few years ago it wasn’t envisaged that users would be trying to process these collections in one go, and Jaikoz did not even have a Delete Duplicates function, you’ll find that most taggers have limits on how much they can cope with.

But I have a clear roadmap on how I will be solving this problem, and it will be solved by the end of 2010,

What is the worst thing that could happen using the delete duplicates function? Should I wait until the end of the year to take advantage of this feature?

Ooh no dont wait, just increase the memory as required and run it.

The only bad thing that could happen is Jaikoz runs out of memory before Delete Duplicates finishes, no harm will come to your files

I have 8GB Ram - and can let Jaikoz have as much as it needs. I’ve got Jaikoz set at 1GB currently. Let’s see how that goes…

Here’s the line I have in the shortcut that starts Jaikoz -
“C:\Program Files (x86)\Jthink\Jaikoz\jaikoz.exe” -Jmaxheap=3072000000
Does that increase available memory to 3GB? If not, what am I doing wrong? If so, I’m still running out of memory when trying to load 74,000 songs…

You could be hitting the PermGen problem.

Java uses two different memory areas , heap and permgen. Heap is used for most things but permgen is used for storing text and processing images, unfortunately permgen cannot be changed for Jaikoz.exe, but it can be changed for Jaikoz.bat instead which runs exactly the same thing.

Open Jaikoz.bat in text editor an edit the following parameters

Xmx=800m -XX:MaxPermSize=200m 

Modify heap (-Xmx) and then Max perm size by proportional amount , i.e

Xmx=2400m -XX:MaxPermSize=600m 

Then make sure you start Jaikoz using Jaikoz.bat NOT Jaikoz.exe, you can always check how much memory has been allocated to Jaioz by checking the Console tab within Jaikoz and looking at the first line entered a default installation should say something like

Aug 15, 2010 8:52:06 PM: INFO: Jaikoz 3.7.1 using Java 1.6.0_20 16.3-b01-279 64bit on Mac OS X 10.6.4 x86_64 initialized successfully 
Aug 15, 2010 8:52:06 PM: INFO: Jaikoz has been configured with minimum heap memory of 150 mb, maximum heap memory of 795 mb and maximum permanent memory of 216 mb

Here’s that .bat file:
@echo off
set CLASSPATH=
java -Xms150m Xmx=2400m -XX:MaxPermSize=600m -jar lib\jaikoz.jar -l2 -m2 -f

How do you run it?

Just doubleclick on it

Guess I’ll need to do some troubleshooting then - it doesn’t run.

Okay, open a command window and run it from there instead that should give an error message indicating the problem. I guess you are actually using 32bit java rather than 64bit Java in which case there is a maximum limit of how much memory can be allocated of about 2GB, so switch to 64bit if you can, if not reduce the total memory to less than 2GB.

You were right… I hadn’t realized it, but I was running 32-bit Java. I uninstalled that, ran the 64-bit IE, installed 64-bit Java, and… We’ll see. Not working as of this writing…

Looks like you’ve made a mistake editing Jaikoz.bat, can you paste the contents onto the forum

Sure… Jump back a few messages in this thread and you’ll see it… Here it is again:
@echo off
set CLASSPATH=
java -Xms150m Xmx=2400m -XX:MaxPermSize=600m -jar lib\jaikoz.jar -l2 -m2 -f

[quote=lyster]Sure… Jump back a few messages in this thread and you’ll see it… Here it is again:
@echo off
set CLASSPATH=
java -Xms150m Xmx=2400m -XX:MaxPermSize=600m -jar lib\jaikoz.jar -l2 -m2 -f [/quote]

ahh, there is a spurious equals sign it should be

 java -Xms150m Xmx2400m -XX:MaxPermSize=600m -jar lib\\jaikoz.jar -l2 -m2 -f 

I’ll try that when I get home tonight. (I’m in Pacific Daylight Time.) Thank you! (Note I got that “=” by pasting the suggested revision from the message just prior to the one I mentioned above… the one where the idea of using the batch file was first raised…)