Increase heap size in java for weka

后端 未结 17 1354
天命终不由人
天命终不由人 2020-12-14 08:27

I\'m trying to increase the heap size in java for weka which keeps crashing. I used the suggested line:

> java -Xmx500m -classpath

but

17条回答
  •  鱼传尺愫
    2020-12-14 09:08

    If we are using Weka Workbench CLI or Knowledge explorer we need to change as below.

    As the documentation suggests the runtime parameter should be -Xmx[size_required]m where [size_required] is memory size you intend to keep to avoid memory exception.

    Open RunWeka.ini

    Define maxheap=[size_required]G

    In my case I kept maxheap=4G , One can set like maxheap=4096m and add -Xmx#maxheap# to all the run options at # setups (prefixed with "cmd_") sections next to java commands like below

    cmd_default=javaw -Xmx#maxheap# ...............
    cmd_console=cmd.exe /K start cmd.exe ..................
    cmd_explorer=java -Xmx#maxheap# .................
    cmd_knowledgeFlow=java -Xmx#maxheap#....................
    
    maxheap=4G
    

    Verify the same by restarting Weka and Help>>SystemInfo

提交回复
热议问题