directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raffaele P. Guidi (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (DIRECTMEMORY-101) JVM never exit even the main thread finished
Date Tue, 02 Oct 2012 20:47:07 GMT

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

Raffaele P. Guidi reassigned DIRECTMEMORY-101:
----------------------------------------------

    Assignee: Raffaele P. Guidi
    
> JVM never exit even the main thread finished
> --------------------------------------------
>
>                 Key: DIRECTMEMORY-101
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-101
>             Project: Apache DirectMemory
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.2
>            Reporter: Min Zhou
>            Assignee: Raffaele P. Guidi
>         Attachments: DIRECTMEMORY-101.diff
>
>
> I wrote some microbenchmark code , which just simply put 10 millions of <key,value>
in to directorymemory.  and found that JVM never exit even the main thread finished running.
> {noformat}
> public class Benchmark
> {
>     
>     private static long ITER = 1000000000L;
>     public static double testHeap()
>     {
>         CacheService<Long, String> cacheService = new DirectMemory<Long, String>()
>                         .setNumberOfBuffers( 100 )
>                         .setSize( 10000 )
>                         .setInitialCapacity( 100000 )
>                         .setConcurrencyLevel( 1 )
>                         .setSerializer( new MessagePackSerializer() )
>                         .newCacheService();
>         
>         final String str = "helloworld";
>         // warm up
>         for(long l = 0; l < ITER; l++) {
>             cacheService.put(l, str);
>         }
>         cacheService.clear();
>         long start = System.currentTimeMillis();
>         for(long l = 0; l < ITER; l++) {
>             cacheService.put(l, str);
>         }
>         return ((double)  ITER / (System.currentTimeMillis() - start )) * 1000;
>     }
>     
>     public static void main( String[] args )
>     {
>         ITER = Long.parseLong( args[0] );
>         System.gc();
>         System.out.println("testHeap: ops=" + testHeap());
>     }
> }
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message