SlideShare une entreprise Scribd logo
1  sur  22
天猫大促性能测试实践
天猫 - 耿电
大纲
兴趣性能测试
推动性能优化
性能预案测试
容量性能测试
会后交流议题
引言
• 整点秒杀时,有抢到红包吗?有秒到喜欢
的宝贝吗?
• 有抢,大家试想下背后有多少人在重复的
刷新页面 ctrl+F5,告诉一个真实的数字;宝贝详情页浏览高峰:
17.2万/秒
性能项目模式
• 面对应接不暇的需求
• N多的会议
• ‘拒绝’硬性需求主动出击
• 兴趣来Owner和挑战
产品性能切入点
性能测试范畴
• 性能稳定《Code review规范》
• 静态代码扫描(FindBugs定制性能)
• 动态代码性能测试
• 线上挖掘性能Bug和优化
多维度性能
大纲
兴趣性能测试
推动性能优化
性能预案测试
容量性能测试
会后交流议题
性能优化方法(简)
优化远
程调用
• 减少远程调用,尽量使用本地调用
• 批量接口代替循环调用
数据共
享
• 使用线程缓存共享线程级别数据
• 使用分布式缓存共享应用级别数据
使用高
效API
• 选择高效API来优化程序(例如字符串拼接、编解码)
• XML、JSON解析,序列化/反序列化的开源包选择
JVM优
化
• 优化堆内存结构、比例
• 调整GC类型,JVM调优,线程
性能瓶颈CheckList
• LinkedBlockingQueue 队列1任务
调度
• EventSendMulticaster – 发送事件
• 队列节点总数为378002760/
(1720+32)=215755个
• 堆内存由300M升到400M,
FGC=110次/h
<bean id="eventSendMulticaster" cla
ss="com.taobao.inventory.core.ev
ent.controll.EventSendMulticaster
">
<property name="taskCount" val
ue="15"></property>
性能优化后:
解决FGC频繁问题,性能提升3倍
案例-线程阻塞和性能优化
性能优化工具简介
Btrace、Triton
MAT(Memory Analyzer Tool )
Jprofiler
YourKit
TDA(Thread Dump Analyzer)
……
Triton
• 功能丰富(响应时间、瓶颈分析、上下文分析、堆栈死锁检查等)
• 动态性(非代码侵入,快速分析、不影响性能)
• 实时性、交互性(使用方便,学习成本低)
• 专利:《一种基于字节码分析和Instrument的代码性能消耗分析
方法》
大纲
兴趣性能测试
推动性能优化
性能预案测试
容量性能测试
会后交流议题
预案类型
• 限流
• 降级
• 被动
• 防攻击
预案操作
• 单&组合
• 手动&自动
• 业务&性能
• Web&服务
预案介绍
预案性能分析策略
预案(功能OK)
性能环境(Test env)
1. 产品业务流程
2. 产品用户体验
1. 本应用性能稳定影响
2. 是否触发性能bug
3. 上下游性能关联影响
线上环境(Online) 1. 本应用性能稳定影响
2. 是否触发性能bug
3. 上下游性能关联影响
1. 产品业务流程
2. 产品用户体验
3. 用户利益
预案性能测试
大纲
兴趣性能测试
推动性能优化
性能预案测试
容量性能测试
会后交流议题
容量性能测试
• 单接口性能(容量)
• 应用性能(容量)
• 核心产品链路性能
• 水位、预警、预测,告警通知,扩容;
容量规划
• 容量监控 - 实时透明
• 容量预警 - 告警值班
• 容量预测 - 模型预估
• 容量扩容 – 充分(N)余量
交流议题
• 性能测试烦恼问题,以及性能发展趋
势
• 如何建设适宜的性能测试平台
• 轻量级性能测试
• 如何控制性能测试成本?
旺旺:耿电
邮箱:gengdian@tmall.com
微博:亚拉冈王_耿电
天猫测试博客: http://tmalltesting.com/

Contenu connexe

Similaire à 天猫大促性能测试实践 耿电

测试驱动的前端开发初探
测试驱动的前端开发初探测试驱动的前端开发初探
测试驱动的前端开发初探hua qiu
 
Test driven-frontend-develop
Test driven-frontend-developTest driven-frontend-develop
Test driven-frontend-developfangdeng
 
姚彤 从360手机卫士的研发经历看大型移动应用开发
姚彤 从360手机卫士的研发经历看大型移动应用开发姚彤 从360手机卫士的研发经历看大型移动应用开发
姚彤 从360手机卫士的研发经历看大型移动应用开发Trinea Trinea
 
淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化丁 宇
 
出了问题不要靠猜
出了问题不要靠猜出了问题不要靠猜
出了问题不要靠猜LI Daobing
 
网站前端代码静态检查工具研究
网站前端代码静态检查工具研究网站前端代码静态检查工具研究
网站前端代码静态检查工具研究pop2008
 
柴锋 跨平台移动应用的自动化验收测试
柴锋 跨平台移动应用的自动化验收测试柴锋 跨平台移动应用的自动化验收测试
柴锋 跨平台移动应用的自动化验收测试Trinea Trinea
 
淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践丁 宇
 
网站前端代码静态检查工具综述
网站前端代码静态检查工具综述网站前端代码静态检查工具综述
网站前端代码静态检查工具综述pop2008
 
金山云查询系统改进之路1
金山云查询系统改进之路1金山云查询系统改进之路1
金山云查询系统改进之路1Zoom Quiet
 
Top100summit 宗刚-全生命周期性能评估体系的实践
Top100summit 宗刚-全生命周期性能评估体系的实践Top100summit 宗刚-全生命周期性能评估体系的实践
Top100summit 宗刚-全生命周期性能评估体系的实践drewz lin
 
Nginx深度開發與客制化
Nginx深度開發與客制化Nginx深度開發與客制化
Nginx深度開發與客制化Joshua Zhu
 
網頁弱點掃描服務簡報 20120606
網頁弱點掃描服務簡報 20120606網頁弱點掃描服務簡報 20120606
網頁弱點掃描服務簡報 20120606Fionsu
 
Mobile app的測試v2
Mobile app的測試v2Mobile app的測試v2
Mobile app的測試v2Mr PM
 
Simple Rule Agile China 2009
Simple Rule   Agile China 2009Simple Rule   Agile China 2009
Simple Rule Agile China 2009JohnnLi
 
前端调试工具,编码相关,性能相关
前端调试工具,编码相关,性能相关前端调试工具,编码相关,性能相关
前端调试工具,编码相关,性能相关jay li
 
GitLab—the new workbench
GitLab—the new workbenchGitLab—the new workbench
GitLab—the new workbenchtblanlan
 
Gitlab - the new workbench (2nd edition)
Gitlab - the new workbench (2nd edition)Gitlab - the new workbench (2nd edition)
Gitlab - the new workbench (2nd edition)Pu Shiming
 
构建可维护的Javascript 小米网
构建可维护的Javascript 小米网构建可维护的Javascript 小米网
构建可维护的Javascript 小米网yang alex
 

Similaire à 天猫大促性能测试实践 耿电 (20)

测试驱动的前端开发初探
测试驱动的前端开发初探测试驱动的前端开发初探
测试驱动的前端开发初探
 
Test driven-frontend-develop
Test driven-frontend-developTest driven-frontend-develop
Test driven-frontend-develop
 
姚彤 从360手机卫士的研发经历看大型移动应用开发
姚彤 从360手机卫士的研发经历看大型移动应用开发姚彤 从360手机卫士的研发经历看大型移动应用开发
姚彤 从360手机卫士的研发经历看大型移动应用开发
 
淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化
 
出了问题不要靠猜
出了问题不要靠猜出了问题不要靠猜
出了问题不要靠猜
 
网站前端代码静态检查工具研究
网站前端代码静态检查工具研究网站前端代码静态检查工具研究
网站前端代码静态检查工具研究
 
柴锋 跨平台移动应用的自动化验收测试
柴锋 跨平台移动应用的自动化验收测试柴锋 跨平台移动应用的自动化验收测试
柴锋 跨平台移动应用的自动化验收测试
 
淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践
 
BDD in .NET
BDD in .NETBDD in .NET
BDD in .NET
 
网站前端代码静态检查工具综述
网站前端代码静态检查工具综述网站前端代码静态检查工具综述
网站前端代码静态检查工具综述
 
金山云查询系统改进之路1
金山云查询系统改进之路1金山云查询系统改进之路1
金山云查询系统改进之路1
 
Top100summit 宗刚-全生命周期性能评估体系的实践
Top100summit 宗刚-全生命周期性能评估体系的实践Top100summit 宗刚-全生命周期性能评估体系的实践
Top100summit 宗刚-全生命周期性能评估体系的实践
 
Nginx深度開發與客制化
Nginx深度開發與客制化Nginx深度開發與客制化
Nginx深度開發與客制化
 
網頁弱點掃描服務簡報 20120606
網頁弱點掃描服務簡報 20120606網頁弱點掃描服務簡報 20120606
網頁弱點掃描服務簡報 20120606
 
Mobile app的測試v2
Mobile app的測試v2Mobile app的測試v2
Mobile app的測試v2
 
Simple Rule Agile China 2009
Simple Rule   Agile China 2009Simple Rule   Agile China 2009
Simple Rule Agile China 2009
 
前端调试工具,编码相关,性能相关
前端调试工具,编码相关,性能相关前端调试工具,编码相关,性能相关
前端调试工具,编码相关,性能相关
 
GitLab—the new workbench
GitLab—the new workbenchGitLab—the new workbench
GitLab—the new workbench
 
Gitlab - the new workbench (2nd edition)
Gitlab - the new workbench (2nd edition)Gitlab - the new workbench (2nd edition)
Gitlab - the new workbench (2nd edition)
 
构建可维护的Javascript 小米网
构建可维护的Javascript 小米网构建可维护的Javascript 小米网
构建可维护的Javascript 小米网
 

Plus de drewz lin

Web security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearydrewz lin
 
Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013drewz lin
 
Phu appsec13
Phu appsec13Phu appsec13
Phu appsec13drewz lin
 
Owasp2013 johannesullrich
Owasp2013 johannesullrichOwasp2013 johannesullrich
Owasp2013 johannesullrichdrewz lin
 
Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2drewz lin
 
I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2drewz lin
 
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfDefeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfdrewz lin
 
Csrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equalCsrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equaldrewz lin
 
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21drewz lin
 
Appsec usa roberthansen
Appsec usa roberthansenAppsec usa roberthansen
Appsec usa roberthansendrewz lin
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaoladrewz lin
 
Appsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsAppsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsdrewz lin
 
Appsec2013 presentation
Appsec2013 presentationAppsec2013 presentation
Appsec2013 presentationdrewz lin
 
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsAppsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsdrewz lin
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martindrewz lin
 
Amol scadaowasp
Amol scadaowaspAmol scadaowasp
Amol scadaowaspdrewz lin
 
Agile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usaAgile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usadrewz lin
 
Vulnex app secusa2013
Vulnex app secusa2013Vulnex app secusa2013
Vulnex app secusa2013drewz lin
 
基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架drewz lin
 
新浪微博稳定性经验谈
新浪微博稳定性经验谈新浪微博稳定性经验谈
新浪微博稳定性经验谈drewz lin
 

Plus de drewz lin (20)

Web security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-keary
 
Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013
 
Phu appsec13
Phu appsec13Phu appsec13
Phu appsec13
 
Owasp2013 johannesullrich
Owasp2013 johannesullrichOwasp2013 johannesullrich
Owasp2013 johannesullrich
 
Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2
 
I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2
 
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfDefeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
 
Csrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equalCsrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equal
 
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
 
Appsec usa roberthansen
Appsec usa roberthansenAppsec usa roberthansen
Appsec usa roberthansen
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaola
 
Appsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsAppsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_edits
 
Appsec2013 presentation
Appsec2013 presentationAppsec2013 presentation
Appsec2013 presentation
 
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsAppsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martin
 
Amol scadaowasp
Amol scadaowaspAmol scadaowasp
Amol scadaowasp
 
Agile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usaAgile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usa
 
Vulnex app secusa2013
Vulnex app secusa2013Vulnex app secusa2013
Vulnex app secusa2013
 
基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架
 
新浪微博稳定性经验谈
新浪微博稳定性经验谈新浪微博稳定性经验谈
新浪微博稳定性经验谈
 

天猫大促性能测试实践 耿电