ImageVerifierCode 换一换
格式:PPTX , 页数:26 ,大小:1.25MB ,
文档编号:5271765      下载积分:50 文币
快捷下载
登录下载
邮箱/手机:
温馨提示:
系统将以此处填写的邮箱或者手机号生成账号和密码,方便再次下载。 如填写123,账号和密码都是123。
支付方式: 支付宝    微信支付   
验证码:   换一换

优惠套餐
 

温馨提示:若手机下载失败,请复制以下地址【https://www.163wenku.com/d-5271765.html】到电脑浏览器->登陆(账号密码均为手机号或邮箱;不要扫码登陆)->重新下载(不再收费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  
下载须知

1: 试题类文档的标题没说有答案,则无答案;主观题也可能无答案。PPT的音视频可能无法播放。 请谨慎下单,一旦售出,概不退换。
2: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
3: 本文为用户(无敌的果实)主动上传,所有收益归该用户。163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

1,本文(Java企业应用-性能优化原则, 方法与策略.pptx)为本站会员(无敌的果实)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!

Java企业应用-性能优化原则, 方法与策略.pptx

1、Java企业应用-性能优化原则,方法与策略Outline1.Performance Basics and Methodology2.Fundamentals of Performance Tuning Profiling Driven Optimization JVM Tuning GC JIT3.Optimization Strategy for JavaEE4.RecapRecall Littles lawL=*WIn queueing theory,the long-term average number ofcustomers in a stable system,L,is equal

2、 to the long-termaverage arrival rate,multiplied by the average time acustomer spends in the system,Wsource:https:/en.wikipedia.org/wiki/Little%27s_lawThroughput and RTMeanNumberInSystem=MeanThroughput*MeanResponseTime.Throughput and RT are related Decreasing RT”almost always”improves Throughput Thr

3、oughput improving doesnt necessarily mean RTdecreasing.Performance tuning and cost saving More higher throughput/lower RT but without addingnew hardwaresource:https:/en.wikipedia.org/wiki/Little%27s_lawApproaches to PerformanceApp Algorithm optimization Profiling-drivenAppServerJava VM Upgrade(JDK&O

4、S)JVM(OS)Tuning SpecializationOperating SystemHardware Use new hardware Use cheaper hardwareJavas viewApproaches:a)Outside in approach(performance baseline)b)Layered approach(“Bottom up”or“Top down”)c)A hybrid of both a),b)Amdahls Scaling Law1Speedup=1+F:is fraction of workthat is serialN:is number

5、ofthreadssource:https:/en.wikipedia.org/wiki/Amdahl%27s_law Reduce the amount of serial work performedCosts Reduce Scaling1.Potential contributors to F:.Synchronization(synchronized&j.u.c.Lock)data structures need to be thread.JConsole(MXBean).Java Mission Control.JProfilersafe communication overhea

6、d between.HealthCenter&jucProfilerthreads.Infamous“stop the world”(aka STW)inJVM2.Cost incurred when the N gets increased.Thread context switchProfiling:Sampling vs Instrumentsamplingmethod callbarfoobarfoomainmainInstrumentbarfoomainAvailable Technology:BCI,JVMTi,javax.management,System.currentTime

7、Millis()Sampling vs Instrument.Sampling Lower overhead(determined by sampling interval)Discover unknown code Non intrusive No execution path Periodicity Bias.Instrument Wall time(estimate IO time)Full execution path Configuration on what methods to instrument Generally more data to be collectedSafep

8、oint Bias.Stack trace sampling happens only when thegiven thread at a safepoint The hot loop may not get profiled anymore.Use following tools instead Java Mission Control Honest Profiler(githup)ZProfiler(alipay internal profiling tool)Tools for Diagnostics Most of them could be found in JAVA_HOEM/bi

9、n Good reference:Troubleshooting Guide for JavaSE 6 withHotSpotVMBasics of JVM TuningGuild for GC Tuning Select the right GC algorithm parallel old,CMS and G1 collector Rule of thumb:GC overhead is ideally 10%Choose the right heap sizesource:Charlie Hunt,Binu John JavaTM performance Configure the ap

10、propriate GG parametersJIT and common optimization Important concepts Profiler guided optimization(PGO)Optimization decisions are made dynamically Mix mode execution Some common optimization Inlining Intrinsic Monomorphic dispatch Liskov substitution principleSubtypes MUST be substitutablefor their

11、base typesJIT Profiling with JITWatch JITWatch:a graphical visualization and analysis tool forunderstanding the JITEnabled by:-XX:+UnlockDiagnosticVMOptions-XX:+TraceClassLoading-XX:+LogCompilation-XX:+PrintAssemblyTypical distributed JEE architectureJava EE ContainerJava EE ApplicationRemote Bean v

12、ia RMIREST Service via HTTPDB via JDBCSystem AcloudSystem BcloudSystem CcloudThe problem.Add communication cost RPC serialization/deserialization.Can not shift resources towardsdemand.Can not share the underlying Javaartifacts(such as JIT)Multitenancy for JavaEEAppApp1 App2 App3 AppxAppServerAppServ

13、erJava VMJava VMOperating SystemHardwareOperating SystemHardware Run multiple Java EE applications(as tenants)into same Java EE containerHigh Density Cloud for JavaEEThe JavaEE applications developedseparately can be deployedseamlessly into the same container.devOps Orchestrate JavaEE application at

14、scale Infrastructure Multi-tenant JavaEE container Virtualized JVMsource:https:/Tomcat/JDK extended for PaaS AliTomcat:run multiple apps side-by-sideApp1App3 AppxApp2safelyAliTomcat(Multi-tenant)AJDK(Virtualized)OS AJDK allows for collocation of multiple JEEapps(as tenant)in a single instance of JVM

15、:Isolate application from one another.Share metadata aggressively andtransparently,such as:Hardware bytecodes of methods GC JIT:Alibaba/Alipay JDK,based on OpenJDKAAE:Alibaba Application Engine Scaling tenant application with AAE spread application evenly across hosts but pack applications on the si

16、ngle JVM as mush as possible,based on its resource capacity:CPU usage Memory(monitoring GC)DC-1DC-2AAEgFaedacbaABABBenefitsCPU100%(100*30%+100*70%)/200=50%50%ABA+BBenefits(Cont.)Eliminate the unnecessary RPC Minimize the cost caused by object serialization/de-serialization Share underlying Java artifacts as much as possible GC JIT HeapCompared with DockerDDCCPUCPUBAABCMemMemOSOSHardwareHardwareCPU overcommit via dockershared memory viaMultitenancySummary What we covered:Performance basics&methodology Performance tuning Profiling Tuning from JVM perspective Multitenancy for JavaEE

侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|