title: java gc 100% of from and 0% of to space
body: <p>get a strange problem, the From space is 100% and to space is always 0.
  anyone can help me get out of here?</p>
  
  <p>jdk <strong>1.8.25</strong>
  os: <strong>linux</strong></p>
  
  <p>get the following with JMAP</p>
  
  <pre><code>Heap Configuration:
     MinHeapFreeRatio         = 40
     MaxHeapFreeRatio         = 70
     MaxHeapSize              = 32212254720 (30720.0MB)
     NewSize                  = 268435456 (256.0MB)
     MaxNewSize               = 268435456 (256.0MB)
     OldSize                  = 31943819264 (30464.0MB)
     NewRatio                 = 5
     SurvivorRatio            = 4
     MetaspaceSize            = 268435456 (256.0MB)
     CompressedClassSpaceSize = 1073741824 (1024.0MB)
     MaxMetaspaceSize         = 268435456 (256.0MB)
     G1HeapRegionSize         = 0 (0.0MB)
  
  Heap Usage:
      New Generation (Eden + 1 Survivor Space):
     capacity = 223739904 (213.375MB)
     used     = 113230096 (107.98463439941406MB)
     free     = 110509808 (105.39036560058594MB)
     50.607913016714264% used
  Eden Space:
     capacity = 179044352 (170.75MB)
     used     = 68534544 (65.35963439941406MB)
     free     = 110509808 (105.39036560058594MB)
     38.27797036568906% used
  From Space:
     capacity = 44695552 (42.625MB)
     used     = 44695552 (42.625MB)
     free     = 0 (0.0MB)
     100.0% used
  To Space:
     capacity = 44695552 (42.625MB)
     used     = 0 (0.0MB)
     free     = 44695552 (42.625MB)
     0.0% used
  concurrent mark-sweep generation:
     capacity = 31943819264 (30464.0MB)
     used     = 390280592 (372.20057678222656MB)
     free     = 31553538672 (30091.799423217773MB)
     1.2217718513072038% used
  </code></pre>
  
  <p>in gc.log, it always say 'allocation failure', how can i change the 'survivor size'?</p>
  
  <pre><code>[GC (Allocation Failure) 10.371: [ParNew Desired survivor size 22347776 bytes, new threshold 15
  </code></pre>