Weka大数据内存不足

1、旧版本中设置

RunWeka.ini 中的 
maxheap=1024M 

2、新版本中去掉此变量(注意:不能加入此变量,或设置 maxstack=1024m )。而是使用javaOpts选项,比较简单的做法如下:

javaOpts=-Xmx1024m

 

Weka官方给出的解释:

 

Yes, we removed the maxheap setting because Oracle's Java VM has a pretty sensible default strategy for setting the maximum heap size. 

An easy way to set the heap size for Oracle Java Virtual Machines is via the _JAVA_OPTIONS environment variable

https://weka.wikispaces.com/OutOfMemoryException

There is some info on this variable here: 

https://weka.wikispaces.com/Weka+package+manager+does+not+start

Increasing the stack size is only (potentially) useful if you get a stackoverflow exception

AVA_OPTS is an environment variable. You cannot set this in the RunWeka.ini file – you must set it as either a user or system-wide environment variable in the Windows settings. The RunWeka.ini file will then pick up the value and assign it to javaOpts which, in turn, is used in the command that launches Weka. Alternatively, you can just set javaOpts directly by editing the RunWeka.ini file: 

javaOpts=-Xmx1024m 

The advantage of the JAVA_OPTS environment variable is that you don't have to actually edit the RunWeka.ini file in order to make changes to the max heap (or any other JVM argument for that matter). 

you can check yourself whether it works. In the Explorer, right-click on the “Status” information at the bottom of the window. Then select “Memory information” from the pop-up menu. The “max.” value should correspond (roughly) to the maximum heap size you have specified. 

Another way to check is to select “SystemInfo” from the “Help” menu of WEKA’s GUI Chooser. The “memory.max” entry has the heap size. 

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值