investigating the effects of using different nursery sizing policies on performance tony guan, witty...

32
Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science & Engineering University of Nebraska-Lincoln {xguan,witty,cjia}@cse.unl.edu

Upload: joan-gregory

Post on 04-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Investigating the Effects of Using Different Nursery Sizing Policies on Performance

Tony Guan, Witty Srisa-an, and Neo JiaDepartment of Computer Science & Engineering

University of Nebraska-Lincoln

{xguan,witty,cjia}@cse.unl.edu

Page 2: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Throughput performance of SPECjAppServer2004

• JBoss application server• HotSpot VM released as part

of OpenJDK1.7– Parallel generational collector

with 8 minor and 8 major collection threads

– 256 MB heap for this example (very little paging)

– Nursery and mature spaces are set to 1:2 and periodically resized to maximize throughput

2

Setting the Stage …

Page 3: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Setting the Stage

• Performance of the generational collector has something to do with such throughput behavior– Higher workload often results in higher GC

overhead– More GC work means less useful work done

by an application

3

Page 4: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

4

Not all generational collectors are created

equal!

Page 5: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Motivation

• One factor that differs among different generational collector implementations is nursery sizing policy – There are multiple ways to size the nursery

and mature space– Performance ramifications of using each

policy have not been widely investigated

5

Page 6: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Research Goals

• Can performance be affected by using different sizing policies?– Modify a VM to support multiple sizing

policies• If so, how can it be affected?

– Perform analysis by observing various metrics including execution time, throughput, GC behavior, and minimum mutator utilization

6

Page 7: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Agenda

• Overview of investigated sizing policies• Experimental methodology• Results of our evaluation• Introducing a hybrid policy• Conclusions

7

Page 8: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Sizing Policy: Fixed Ratio

Nursery

Nursery(33%)

Mature(66%)

Nursery(33%)

Mature(66%)

Size enlarged by 20%

8

Page 9: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Sizing Policy: Heap Availability

Nursery

Used Mature

Nursery

UsedMature

Nursery

UsedMature

Nursery

InitialAfter

Minor_GC1After

Minor_GC2After

Minor_GCn

9

Page 10: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Sizing Policy: GC Ergonomics

Nursery(33%)

Mature(66%)

Nursery(48%)

Mature(52%)

Nursery(40%)

Mature(60%)

Size and ratio are adjusted to meet performance goal(s)

10

Page 11: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Terminology: Copy-Reserve*

Nursery

Initial After aMinor GC

After a fewMinor GC

Copy-Reserve

Copy-Reserve = 100% of nursery*Sizing policy = FR

11

Mature UsedMature

UsedMature

Page 12: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Experimental Setting

• Three nursery sizing policies– GC Ergonomics Policy (Default)– Fixed Ratio Policy (FR) – Heap Availability Policy (HA)

• Multithreaded benchmarks– SPECjvm2008 (17)– Multithreaded benchmarks from DaCapo

(eclipse,hsqldb,lusearch,xalan)– SPECjbb2005 & SPECjAppServer2004

12

Page 13: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Experimental Setting

• JVM (Hotspot) settings:– Memory: Old:Young=2:1

• 2 times minimum heap for each application• 256MB for jAppServer2004 and 1GB for jbb2005

– GC : 8 threads for both minor & full GC, policy modification based on parallel collector

• Platform: Intel Xeon 8 cores, 16GB, running Linux• Methodology: 5 runs, report best, worst, and

average

13

Page 14: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Result: jvm2008 & DaCapo

14

The remaining thirteen benchmarks show little sensitivity to different policies

Page 15: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Analysis: jvm2008 & DaCapo

App Default HA FR

Minor Full Minor Full Minor Full

Com.sunflow 3001 344 2693 301 3034 354

Derby 2639 3 5422 3 2622 3

Crypto.aes 6308 1010 2785 1540 6300 1023

15

Using different sizing policies can affect the garbage collection performance

Page 16: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Result: jAppServer2004

16

Page 17: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Analysis: jAppServer2004

17

Config Default HA FR

Minor Full Minor Full Minor Full

25 Tx 2523 99 11196 70 2527 86

50 Tx 205 2599 22664 238 164 2706

Page 18: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Analysis: jAppServer2004

Currentheap usage

Copy-Reserve = 100% of nurserySizing policy = FR or Default

18

UsedMature

Copy-Reserve

Nursery

UsedMature

Copy-Reserve

Nursery

Mature heapusage after full

collection

FullCollection Used

Mature

Copy-Reserve

Nursery

FullCollection

Mature heapusage after full

collection

Page 19: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Analysis: jAppServer2004

Initial After aMinor GC

Nursery

Copy-Reserve Used

Mature

Nursery

Copy-Reserve

After a fewMinor GC

Copy-Reserve = 100% of nurserySizing policy = HA

19

UsedMature

Nursery

Copy-Reserve

MinorCollection

MinorCollection

Page 20: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

MMU: jAppServer2004 at 25tx

20

Page 21: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

MMU: jAppServer2004 at 40tx

21

Page 22: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

MMU: jAppServer2004 at 50tx

22

Page 23: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Result: jbb2005

23

Page 24: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

MMU: jbb2005 at 8whs

24

Page 25: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

MMU: jbb2005 at 23whs

25

Page 26: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Summary

• HA does not do as well as the other two policies when the workload is light

• HA allows the server to respond to requests significantly longer under heavy workload

26

Page 27: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

A Hybrid Policy

• Use default policy for the peak performance during light workload

• Use HA as soon as the GC behavior has reached a critical point– number of consecutive FullGC >=

consecFailure (e.g., 2)

27

Page 28: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Preliminary Evaluation: jbb2005

28

Page 29: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Preliminary Evaluation: jAppServer2004

29

Page 30: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Preliminary Evaluation: Switching Between

30

Page 31: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Conclusions

• Three nursery sizing policies are investigated using 23 benchmarks– Sizing policy does matter!

• It can impact performance and serviceability of large servers

– Up to 36% performance differences have been observed in some benchmarks

• The hybrid policy can be useful in large servers to better handle heavy workload

31

Page 32: Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science

Investigating the Effects of Using Different Nursery Sizing Policies on Performance

For source of modified hotspot & modified jbb2005 see:

http://cse.unl.edu/~xguan

Thanks!