Out of memory @ Weka 3.8.1

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Out of memory @ Weka 3.8.1

Shu-Ju Tu
Hi

I am running Weka 3.8.1 and having a problem of out-of-memory.

I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
as shown in the following

RunWeka.ini 3.8
maxheap=1024M

RunWeka.ini 3.8.1
maxstack=20m

In Weka 3.8.1
Should I manually add maxheap to some larger value?
Say maxheap=16G
or
modify maxstack to some larger value?
Say maxstack=16G

Please kindly help me when you can get a chance.

Warm regards,
Shu-Ju
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Eibe Frank-2
Administrator
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.

Cheers,
Eibe

> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
>
> Hi
>
> I am running Weka 3.8.1 and having a problem of out-of-memory.
>
> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
> as shown in the following
>
> RunWeka.ini 3.8
> maxheap=1024M
>
> RunWeka.ini 3.8.1
> maxstack=20m
>
> In Weka 3.8.1
> Should I manually add maxheap to some larger value?
> Say maxheap=16G
> or
> modify maxstack to some larger value?
> Say maxstack=16G
>
> Please kindly help me when you can get a chance.
>
> Warm regards,
> Shu-Ju
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Shu-Ju Tu
Thanks, Eibe,

Then I modified the RunWeka.ini as the following
Is this the correct way to do that?

--- begin
JAVA_OPTS="-Xmx4g"
javaOpts=%JAVA_OPTS%
--- end

Warm regards,
Shu-Ju



2017-05-20 7:09 GMT+08:00 Eibe Frank <[hidden email]>:

> 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.
>
> Cheers,
> Eibe
>
>> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
>>
>> Hi
>>
>> I am running Weka 3.8.1 and having a problem of out-of-memory.
>>
>> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
>> as shown in the following
>>
>> RunWeka.ini 3.8
>> maxheap=1024M
>>
>> RunWeka.ini 3.8.1
>> maxstack=20m
>>
>> In Weka 3.8.1
>> Should I manually add maxheap to some larger value?
>> Say maxheap=16G
>> or
>> modify maxstack to some larger value?
>> Say maxstack=16G
>>
>> Please kindly help me when you can get a chance.
>>
>> Warm regards,
>> Shu-Ju
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to: [hidden email]
>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Eibe Frank-2
Administrator
_JAVA_OPTIONS doesn't work for you? If you use that, you don't have to mess around with RunWeka.ini at all.

Cheers,
Eibe

> On 21 May 2017, at 14:59, Shu-Ju Tu <[hidden email]> wrote:
>
> Thanks, Eibe,
>
> Then I modified the RunWeka.ini as the following
> Is this the correct way to do that?
>
> --- begin
> JAVA_OPTS="-Xmx4g"
> javaOpts=%JAVA_OPTS%
> --- end
>
> Warm regards,
> Shu-Ju
>
>
>
> 2017-05-20 7:09 GMT+08:00 Eibe Frank <[hidden email]>:
>> 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.
>>
>> Cheers,
>> Eibe
>>
>>> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
>>>
>>> Hi
>>>
>>> I am running Weka 3.8.1 and having a problem of out-of-memory.
>>>
>>> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
>>> as shown in the following
>>>
>>> RunWeka.ini 3.8
>>> maxheap=1024M
>>>
>>> RunWeka.ini 3.8.1
>>> maxstack=20m
>>>
>>> In Weka 3.8.1
>>> Should I manually add maxheap to some larger value?
>>> Say maxheap=16G
>>> or
>>> modify maxstack to some larger value?
>>> Say maxstack=16G
>>>
>>> Please kindly help me when you can get a chance.
>>>
>>> Warm regards,
>>> Shu-Ju
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to: [hidden email]
>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to: [hidden email]
>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Shu-Ju Tu
I use Explorer-Weka with Windows 7.
I do not know how I can use "java -Xmx4096m" in Explorer-Weka with Windows 7.

If I modify the RunWeka.ini file to increase the memory size in these
two scenarios, which one is the correct one?

--- begin-1
JAVA_OPTS="-Xmx4g"
javaOpts=%JAVA_OPTS%
--- end-1

--- begin-2
JAVA_OPTS=-Xmx4g
javaOpts=%JAVA_OPTS%
--- end-2

Thanks,
Shu-Ju




2017-05-21 17:32 GMT+08:00 Eibe Frank <[hidden email]>:

> _JAVA_OPTIONS doesn't work for you? If you use that, you don't have to mess around with RunWeka.ini at all.
>
> Cheers,
> Eibe
>
>> On 21 May 2017, at 14:59, Shu-Ju Tu <[hidden email]> wrote:
>>
>> Thanks, Eibe,
>>
>> Then I modified the RunWeka.ini as the following
>> Is this the correct way to do that?
>>
>> --- begin
>> JAVA_OPTS="-Xmx4g"
>> javaOpts=%JAVA_OPTS%
>> --- end
>>
>> Warm regards,
>> Shu-Ju
>>
>>
>>
>> 2017-05-20 7:09 GMT+08:00 Eibe Frank <[hidden email]>:
>>> 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.
>>>
>>> Cheers,
>>> Eibe
>>>
>>>> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
>>>>
>>>> Hi
>>>>
>>>> I am running Weka 3.8.1 and having a problem of out-of-memory.
>>>>
>>>> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
>>>> as shown in the following
>>>>
>>>> RunWeka.ini 3.8
>>>> maxheap=1024M
>>>>
>>>> RunWeka.ini 3.8.1
>>>> maxstack=20m
>>>>
>>>> In Weka 3.8.1
>>>> Should I manually add maxheap to some larger value?
>>>> Say maxheap=16G
>>>> or
>>>> modify maxstack to some larger value?
>>>> Say maxstack=16G
>>>>
>>>> Please kindly help me when you can get a chance.
>>>>
>>>> Warm regards,
>>>> Shu-Ju
>>>> _______________________________________________
>>>> Wekalist mailing list
>>>> Send posts to: [hidden email]
>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to: [hidden email]
>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to: [hidden email]
>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Eibe Frank-2
Administrator
Not sure, but 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.

Cheers,
Eibe

> On 22/05/2017, at 1:56 PM, Shu-Ju Tu <[hidden email]> wrote:
>
> I use Explorer-Weka with Windows 7.
> I do not know how I can use "java -Xmx4096m" in Explorer-Weka with Windows 7.
>
> If I modify the RunWeka.ini file to increase the memory size in these
> two scenarios, which one is the correct one?
>
> --- begin-1
> JAVA_OPTS="-Xmx4g"
> javaOpts=%JAVA_OPTS%
> --- end-1
>
> --- begin-2
> JAVA_OPTS=-Xmx4g
> javaOpts=%JAVA_OPTS%
> --- end-2
>
> Thanks,
> Shu-Ju
>
>
>
>
> 2017-05-21 17:32 GMT+08:00 Eibe Frank <[hidden email]>:
>> _JAVA_OPTIONS doesn't work for you? If you use that, you don't have to mess around with RunWeka.ini at all.
>>
>> Cheers,
>> Eibe
>>
>>> On 21 May 2017, at 14:59, Shu-Ju Tu <[hidden email]> wrote:
>>>
>>> Thanks, Eibe,
>>>
>>> Then I modified the RunWeka.ini as the following
>>> Is this the correct way to do that?
>>>
>>> --- begin
>>> JAVA_OPTS="-Xmx4g"
>>> javaOpts=%JAVA_OPTS%
>>> --- end
>>>
>>> Warm regards,
>>> Shu-Ju
>>>
>>>
>>>
>>> 2017-05-20 7:09 GMT+08:00 Eibe Frank <[hidden email]>:
>>>> 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.
>>>>
>>>> Cheers,
>>>> Eibe
>>>>
>>>>> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> I am running Weka 3.8.1 and having a problem of out-of-memory.
>>>>>
>>>>> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
>>>>> as shown in the following
>>>>>
>>>>> RunWeka.ini 3.8
>>>>> maxheap=1024M
>>>>>
>>>>> RunWeka.ini 3.8.1
>>>>> maxstack=20m
>>>>>
>>>>> In Weka 3.8.1
>>>>> Should I manually add maxheap to some larger value?
>>>>> Say maxheap=16G
>>>>> or
>>>>> modify maxstack to some larger value?
>>>>> Say maxstack=16G
>>>>>
>>>>> Please kindly help me when you can get a chance.
>>>>>
>>>>> Warm regards,
>>>>> Shu-Ju
>>>>> _______________________________________________
>>>>> Wekalist mailing list
>>>>> Send posts to: [hidden email]
>>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>>
>>>> _______________________________________________
>>>> Wekalist mailing list
>>>> Send posts to: [hidden email]
>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to: [hidden email]
>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to: [hidden email]
>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Shu-Ju Tu
Hi Eibe,

Unfortunately, neither one would work as the memory.max is not changed
by the RunWeka.ini file.

Then I tried to open a DOS box in Windows 7 and used
java -Xmx1024m -jar java.jar
The memory.max in the Weka program was changed accordingly.

Is there a correct way to do that in the RunWeka.ini file of Windows 7?

Thanks,
Shu-Ju





2017-05-22 10:10 GMT+08:00 Eibe Frank <[hidden email]>:

> Not sure, but 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.
>
> Cheers,
> Eibe
>
>> On 22/05/2017, at 1:56 PM, Shu-Ju Tu <[hidden email]> wrote:
>>
>> I use Explorer-Weka with Windows 7.
>> I do not know how I can use "java -Xmx4096m" in Explorer-Weka with Windows 7.
>>
>> If I modify the RunWeka.ini file to increase the memory size in these
>> two scenarios, which one is the correct one?
>>
>> --- begin-1
>> JAVA_OPTS="-Xmx4g"
>> javaOpts=%JAVA_OPTS%
>> --- end-1
>>
>> --- begin-2
>> JAVA_OPTS=-Xmx4g
>> javaOpts=%JAVA_OPTS%
>> --- end-2
>>
>> Thanks,
>> Shu-Ju
>>
>>
>>
>>
>> 2017-05-21 17:32 GMT+08:00 Eibe Frank <[hidden email]>:
>>> _JAVA_OPTIONS doesn't work for you? If you use that, you don't have to mess around with RunWeka.ini at all.
>>>
>>> Cheers,
>>> Eibe
>>>
>>>> On 21 May 2017, at 14:59, Shu-Ju Tu <[hidden email]> wrote:
>>>>
>>>> Thanks, Eibe,
>>>>
>>>> Then I modified the RunWeka.ini as the following
>>>> Is this the correct way to do that?
>>>>
>>>> --- begin
>>>> JAVA_OPTS="-Xmx4g"
>>>> javaOpts=%JAVA_OPTS%
>>>> --- end
>>>>
>>>> Warm regards,
>>>> Shu-Ju
>>>>
>>>>
>>>>
>>>> 2017-05-20 7:09 GMT+08:00 Eibe Frank <[hidden email]>:
>>>>> 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.
>>>>>
>>>>> Cheers,
>>>>> Eibe
>>>>>
>>>>>> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> I am running Weka 3.8.1 and having a problem of out-of-memory.
>>>>>>
>>>>>> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
>>>>>> as shown in the following
>>>>>>
>>>>>> RunWeka.ini 3.8
>>>>>> maxheap=1024M
>>>>>>
>>>>>> RunWeka.ini 3.8.1
>>>>>> maxstack=20m
>>>>>>
>>>>>> In Weka 3.8.1
>>>>>> Should I manually add maxheap to some larger value?
>>>>>> Say maxheap=16G
>>>>>> or
>>>>>> modify maxstack to some larger value?
>>>>>> Say maxstack=16G
>>>>>>
>>>>>> Please kindly help me when you can get a chance.
>>>>>>
>>>>>> Warm regards,
>>>>>> Shu-Ju
>>>>>> _______________________________________________
>>>>>> Wekalist mailing list
>>>>>> Send posts to: [hidden email]
>>>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>>>
>>>>> _______________________________________________
>>>>> Wekalist mailing list
>>>>> Send posts to: [hidden email]
>>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>> _______________________________________________
>>>> Wekalist mailing list
>>>> Send posts to: [hidden email]
>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to: [hidden email]
>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to: [hidden email]
>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Michael Hall
On May 22, 2017, at 1:20 AM, Shu-Ju Tu <[hidden email]> wrote:

Hi Eibe,

Unfortunately, neither one would work as the memory.max is not changed
by the RunWeka.ini file.

Then I tried to open a DOS box in Windows 7 and used
java -Xmx1024m -jar java.jar
The memory.max in the Weka program was changed accordingly.

Is there a correct way to do that in the RunWeka.ini file of Windows 7?

I don’t know how the RunWeka.ini file is processed but if it’s by java then the JVM may already be running and it can not be used to change JVM launch options?

I’m not very familiar with Windows/DOS but there should be some platform specific way to set environment variables like JAVA_OPTS.
I googled this, it might help for that…
or maybe this one I found does show how to do it with the ‘ini’ file

Michael Hall





_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Mark Hall
In reply to this post by Shu-Ju Tu
The RunWeka.ini file has been used in Weka since the dawn of Weka time :-) JAVA_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).

Cheers,
Mark.

On 22/05/17, 6:20 PM, "Shu-Ju Tu" <[hidden email] on behalf of [hidden email]> wrote:

    Hi Eibe,
   
    Unfortunately, neither one would work as the memory.max is not changed
    by the RunWeka.ini file.
   
    Then I tried to open a DOS box in Windows 7 and used
    java -Xmx1024m -jar java.jar
    The memory.max in the Weka program was changed accordingly.
   
    Is there a correct way to do that in the RunWeka.ini file of Windows 7?
   
    Thanks,
    Shu-Ju
   
   
   
   
   
    2017-05-22 10:10 GMT+08:00 Eibe Frank <[hidden email]>:
    > Not sure, but 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.
    >
    > Cheers,
    > Eibe
    >
    >> On 22/05/2017, at 1:56 PM, Shu-Ju Tu <[hidden email]> wrote:
    >>
    >> I use Explorer-Weka with Windows 7.
    >> I do not know how I can use "java -Xmx4096m" in Explorer-Weka with Windows 7.
    >>
    >> If I modify the RunWeka.ini file to increase the memory size in these
    >> two scenarios, which one is the correct one?
    >>
    >> --- begin-1
    >> JAVA_OPTS="-Xmx4g"
    >> javaOpts=%JAVA_OPTS%
    >> --- end-1
    >>
    >> --- begin-2
    >> JAVA_OPTS=-Xmx4g
    >> javaOpts=%JAVA_OPTS%
    >> --- end-2
    >>
    >> Thanks,
    >> Shu-Ju
    >>
    >>
    >>
    >>
    >> 2017-05-21 17:32 GMT+08:00 Eibe Frank <[hidden email]>:
    >>> _JAVA_OPTIONS doesn't work for you? If you use that, you don't have to mess around with RunWeka.ini at all.
    >>>
    >>> Cheers,
    >>> Eibe
    >>>
    >>>> On 21 May 2017, at 14:59, Shu-Ju Tu <[hidden email]> wrote:
    >>>>
    >>>> Thanks, Eibe,
    >>>>
    >>>> Then I modified the RunWeka.ini as the following
    >>>> Is this the correct way to do that?
    >>>>
    >>>> --- begin
    >>>> JAVA_OPTS="-Xmx4g"
    >>>> javaOpts=%JAVA_OPTS%
    >>>> --- end
    >>>>
    >>>> Warm regards,
    >>>> Shu-Ju
    >>>>
    >>>>
    >>>>
    >>>> 2017-05-20 7:09 GMT+08:00 Eibe Frank <[hidden email]>:
    >>>>> 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.
    >>>>>
    >>>>> Cheers,
    >>>>> Eibe
    >>>>>
    >>>>>> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
    >>>>>>
    >>>>>> Hi
    >>>>>>
    >>>>>> I am running Weka 3.8.1 and having a problem of out-of-memory.
    >>>>>>
    >>>>>> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
    >>>>>> as shown in the following
    >>>>>>
    >>>>>> RunWeka.ini 3.8
    >>>>>> maxheap=1024M
    >>>>>>
    >>>>>> RunWeka.ini 3.8.1
    >>>>>> maxstack=20m
    >>>>>>
    >>>>>> In Weka 3.8.1
    >>>>>> Should I manually add maxheap to some larger value?
    >>>>>> Say maxheap=16G
    >>>>>> or
    >>>>>> modify maxstack to some larger value?
    >>>>>> Say maxstack=16G
    >>>>>>
    >>>>>> Please kindly help me when you can get a chance.
    >>>>>>
    >>>>>> Warm regards,
    >>>>>> Shu-Ju
    >>>>>> _______________________________________________
    >>>>>> Wekalist mailing list
    >>>>>> Send posts to: [hidden email]
    >>>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
    >>>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
    >>>>>
    >>>>> _______________________________________________
    >>>>> Wekalist mailing list
    >>>>> Send posts to: [hidden email]
    >>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
    >>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
    >>>> _______________________________________________
    >>>> Wekalist mailing list
    >>>> Send posts to: [hidden email]
    >>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
    >>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
    >>>
    >>> _______________________________________________
    >>> Wekalist mailing list
    >>> Send posts to: [hidden email]
    >>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
    >>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
    >> _______________________________________________
    >> Wekalist mailing list
    >> Send posts to: [hidden email]
    >> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
    >> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
    >
    > _______________________________________________
    > Wekalist mailing list
    > Send posts to: [hidden email]
    > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
    > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
    _______________________________________________
    Wekalist mailing list
    Send posts to: [hidden email]
    List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
    List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
   


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory @ Weka 3.8.1

Shu-Ju Tu
Thanks, Mark. Thank you very much for the extra time and the problem was solved.

Shu-Ju

2017-05-22 16:52 GMT+08:00 Mark Hall <[hidden email]>:

> The RunWeka.ini file has been used in Weka since the dawn of Weka time :-) JAVA_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).
>
> Cheers,
> Mark.
>
> On 22/05/17, 6:20 PM, "Shu-Ju Tu" <[hidden email] on behalf of [hidden email]> wrote:
>
>     Hi Eibe,
>
>     Unfortunately, neither one would work as the memory.max is not changed
>     by the RunWeka.ini file.
>
>     Then I tried to open a DOS box in Windows 7 and used
>     java -Xmx1024m -jar java.jar
>     The memory.max in the Weka program was changed accordingly.
>
>     Is there a correct way to do that in the RunWeka.ini file of Windows 7?
>
>     Thanks,
>     Shu-Ju
>
>
>
>
>
>     2017-05-22 10:10 GMT+08:00 Eibe Frank <[hidden email]>:
>     > Not sure, but 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.
>     >
>     > Cheers,
>     > Eibe
>     >
>     >> On 22/05/2017, at 1:56 PM, Shu-Ju Tu <[hidden email]> wrote:
>     >>
>     >> I use Explorer-Weka with Windows 7.
>     >> I do not know how I can use "java -Xmx4096m" in Explorer-Weka with Windows 7.
>     >>
>     >> If I modify the RunWeka.ini file to increase the memory size in these
>     >> two scenarios, which one is the correct one?
>     >>
>     >> --- begin-1
>     >> JAVA_OPTS="-Xmx4g"
>     >> javaOpts=%JAVA_OPTS%
>     >> --- end-1
>     >>
>     >> --- begin-2
>     >> JAVA_OPTS=-Xmx4g
>     >> javaOpts=%JAVA_OPTS%
>     >> --- end-2
>     >>
>     >> Thanks,
>     >> Shu-Ju
>     >>
>     >>
>     >>
>     >>
>     >> 2017-05-21 17:32 GMT+08:00 Eibe Frank <[hidden email]>:
>     >>> _JAVA_OPTIONS doesn't work for you? If you use that, you don't have to mess around with RunWeka.ini at all.
>     >>>
>     >>> Cheers,
>     >>> Eibe
>     >>>
>     >>>> On 21 May 2017, at 14:59, Shu-Ju Tu <[hidden email]> wrote:
>     >>>>
>     >>>> Thanks, Eibe,
>     >>>>
>     >>>> Then I modified the RunWeka.ini as the following
>     >>>> Is this the correct way to do that?
>     >>>>
>     >>>> --- begin
>     >>>> JAVA_OPTS="-Xmx4g"
>     >>>> javaOpts=%JAVA_OPTS%
>     >>>> --- end
>     >>>>
>     >>>> Warm regards,
>     >>>> Shu-Ju
>     >>>>
>     >>>>
>     >>>>
>     >>>> 2017-05-20 7:09 GMT+08:00 Eibe Frank <[hidden email]>:
>     >>>>> 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.
>     >>>>>
>     >>>>> Cheers,
>     >>>>> Eibe
>     >>>>>
>     >>>>>> On 19 May 2017, at 19:48, Shu-Ju Tu <[hidden email]> wrote:
>     >>>>>>
>     >>>>>> Hi
>     >>>>>>
>     >>>>>> I am running Weka 3.8.1 and having a problem of out-of-memory.
>     >>>>>>
>     >>>>>> I compared the RunWeka.ini between 3.8/3.8.1 and there is a difference
>     >>>>>> as shown in the following
>     >>>>>>
>     >>>>>> RunWeka.ini 3.8
>     >>>>>> maxheap=1024M
>     >>>>>>
>     >>>>>> RunWeka.ini 3.8.1
>     >>>>>> maxstack=20m
>     >>>>>>
>     >>>>>> In Weka 3.8.1
>     >>>>>> Should I manually add maxheap to some larger value?
>     >>>>>> Say maxheap=16G
>     >>>>>> or
>     >>>>>> modify maxstack to some larger value?
>     >>>>>> Say maxstack=16G
>     >>>>>>
>     >>>>>> Please kindly help me when you can get a chance.
>     >>>>>>
>     >>>>>> Warm regards,
>     >>>>>> Shu-Ju
>     >>>>>> _______________________________________________
>     >>>>>> Wekalist mailing list
>     >>>>>> Send posts to: [hidden email]
>     >>>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>     >>>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>     >>>>>
>     >>>>> _______________________________________________
>     >>>>> Wekalist mailing list
>     >>>>> Send posts to: [hidden email]
>     >>>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>     >>>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>     >>>> _______________________________________________
>     >>>> Wekalist mailing list
>     >>>> Send posts to: [hidden email]
>     >>>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>     >>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>     >>>
>     >>> _______________________________________________
>     >>> Wekalist mailing list
>     >>> Send posts to: [hidden email]
>     >>> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>     >>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>     >> _______________________________________________
>     >> Wekalist mailing list
>     >> Send posts to: [hidden email]
>     >> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>     >> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>     >
>     > _______________________________________________
>     > Wekalist mailing list
>     > Send posts to: [hidden email]
>     > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>     > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>     _______________________________________________
>     Wekalist mailing list
>     Send posts to: [hidden email]
>     List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
>     List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html