All threads (200) are currently busy解决方案
来源:互联网 发布:sas程序员招聘 编辑:程序博客网 时间:2024/06/06 11:45
2011年1月22日
高级性能测试人员技能
1. 开发知识:
n 至少熟练掌握一门面向对象编程语言(例如C#),熟悉2门或者多门语言(具体需要熟悉哪些语言,可以根据项目情况在做决定)。
n 至少掌握两门脚本语言,在Windows平台下掌握VBScript(简单易学,对测试来讲很实用),在Linux平台下掌握Perl。
2. 数据库知识:
n 至少熟练掌握一个数据库相关性能调优和管理,要到中级DBA水平(推荐是Oracle数据库),了解MySql或者SqlServer数据库。
3. 操作系统:
n 至少熟练掌握Linux操作系统的性能调优和管理,要达到中级系统管理水平(推荐RedHat Linux操作系统)。了解其他的Unix操作系统
n 网络知识:
n 熟悉掌握TCP/IP协议,
4. 测试知识:
n 至少掌握两个性能测试工具,一个是Windows平台,另一个是Linux平台:LoadRunner、http_load等。
n 熟悉相关的测试理论知识。
5. 软件工程:
n 掌握UML、设计模式、开发模式等至少
6. 行业知识:
n 了解项目所在的行业知识
说明相关知识会将继续添加。。。
posted @ 2011-01-22 19:32 小糊涂仙 阅读(14) | 评论(0) | 编辑
2010年1月16日
Elearning性能测试总结报告
Elearning性能测试总结报告
一、 项目情况
项目名称
Elearning
调优过程
定位出应用程序存在非线程安全代码
DBA 定位到未加绑定变量的SQL以及为数据库增加索引
增加jboss ajp connector 线程数
调整jvm 参数
调整DBCP 连接池参数
调高 log4j日志阀值减少IO
问题积累
在已经满足性能情况下, 服务器硬件充足,但web server层错误频率高
最终结论
耗费在增加http header、定位非线程安全以及dbcp连接参数不当时间最昂贵。本次性能测试与调优涉及多个层面,定位性能瓶颈依赖平常的知识积累,只要拆分模块得当,定位瓶颈有模式可以遵循。为了排查瓶颈是否在数据库要DBA协助。
另外,碰到问题,google是一流的帮手!
资源消耗
历时2周
二、 执行中问题与解决方案
I类问题(已解决):
编号
问题描述
解决方法
1
手工执行功能成功,但vugen执行脚本服务器响应返回0字节
利用嗅探器ethereal发现手工执行与vugen执行脚本的差异,增加web_add_auto_header("modeltype","model");
解决问题后,经咨询东软开发工程师,服务器端解析输入代码有
if ("model".equals(webRequest.getHeader("ModelType")))
判断
2
Contoller Insufficient records for param X in table to provide the Vuser with unique data
删除根盘目录 Local Settings/Temp下文件,排除干扰
3
并发执行时,发现服务器随机错误,确认有非线程安全代码
在客户端、服务器端分别用嗅探器(fiddler , ethereal, tcpdump )确认发包、收包的状况,确认发包正确,服务器HttpRequest接收到的包也正确。故程序出现在内部变量未做到线程同步
4
Apache error_log : [error] server reached MaxClients setting, consider raising the MaxClients setting
在httpd.conf增加:
StartServers 10
MinSpareServers 10
MaxSpareServers 15
ServerLimit 3000
MaxClients 2000
MaxRequestsPerChild 10000
KeepAliveTimeout 30
并重启httpd服务
5
java.lang.OutOfMemoryError: PermGen space、
java.lang.OutOfMemoryError: unable to create new native
调整JVM,增加堆、栈控制等参数。最终
Run.conf:
JAVA_OPTS="-Xms1536m -Xmx1536m -XX:PermSize=512m -XX:MaxPermSize=512m -Xss256k -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
6
jboss server.log有All threads (200) are currently busy, waiting. Increase maxThreads (200) or check the servlet status
Apache通过mod_jk1.2 转发http 请求给jboss。
故修改 jboss-4.0.5.GA/server/default/deploy/server.xml
调整ajp connector 设置:
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector port="8009" address="${jboss.bind.address}" backlog="1200"
maxThreads="2100" minSpareThreads="20" maxSpareThreads="50"
emptySessionPath="true" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3"/>
同时在linux 的.bash_profile 增加文件句柄: ulimit -n 4096
7
ORA-00020: maximum number of processes (600) exceeded
利用oracle statspack以及检查wait event,没有发现数据库方面有阻塞!故定位到连接池参数配置不当导致异常。
更改apache dbcp连接池参数,防止连接leak 。
<set property="removeAbandoned" value="true"/>
<set property="removeAbandonedTimeout" value="60"/>
<set property="logAbandoned" value="true"/>
8
调整log4j 日志级别
在jboss-4.0.5.GA/server/default/conf/log4j.xml
增加日志输出阀值:
<param value="ERROR"/>
II类问题(未解决):
编号
问题描述
规避方案
1
III类问题(遗留):
编号
问题描述
遗留原因
1
在已经满足性能情况下, 服务器硬件充足,但web server层应用代码大量错误
已经满足性能。建议采用tptp 、jprofiler或者JRockit Mission Control 之类工具定位热点方法
三、 技术拓展
调优用到的资料参考:
1 Apache Tomcat Configuration Reference http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
2 OutOfMemoryExceptionWhenRedeploying http://wiki.jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenRedeploying
3 Preventing dB connection pool leaks
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
4 Apache Performance Tuning
http://httpd.apache.org/docs/2.0/misc/perf-tuning.html
5 Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
posted @ 2010-01-16 15:36 小糊涂仙 阅读(1116) | 评论(0) | 编辑
- All threads (200) are currently busy解决方案
- Tomcat All threads (150) are currently busy
- 解决all threads are currently busy
- Remote Desktop Services are currently busy
- RemotingException: “All pipe instances are busy.” or “The system cannot find the file specified.” ★★
- Some Oracle products are currently in use. Please stop all Windows NT services and quit applications
- What are threads?
- What Are Threads?
- The project you are trying to remove is currently deployed to a running application server.解决方案
- Why are many people busy?
- Are You Busy or Productive?
- vpn报错:OpenVPN for Win32 "All TAP-Win32 adapters on this system are currently in use"
- What are threads (user/kernel)?
- Why Windows Threads Are Better Than POSIX Threads
- one or more partitions are busy
- HDU_3565 Are You Busy(DP,状态转换)
- check all threads in a process
- ORA-01075: you are currently logged on
- ASP.NET中进行消息处理(MSMQ)二
- WinForm下ComboBox获取绑定对象集的SelectedValue补充
- iModel中的模型继承关系
- xcode 高版本sdk编译适合低版本sdk的设置
- js文本替换(高亮效果)
- All threads (200) are currently busy解决方案
- COM组件的内部流程简介
- sql中 in 、not in 、exists、not exists 用法和差别
- 导出excel
- Linux I2C核心、总线与设备驱动
- [DBA手记]IMP-00093错误的解决方法
- IE8提示找不到元素
- AS3和JavaScript的通讯
- SELECT INTO 和 INSERT INTO SELECT 两种表复制语句