About jvm comand :jstat and jinfo

261 views Asked by At

jstat get this:

S0C    S1C    S0U    S1U      EC       EU        OC         OU       PC     PU    YGC     YGCT    FGC    FGCT     GCT   
64512.0 68096.0 46476.6  0.0   535552.0 125004.4  154624.0   106045.5  29184.0 28595.3     12    0.620   1      0.200    0.820

now i use the comand ./jinfo -flag PermSize 8216get the output:

-XX:PermSize=21757952

and with ./jinfo -flag MaxPermSize 8216 get:

-XX:MaxPermSize=85983232

About jstat i find the message at oracle docs:

enter image description here

In my opinion,PC and the PermSize are the same.Obviously,that`s wrong.How should I understand the difference between PC and MaxPermSize?

On my server,there will be a permanent generation of OOM anomalies occasionally and what do i need to do to expand the capacity of PC?

This is a log fragment:

17-Nov-2017 14:57:24.681 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 53059 ms




start...
17-Nov-2017 14:58:05.202 严重 [pool-20-thread-1] org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler.handleError Unexpected error occurred in scheduled task.
 java.lang.OutOfMemoryError: PermGen space
    at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:362)
    at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:296)
    at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:583)
    at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:518)
    at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:73)
    at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:409)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:162)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1092)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
    at com.inspur.email.data.netapi.ApiJsonPuller.sendDataToBaiduApi(ApiJsonPuller.java:170)
    at com.inspur.email.data.netapi.ApiJsonPuller.getTrendJson(ApiJsonPuller.java:121)
    at com.inspur.email.data.manager.ProductReport.getReportApiData(ProductReport.java:58)
    at com.inspur.email.producer.ReportEmailProducer.getReportEmail(ReportEmailProducer.java:56)
    at com.inspur.email.manager.MailSendService.createReportEmail(MailSendService.java:82)
    at com.inspur.email.manager.MailSendService.sendReport(MailSendService.java:63)
    at com.inspur.email.controller.MailSendTimeController.startReport(MailSendTimeController.java:19)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
    at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)

use jmap get the output:

Attaching to process ID 8216, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.79-b02

using thread-local object allocation.
Parallel GC with 4 thread(s)

Heap Configuration:
   MinHeapFreeRatio = 0
   MaxHeapFreeRatio = 100
   MaxHeapSize      = 2063597568 (1968.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)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 548405248 (523.0MB)
   used     = 548405248 (523.0MB)
   free     = 0 (0.0MB)
   100.0% used
From Space:
   capacity = 66060288 (63.0MB)
   used     = 47592088 (45.387351989746094MB)
   free     = 18468200 (17.612648010253906MB)
   72.04341585673983% used
To Space:
   capacity = 69730304 (66.5MB)
   used     = 0 (0.0MB)
   free     = 69730304 (66.5MB)
   0.0% used
PS Old Generation
   capacity = 158334976 (151.0MB)
   used     = 108590592 (103.56005859375MB)
   free     = 49744384 (47.43994140625MB)
   68.5828202607616% used
PS Perm Generation
   capacity = 29884416 (28.5MB)
   used     = 29322992 (27.964584350585938MB)
   free     = 561424 (0.5354156494140625MB)
   98.12134859854714% used

the MaxPermSize is 82.0MB,the PC is 28M,so Why OOM occurs?

0

There are 0 answers