java - JVM heap - why S0/S1 size decreases over time? -


we have java server application producing lot of temporary data, consuming lot of time in gc. trying fine tune jvm settings best performance. our jvm settings are: java -server -xmx45700m -xms34275m -xx:initialtenuringthreshold=15 -xx:maxtenuringthreshold=15 -xx:newsize=32132m -xx:survivorratio=4

we set higher survivor ratio in order prevent temp data being moved old generation area.

the weird behavior see on time s0/s1 sizes decrease configured size of 5g less 1g.

this beginning of application lifetime: heap

 psyounggen      total 27419648k, used 9887259k [0x00007ff819f80000, 0x00007ffff2380000, 0x00007ffff2380000)   eden space 21936128k, 44% used [0x00007ff819f80000,0x00007ffa6773e488,0x00007ffd54d80000)   space 5483520k, 4% used [0x00007ffea3880000,0x00007ffeb18489f0,0x00007ffff2380000)     space 5483520k, 0% used [0x00007ffd54d80000,0x00007ffd54d80000,0x00007ffea3880000)  paroldgen       total 2194432k, used 104k [0x00007ff4c9f80000, 0x00007ff54fe80000, 0x00007ff819f80000)   object space 2194432k, 0% used [0x00007ff4c9f80000,0x00007ff4c9f9a018,0x00007ff54fe80000)  pspermgen       total 37376k, used 37233k [0x00007ff4c4d80000, 0x00007ff4c7200000, 0x00007ff4c9f80000)   object space 37376k, 99% used [0x00007ff4c4d80000,0x00007ff4c71dc418,0x00007ff4c7200000)  , after time: heap  psyounggen      total 32397312k, used 4399893k [0x00007ff819f80000, 0x00007ffff2380000, 0x00007ffff2380000)   eden space 31891456k, 12% used [0x00007ff819f80000,0x00007ff907a4cbc0,0x00007fffb4780000)   space 505856k, 99% used [0x00007fffb4780000,0x00007fffd35788b8,0x00007fffd3580000)     space 505856k, 0% used [0x00007fffd3580000,0x00007fffd3580000,0x00007ffff2380000)  paroldgen       total 2194432k, used 774462k [0x00007ff4c9f80000, 0x00007ff54fe80000, 0x00007ff819f80000)   object space 2194432k, 35% used [0x00007ff4c9f80000,0x00007ff4f93cfa40,0x00007ff54fe80000)  pspermgen       total 45568k, used 45222k [0x00007ff4c4d80000, 0x00007ff4c7a00000, 0x00007ff4c9f80000)   object space 45568k, 99% used [0x00007ff4c4d80000,0x00007ff4c79a9900,0x00007ff4c7a00000) 

why did decrease 5g 0.5g ?

because using parallel collector, has throughput goal.

copying 5gb of objects , forth between survivor spaces several times wasted cpu cycles if small percentage of objects dies each tenuring interval. gc shrinks survivor spaces , copies them old generation sooner avoid repeated costs in hope rare old gen gc more efficient in terms of cpu cycles spent relative number of garbage collected, i.e. improve throughput.

your old gen has 2gb worth of objects @ point. collecting once in while cheaper gcing 5gb worth of objects several times.

the huge young generation seems odd in general. have done measurements , confirmed improves anything?


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -