0

Here is an output of jstat:

jstat -gc 7285 1s 125
 S0C      S1C      S0U      S1U      EC       EU        OC         OU    ...
22016.0  9216.0   0.0     9120.0  156160.0 153482.7   125952.0   31227.0 ...
13312.0  20992.0  9472.0    0.0   151040.0   2975.5   125952.0   31227.0 ...
13312.0  20992.0  9472.0    0.0   151040.0   5951.9   125952.0   31227.0 ...

As per the oracle documentation:

S0C Current survivor space 0 capacity (KB).
S1C Current survivor space 1 capacity (KB).

Isn't the capacity supposed to be fixed (i.e. S0C and S1C fields)?
Why are those fields changing with time?

user2250246
  • 3,807
  • 5
  • 43
  • 71
  • Who says, they are supposed to be fixed? – Holger May 22 '17 at 10:31
  • No one says they are variable. Appreciate your short reply but a little bit detail would not harm. A link to some explanation would be nice too. Unfortunately, the Oracle page does not say anything. Note that the above output is for a process running continuously. – user2250246 May 22 '17 at 17:53
  • Well, you have the observed behavior of them not being constant and your assumption that they have to be constant, which seems to come out of nothing. So I thought, perhaps you have a reason to assume them to be fixed. The actual behavior may depend on the chosen garbage collector type and JVM/GC tuning options, which you didn’t post. Since the heap size is not required to be constant, and most sizes can be configured as ratios, they consequently aren’t fixed. Maybe [this link](https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/sizing.html#sthref25) helps. – Holger May 22 '17 at 18:01
  • So for a process running continuously, this should not change, right? I did not stop, change the ratio and then restart the process – user2250246 May 22 '17 at 18:04
  • As said, this depends on the chosen garbage collector type and JVM/GC tuning options. Generations *may* get resized in certain configurations, depending on the statistics gathered by the garbage collector, see [here for an example](https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/parallel.html#parallel_collector_gen_size). – Holger May 22 '17 at 18:10

0 Answers0