Ian
Ian

Reputation: 561

Changing the Heap Size in Weka

I've seen many resources telling me what line to add, but I can't find any resources that give step by step instructions on what to do to increase the memory size.

Thanks

Can somebody explain this in greater detail, where does this line go?

Upvotes: 1

Views: 10319

Answers (4)

Samer Aamar
Samer Aamar

Reputation: 1408

The answers above are too old (last one is 1 year ago). I had same issue with my WEKA (version 3.8.1) on Windows 10.

I had a problem to update the heap size , the way I fixed it is by adding an environment variable (under control panel) as follows:

JAVA_OPTS = -Xms30000m -Xmx30000m

Tip: Just ensure that RunWeka.ini is using this environment variable.

In the above example I give WEKA 30GB. It works.

Hope it will be helpful for some people.

Upvotes: 0

Khalafkh
Khalafkh

Reputation: 11

This is better step by step to increase Java memory for windows 7 with sanpshots

Regards

http://www.wikihow.com/Increase-Java-Memory-in-Windows-7

Upvotes: 1

TryTryAgain
TryTryAgain

Reputation: 7820

http://weka.wikispaces.com/Java+Virtual+Machine

I'm pretty sure you just increase the JVM size no setting in Weka specifically.

These links may help too: http://weka.wikispaces.com/OutOfMemoryException http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

Depending on your OS it may be different how you go about changing those settings, but the gist is to raise the values of -vmargs -Xms256M -Xmx512M

EDIT

This is basic instructions for Windows XP, but I'm sure the same applies for Windows 7 or you can easily figure it out:

http://www.duckware.com/pmvr/howtoincreaseappletmemory.html

Synopsis:

Start --> Control Panel --> Open 'Java Plug-in' --> Java Tab --> View 'Java Applet Runtime Settings' --> Change/Add option to the Java Runtime Parameter

Something like:

-vmargs -Xms256M -Xmx512M or even -Xmx512M alone should work.

Upvotes: 1

Voo
Voo

Reputation: 30216

Depends solely on how you start it, but assuming you're using the bat that's included: Just edit RunWeka.ini and change the maxheap=something variable (should exist but if not create it) to whatever you like.

e.g.: maxheap=4g sets the heap to 4gb.

Upvotes: 5

Related Questions