You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2007/05/28 15:06:15 UTC

[jira] Created: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

[drlvm][jit] Memory management improvements in Jitrino compiler
---------------------------------------------------------------

                 Key: HARMONY-3991
                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
             Project: Harmony
          Issue Type: Improvement
          Components: DRLVM
            Reporter: Mikhail Fursov
         Attachments: memory.diff

Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
The similar situation we have today with a real specjapp2004 benchmark.

lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500032 ] 

Alexey Varlamov commented on HARMONY-3991:
------------------------------------------

The memory2.diff is applied at revision: 542754.
If VM memory over-consumption is confirmed, I suggest we close this issue and create a separate one for VM.
Do you think we need to add this test to regression suite?

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff, Test.java
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov closed HARMONY-3991.
-----------------------------------

    Resolution: Fixed

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff, Test.java
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov updated HARMONY-3991:
------------------------------------

    Attachment: memory.diff

This patch moves all preallocation in Jitrino.OPT to opt_init action and allows using lock/unlock actions to deal with situations like described above.

Here is an example of CMD line option for -Xem:opt mode with locks moved from 'codegen' alias to global path level.

XX:jit.CS_OPT.path=lock_method,opt_init,translator,optimizer,hir2lir,codegen,unlock_method

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Attachments: memory.diff
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499970 ] 

Ilya Berezhniuk commented on HARMONY-3991:
------------------------------------------

Mikhail,

I cannot reproduce such memory consumption for Test.java in interpreter mode.
I tried on 2 mashines and have got the following results:

single-core laptop 1Gb RAM
configuration               mem usage
ms512m/mx1024       579 = 512 + 67
ms256/mx512            314 = 256 + 58
ms128/mx256             183 = 128 + 65
default                           67  = 16  + 51

HT desktop 2Gb RAM
configuration               mem usage
ms512m/mx1024       579 = 512 + 67
ms256/mx512             315 = 256 + 59
ms128/mx256             183 = 128 + 65
default                           67  = 16  + 51

Thus memory consumption over allocated Java heap does not exceed 67Mb for me. I probably used different way to start VM.

So could you please describe how did you started VM to get 1Gb consumption? And how did you measure memory consumption?

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff, Test.java
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500103 ] 

Mikhail Fursov commented on HARMONY-3991:
-----------------------------------------

To reproduce this issue debug mode should be used when interpreter is slower.
I agree to close this issue and open another one.

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff, Test.java
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov updated HARMONY-3991:
------------------------------------

    Attachment: Test.java

Test.java: test to demonstrate the problem

Note: memory usage on interpreter is also very high.

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff, Test.java
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499793 ] 

Mikhail Fursov commented on HARMONY-3991:
-----------------------------------------

VM gurus, 
could I ask you to check Test.java with interpreter? It requires > 1Gig memory to run and I think this is a problem.


> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff, Test.java
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov updated HARMONY-3991:
------------------------------------

    Attachment: memory2.diff

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500096 ] 

Ilya Berezhniuk commented on HARMONY-3991:
------------------------------------------

+1 for closing this issue, because this issue relates to JIT only.

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff, Test.java
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov updated HARMONY-3991:
------------------------------------

    Attachment: memory2.diff

memory2.diff: merging with the latest Jitrino changes.

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff, memory2.diff
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov updated HARMONY-3991:
------------------------------------

    Attachment:     (was: memory2.diff)

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-3991) [drlvm][jit] Memory management improvements in Jitrino compiler

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-3991:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm][jit] Memory management improvements in Jitrino compiler
> ---------------------------------------------------------------
>
>                 Key: HARMONY-3991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3991
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: memory.diff
>
>
> Jitrino.OPT compiler allocates ~200*(bytecode method size) bytes before compiling a method.
> If the size of the method is large (~50Kb) and ~ 100-1000 threads concur to compile a method the memory footprint can be very large: 1-10Gb
> The similar situation we have today with a real specjapp2004 benchmark.
> lock_method and unlock_method actions that force Jitrino to acquire locks for each compilation session will not help today, because locking, as a PMF action, works after initial heap is requested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.