You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/04 22:46:41 UTC

[jira] [Commented] (TRAFODION-2566) Reduce the virtual memory allocated in Trafodion processes with JDK1.8

    [ https://issues.apache.org/jira/browse/TRAFODION-2566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956001#comment-15956001 ] 

ASF GitHub Bot commented on TRAFODION-2566:
-------------------------------------------

GitHub user selvaganesang opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1045

    [TRAFODION-2566] Reduce the virtual memory allocated in Trafodion pro…

    …cesses with JDK1.8
    
    Added two new configurable JVM options -XX:CompressedClassSpaceSize=128m and
    -XX:MaxMetaSpaceSize=128m.
    
    You can modify the default value of these options using environment variables
    JVM_COMPRESSED_CLASS_SPACE_SIZE and JVM_METASPACE_SIZE respectively.
    
    With this change the virtual memory of any SQL processes and tm is reduced by 1GB.
    
    In JDK1.8 this space is used in lieu of permanent generation. Hence, I reduced the
    default Java Objects Max heap size for SQL master, ESP and arkcmp processes to 256 MB from 512MB.
    The udrserv process continues to have 512MB of java objects space.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/selvaganesang/incubator-trafodion trafodion-2566

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1045.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1045
    
----
commit f288cc973cf7f562f7bf6ff66255f3a74608f183
Author: selvaganesang <se...@esgyn.com>
Date:   2017-04-01T00:39:46Z

    [TRAFODION-2566] Reduce the virtual memory allocated in Trafodion processes with JDK1.8
    
    Added two new configurable JVM options -XX:CompressedClassSpaceSize=128m and
    -XX:MaxMetaSpaceSize=128m.
    
    You can modify the default value of these options using environment variables
    JVM_COMPRESSED_CLASS_SPACE_SIZE and JVM_METASPACE_SIZE respectively.
    
    With this change the virtual memory of any SQL processes and tm is reduced by 1GB.
    
    In JDK1.8 this space is used in lieu of permanent generation. Hence, I reduced the
    default Java Objects Max heap size for SQL master, ESP and arkcmp processes to 256 MB from 512MB.
    The udrserv process continues to have 512MB of java objects space.

----


> Reduce the virtual memory allocated in Trafodion processes with JDK1.8
> ----------------------------------------------------------------------
>
>                 Key: TRAFODION-2566
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2566
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: sql-exe
>    Affects Versions: 2.1-incubating
>            Reporter: Selvaganesan Govindarajan
>            Assignee: Selvaganesan Govindarajan
>
> It is observed that JDK1.8 uses native memory to store class metadata in lieu of permanent generation of earlier releases. By default, JVM mmaps 1 GB of virtual address space to the process. Because Trafodion SQL processes are not generic JVM processes, it is viable to reduce the default JVM mmap for the class metadata
> In JVM1.8
> A simple hello world java program shows the following:
> Heap Configuration when java invoked as 
> java -Xmx512m Sample
>    MinHeapFreeRatio         = 0
>    MaxHeapFreeRatio         = 100
>    MaxHeapSize              = 536870912 (512.0MB)
>    NewSize                  = 178782208 (170.5MB)
>    MaxNewSize               = 178782208 (170.5MB)
>    OldSize                  = 358088704 (341.5MB)
>    NewRatio                 = 2
>    SurvivorRatio            = 8
>    MetaspaceSize            = 21807104 (20.796875MB)
>    CompressedClassSpaceSize = 1073741824 (1024.0MB)
>    MaxMetaspaceSize         = 17592186044415 MB
>    G1HeapRegionSize         = 0 (0.0MB)
> Heap Configuration when Java is invoked as
> java -XX:MaxMetaspaceSize=256m -XX:CompressedClassSpaceSize=256m -Xmx=512m Sample
>    MinHeapFreeRatio         = 0
>    MaxHeapFreeRatio         = 100
>    MaxHeapSize              = 536870912 (512.0MB)
>    NewSize                  = 178782208 (170.5MB)
>    MaxNewSize               = 178782208 (170.5MB)
>    OldSize                  = 358088704 (341.5MB)
>    NewRatio                 = 2
>    SurvivorRatio            = 8
>    MetaspaceSize            = 21807104 (20.796875MB)
>    CompressedClassSpaceSize = 268435456 (256.0MB)
>    MaxMetaspaceSize         = 268435456 (256.0MB)
>    G1HeapRegionSize         = 0 (0.0MB)
> With JDK 1.7
> $JAVA_HOME/bin/java -Xmx512m Sample
> Heap Configuration:
>    MinHeapFreeRatio = 0
>    MaxHeapFreeRatio = 100
>    MaxHeapSize      = 536870912 (512.0MB)
>    NewSize          = 1310720 (1.25MB)
>    MaxNewSize       = 17592186044415 MB
>    OldSize          = 5439488 (5.1875MB)
>    NewRatio         = 2
>    SurvivorRatio    = 8
>    PermSize         = 21757952 (20.75MB)
>    MaxPermSize      = 85983232 (82.0MB)
>    G1HeapRegionSize = 0 (0.0MB)
> Permanent Generation in 1.7 is equivalent to MaxMetaDataSpace. I am planning to reduce both MaxMetaspaceSize and CompressedClassSpace Size to 128MB.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)