You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2007/01/26 10:11:49 UTC

[jira] Resolved: (HARMONY-2815) [classlib][security][drlvm][performance] very slow security checks with quadratical dependence on number of stack frames

     [ https://issues.apache.org/jira/browse/HARMONY-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov resolved HARMONY-2815.
--------------------------------------

    Resolution: Fixed

Fixed at r500190. 

Now DRLVM works much faster but still ~5-10x slower than JRockit 1.5 (on my T42 laptop): 

>build\win_ia32_msvc_release\deploy\jdk\jre\bin\java.exe SecurityPerfTest 50 100 150 300 350 400 450 500 1000 2000 3000 5000
50 20
100 40
150 90
300 70
350 70
400 91
450 100
500 120
1000 410
2000 1583
3000 3484
5000 10714

>java SecurityPerfTest 50 100 150 300 350 400 450 500 1000 2000 3000 5000
50 220
100 0
150 0
300 10
350 0
400 10
450 10
500 20
1000 50
2000 191
3000 440
5000 1202

> [classlib][security][drlvm][performance] very slow security checks with quadratical dependence on number of stack frames
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2815
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2815
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: any/ia32
>            Reporter: Egor Pasko
>         Assigned To: Alexey Varlamov
>            Priority: Minor
>
> consider the following test:
> -----------------------------------------------------------------------
> import java.security.Security;
> public class SecurityPerfTest {
>     public static void main(String[] args) {
>         System.setSecurityManager(new SecurityManager());
>         for (int i = 0; i < args.length; i++ ) {
>             long start_time = System.currentTimeMillis();
>             int amount = Integer.parseInt(args[i]);
>             run(amount);
>             long total_time = System.currentTimeMillis() - start_time;
>             System.out.println(amount + " " + total_time);
>         }
>    }
>    public static void run(int count) {
>        if ( count < 0 ) {
>            return;
>        }
>        //System.out.println("Runner: " +  count);
>        System.getProperty("os.name");
>        run(count - 1);
>    }
> }
> -----------------------------------------------------------------------
> where each recursive call of run() checks for security permissions
> to run it, issue the recursion depth list via command-line parameters like this:
> java SecurityPerfTest 50 100 150 300 350 400 450 500 
> on Jrockit/ia32 the time spent for each step depends linearly on the number of
> iterations:
> 50 107 // this line should be ignored
> 100 1
> 150 1
> 300 3
> 350 5
> 400 6
> 450 7
> 500 9
> on Harmony (DRLVM) the dependency looks like quadratic:
> 50 114
> 100 647
> 150 1931
> 300 13798
> 350 21171
> 400 31116
> 450 43786
> 500 59547
> I suspect too many stack unwindings performed on this microbenchmark

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