1

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?

Community
  • 1
  • 1
Ian
  • 561
  • 4
  • 8
  • 15

4 Answers4

5

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.

Voo
  • 29,040
  • 11
  • 82
  • 156
  • Thanks. Also it's not letting me save edits. I made sure to close all instances of Weka but it's still not letting me. Any ideas? – Ian Jan 02 '12 at 03:46
  • I didn't know that it was a rights problem, but that worked, thanks very much! – Ian Jan 02 '12 at 04:08
1

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

Khalafkh
  • 11
  • 1
1

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.

TryTryAgain
  • 7,632
  • 11
  • 46
  • 82
  • Sorry, where do I change the java -Xmx512m. The weka wiki page doesn't seem to have any instructions for that. It just says "With the Sun JVM you can do this via the -Xmx option". – Ian Jan 02 '12 at 03:56
  • 1
    Which Operating System are you using? Which version of the JVM/JDK do you have installed? – TryTryAgain Jan 02 '12 at 04:00
  • Windows 7 64 bit. JRE 6 JDK 1.6 . Is that all that's needed? Thanks by the way. – Ian Jan 02 '12 at 04:05
  • 1
    Updated my answer with instructions...should help. – TryTryAgain Jan 02 '12 at 04:11
0

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.

Samer Aamar
  • 1,298
  • 1
  • 15
  • 23