<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Martin&#039;s Blog &#187; benchmark</title>
	<atom:link href="http://martinliu.cn/tag/benchmark/feed" rel="self" type="application/rss+xml" />
	<link>http://martinliu.cn</link>
	<description>如何以服务的视角管理IT？</description>
	<lastBuildDate>Wed, 08 Feb 2012 08:10:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tomcat压力测试-挺住200并发</title>
		<link>http://martinliu.cn/2009/07/tomcat%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95-%e6%8c%ba%e4%bd%8f200%e5%b9%b6%e5%8f%91.html</link>
		<comments>http://martinliu.cn/2009/07/tomcat%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95-%e6%8c%ba%e4%bd%8f200%e5%b9%b6%e5%8f%91.html#comments</comments>
		<pubDate>Sat, 04 Jul 2009 05:37:57 +0000</pubDate>
		<dc:creator>Martin Liu</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[loadrunner]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://martinliu.byteact.com/?p=448</guid>
		<description><![CDATA[最近在CCB的测试中有一项是住系统登陆页面的压力测试。我一直就很担心是否能通过压力测试，因为一个同事告诉我上次他的结果是80就不行了。总结一下，我这次成功的原因主要就是两个地方： 1）设置Tomcat启动和最大内存使用都是1500MB 2）修改server.xml中关于连接数等参数(回头贴出我的那些配置内容) 我的服务器配置如下： Dell 2950 1C4核，8GB内存，单块136GB硬盘，Windows2003系统，JDK1.6，Tomcat 5.5.21 另外，我一直以为Loadrunner需要真实Lic文件才能用，没想到的是，我随便在网上搜了一个也能用，真是神奇啊！ 不过还是反对盗版哈哈:) Related posts: How to deploy mid-tier to tomcat 7 MartinMark for July 7th For tomcat benchmark testing
Related posts:<ol>
<li><a href='http://martinliu.cn/2011/05/how-to-deploy-mid-tier-to-tomcat-7.html' rel='bookmark' title='How to deploy mid-tier to tomcat 7'>How to deploy mid-tier to tomcat 7</a></li>
<li><a href='http://martinliu.cn/2009/07/martinmark-for-july-7th.html' rel='bookmark' title='MartinMark for July 7th'>MartinMark for July 7th</a></li>
<li><a href='http://martinliu.cn/2009/07/for-tomcat-benchmark-testing.html' rel='bookmark' title='For tomcat benchmark testing'>For tomcat benchmark testing</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.willisms.com/archives/tomcat.jpg" alt="tomcat.jpg" width="516" height="407" /><br />
最近在CCB的测试中有一项是住系统登陆页面的压力测试。我一直就很担心是否能通过压力测试，因为一个同事告诉我上次他的结果是80就不行了。总结一下，我这次成功的原因主要就是两个地方：<br />
1）设置Tomcat启动和最大内存使用都是1500MB<br />
2）修改server.xml中关于连接数等参数(回头贴出我的那些配置内容)</p>
<p>我的服务器配置如下：<br />
Dell 2950 1C4核，8GB内存，单块136GB硬盘，Windows2003系统，JDK1.6，Tomcat 5.5.21</p>
<p>另外，我一直以为Loadrunner需要真实Lic文件才能用，没想到的是，我随便在网上搜了一个也能用，真是神奇啊！ 不过还是反对盗版哈哈:)</p>
<p>Related posts:<ol>
<li><a href='http://martinliu.cn/2011/05/how-to-deploy-mid-tier-to-tomcat-7.html' rel='bookmark' title='How to deploy mid-tier to tomcat 7'>How to deploy mid-tier to tomcat 7</a></li>
<li><a href='http://martinliu.cn/2009/07/martinmark-for-july-7th.html' rel='bookmark' title='MartinMark for July 7th'>MartinMark for July 7th</a></li>
<li><a href='http://martinliu.cn/2009/07/for-tomcat-benchmark-testing.html' rel='bookmark' title='For tomcat benchmark testing'>For tomcat benchmark testing</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://martinliu.cn/2009/07/tomcat%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95-%e6%8c%ba%e4%bd%8f200%e5%b9%b6%e5%8f%91.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>For tomcat benchmark testing</title>
		<link>http://martinliu.cn/2009/07/for-tomcat-benchmark-testing.html</link>
		<comments>http://martinliu.cn/2009/07/for-tomcat-benchmark-testing.html#comments</comments>
		<pubDate>Sat, 04 Jul 2009 05:36:03 +0000</pubDate>
		<dc:creator>Martin Liu</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://martinliu.byteact.com/?p=446</guid>
		<description><![CDATA[Tomcat Configuration 查看一下可以配置的参数 设置JVM的参数Setting JVM Options for Tomcat Edit the /usr/locat/apache-tomcat/bin/catalina.sh file and add the JVM options to the JAVA_OPTS environment variable.JVM Option Value Description -Xmx 4g The maximum Java heap size. -Xms 4g The initial Java heap size. -Xmn 1g The size of young generation. -XX:+UseParallelGC – To use parallel garbage collection for scavenges.<p><a href="http://martinliu.cn/2009/07/for-tomcat-benchmark-testing.html" class="more-link">Continue reading &#187;</a></p>
Related posts:<ol>
<li><a href='http://martinliu.cn/2011/05/how-to-deploy-mid-tier-to-tomcat-7.html' rel='bookmark' title='How to deploy mid-tier to tomcat 7'>How to deploy mid-tier to tomcat 7</a></li>
<li><a href='http://martinliu.cn/2009/07/martinmark-for-july-7th.html' rel='bookmark' title='MartinMark for July 7th'>MartinMark for July 7th</a></li>
<li><a href='http://martinliu.cn/2009/07/tomcat%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95-%e6%8c%ba%e4%bd%8f200%e5%b9%b6%e5%8f%91.html' rel='bookmark' title='Tomcat压力测试-挺住200并发'>Tomcat压力测试-挺住200并发</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Tomcat Configuration  查看一下可以配置的参数<img src="http://tech.tomarea.com/wp-content/uploads/2009/02/tomcat-300x261.jpg" alt="TomCat" width="300" height="261"></p>
<p><strong>设置JVM的参数Setting JVM Options for Tomcat</strong></p>
<p>Edit the /usr/locat/apache-tomcat/bin/catalina.sh file and add the JVM options to the JAVA_OPTS environment variable.JVM Option Value Description<br />
-Xmx 4g The maximum Java heap size.<br />
-Xms 4g The initial Java heap size.<br />
-Xmn 1g The size of young generation.<br />
-XX:+UseParallelGC – To use parallel garbage collection for scavenges.<br />
-XX:PermSize 50m The initial size of permanent generation.<br />
注释：上面两个4g的值，我没试过，我用8GB内存windows的机器1.5GB能启动，超过了Tomcat服务就启动不了了。</p>
<p><strong>配置Tomcat Connector Attributes</strong><br />
Edit the /usr/locat/apache-tomcat/conf/server.xml file and add the attributes listed in Table 3 to the Connector element.</p>
<p>下面是个例子供参考<br />
&lt;Connector port=&#8221;8080&#8243; protocol=&#8221;HTTP/1.1&#8243; maxThreads=&#8221;3000&#8243; acceptCount=&#8221;200&#8243; /&gt;<br />
Tomcat Configuration Attribute Value Description<br />
The maximum number of request processing threads to be created by this connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, the default value for this attribute is 40. If an executor is associated with this connector, this attribute is ignored and the connector executes tasks using the executor rather than an internal thread pool.<br />
maxThreads 3000<br />
The maximum queue length for incoming connection requests when all<br />
possible request processing threads are in use. Any requests received when<br />
the queue is full are refused. The default value is 10.<br />
acceptCount 2000<br />
The number of request processing threads that are created when this connector<br />
is first started. The connector also verifies that it has the specified number of<br />
idle processing threads available. This attribute should be set to a value smaller<br />
than that set for maxThreads. The default value is 4.<br />
minSpareThreads 500<br />
The maximum number of unused request processing threads that are allowed<br />
to exist until the thread pool starts stopping the unnecessary threads. The<br />
default value is 50.<br />
maxSpareThreads 2000<br />
Set to “true” if you want calls to request.getRemoteHost() to perform DNS<br />
lookups in order to return the actual host name of the remote client. Set to<br />
enableLookups false “false” to skip the DNS lookup and return the IP address in String form instead<br />
(thereby improving performance). By default, DNS lookups are enabled.</p>
<p>上面的值比我实际使用的大，我的200并发测试通过了，硬件配置见前一帖。</p>
<p>Related posts:<ol>
<li><a href='http://martinliu.cn/2011/05/how-to-deploy-mid-tier-to-tomcat-7.html' rel='bookmark' title='How to deploy mid-tier to tomcat 7'>How to deploy mid-tier to tomcat 7</a></li>
<li><a href='http://martinliu.cn/2009/07/martinmark-for-july-7th.html' rel='bookmark' title='MartinMark for July 7th'>MartinMark for July 7th</a></li>
<li><a href='http://martinliu.cn/2009/07/tomcat%e5%8e%8b%e5%8a%9b%e6%b5%8b%e8%af%95-%e6%8c%ba%e4%bd%8f200%e5%b9%b6%e5%8f%91.html' rel='bookmark' title='Tomcat压力测试-挺住200并发'>Tomcat压力测试-挺住200并发</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://martinliu.cn/2009/07/for-tomcat-benchmark-testing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

