Skip to content

Commit

Permalink
add stress test doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hanahmily committed Jan 19, 2016
1 parent 7e8a124 commit 35dde20
Show file tree
Hide file tree
Showing 14 changed files with 815 additions and 0 deletions.
108 changes: 108 additions & 0 deletions sharding-jdbc-doc/public/data/chart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
var chartData = {
"compareQuery": {
labels: ["50", "100", "200", "300", "600"],
datasets: [
{
label: "JDBC",
data: [1812, 3828, 5217, 7239, 7169]
}, {
label: "Sharding-JDBC",
data: [1591, 2547, 5062, 7284, 7151]
}

]
},"compareInsert": {
labels: ["50", "100", "200", "300", "600"],
datasets: [
{
label: "JDBC",
data: [2520, 5860, 6420, 6200, 6250]
},{
label: "Sharding-JDBC",
data: [2410, 4230, 5445, 5603, 5642]
}

]
},"compareUpdate": {
labels: ["50", "100", "200", "300", "600"],
datasets: [
{
label: "JDBC",
data: [2430, 5712, 6557, 7773, 7561]
},{
label: "Sharding-JDBC",
data: [2059, 2715, 4770, 7280, 7210]
}

]
}, "singleAndDubbleQuery": {
labels: ["50", "100", "200", "300", "600"],
datasets: [
{
label: "双库",
data: [3724, 6246, 11480, 13107, 13960]
},{
label: "单库",
data: [1591, 2547, 5062, 7284, 7151]
}

]
},"singleAndDubbleInsert": {
labels: ["50", "100", "200", "300", "600"],
datasets: [
{
label: "双库",
data: [4021, 6807, 7911, 8109, 7619]
},{
label: "单库",
data: [2410, 4230, 5445, 5603, 5642]
}

]
},"singleAndDubbleUpdate": {
labels: ["50", "100", "200", "300", "600"],
datasets: [
{
label: "双库",
data: [2190, 4464, 9039, 10144, 11970]
},{
label: "单库",
data: [2059, 2715, 4770, 7280, 7210]
}
]
},"fatigueTest": {
labels: ["0", "1小时", "2小时", "3小时", "4小时", "5小时", "6小时", "7小时", "8小时"],
datasets: [
{
label: "jvm堆大小",
data: [0, 567, 533, 587, 523, 546, 577 ,534,577]
}
]
}
}

var charStyle = [

{
backgroundColor: "rgba(246,179,107,0.2)",
borderColor: "rgba(246,179,107,1)",
pointBorderColor: "rgba(246,179,107,1)",
pointBackgroundColor: "#fff",
pointBorderWidth: 1,
pointHoverRadius: 5,
pointHoverBackgroundColor: "rgba(246,179,107,1)",
pointHoverBorderColor: "rgba(246,179,107,1)",
pointHoverBorderWidth: 2,
},
{
backgroundColor: "rgba(61,134,198,0.2)",
borderColor: "rgba(61,134,198,1)",
pointBorderColor: "rgba(61,134,198,1)",
pointBackgroundColor: "#fff",
pointBorderWidth: 1,
pointHoverRadius: 5,
pointHoverBackgroundColor: "rgba(61,134,198,1)",
pointHoverBorderColor: "rgba(61,134,198,1)",
pointHoverBorderWidth: 2,
}
]
Binary file added sharding-jdbc-doc/public/img/stress_test_arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions sharding-jdbc-doc/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ <h2>相关文档</h2>

<li> <a href="http://dangdangdotcom.github.io/sharding-jdbc/post/restriction/" target="_blank">使用限制</a></li>

<li> <a href="http://dangdangdotcom.github.io/sharding-jdbc/post/stress_test/" target="_blank">压力测试报告</a></li>

<li> <a href="http://dangdangdotcom.github.io/sharding-jdbc/post/roadmap/" target="_blank">未来线路规划</a></li>

</ul>
Expand Down Expand Up @@ -356,6 +358,8 @@ <h2>相关文档</h2>

<script src="js/prism.js"></script>



</body>
</html>

167 changes: 167 additions & 0 deletions sharding-jdbc-doc/public/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,173 @@ public Collection&amp;lt;String&amp;gt; doSharding(final Collection&amp;lt;Strin
</description>
</item>

<item>
<title>压力测试报告</title>
<link>http://dangdangdotcom.github.io/sharding-jdbc/post/stress_test/</link>
<pubDate>Fri, 08 Jan 2016 16:14:21 +0800</pubDate>

<guid>http://dangdangdotcom.github.io/sharding-jdbc/post/stress_test/</guid>
<description>

&lt;h1 id=&#34;压力测试报告:da68abc810593941936aaba3d62b3b96&#34;&gt;压力测试报告&lt;/h1&gt;

&lt;h2 id=&#34;测试目的:da68abc810593941936aaba3d62b3b96&#34;&gt;测试目的&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Sharding-JDBC&lt;/code&gt;进行性能测试,客观、公正评估系统的性能,目的有三:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;对比&lt;code&gt;Sharding-JDBC&lt;/code&gt;&lt;code&gt;JDBC&lt;/code&gt;的性能。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Sharding-JDBC&lt;/code&gt;是否通过扩展数据库解决&lt;code&gt;JDBC&lt;/code&gt;吞吐量不足的问题。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Sharding-JDBC&lt;/code&gt;的稳定性。&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&#34;测试数据库配置:da68abc810593941936aaba3d62b3b96&#34;&gt;测试数据库配置&lt;/h2&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;数据库实例&lt;/th&gt;
&lt;th align=&#34;center&#34;&gt;DB1&lt;/th&gt;
&lt;th align=&#34;center&#34;&gt;DB2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;操作系统&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;centOS5.4&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;centOS5.4&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;CPU&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;2C四核&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;2C四核&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;内存&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;32GB&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;32GB&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;硬盘&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;250G*2_RAID1+600G*4_RAID10&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;250G*2_RAID1+600G*4_RAID10&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;Mysql版本&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;5.5.19&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;5.5.19&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;数据表字段数量&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;70&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;70&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;数据表行数&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;1000万&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;1000万&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&#34;网络拓扑:da68abc810593941936aaba3d62b3b96&#34;&gt;网络拓扑&lt;/h2&gt;

&lt;p&gt;&lt;img src=&#34;img/stress_test_arch.png&#34; alt=&#34;网络拓扑图&#34; /&gt;&lt;/p&gt;

&lt;h2 id=&#34;单库情况下sharding-jdbc与jdbc性能对比:da68abc810593941936aaba3d62b3b96&#34;&gt;单库情况下Sharding-JDBC与JDBC性能对比&lt;/h2&gt;

&lt;p&gt;测试结论:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;查询操作,Sharding-JDBC的TPS为JDBC的TPS的99.8%&lt;/li&gt;
&lt;li&gt;插入操作,Sharding-JDBC的TPS为JDBC的TPS的90.2%&lt;/li&gt;
&lt;li&gt;更新操作,Sharding-JDBC的TPS为JDBC的TPS的93.1%&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;查询:da68abc810593941936aaba3d62b3b96&#34;&gt;查询&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;横坐标:并发用户数&lt;/li&gt;
&lt;li&gt;纵坐标:TPS&lt;/li&gt;
&lt;/ul&gt;

&lt;canvas id=&#34;compareQuery&#34; width=&#34;400&#34; height=&#34;150&#34;&gt;&lt;/canvas&gt;

&lt;h3 id=&#34;插入:da68abc810593941936aaba3d62b3b96&#34;&gt;插入&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;横坐标:并发用户数&lt;/li&gt;
&lt;li&gt;纵坐标:TPS&lt;/li&gt;
&lt;/ul&gt;

&lt;canvas id=&#34;compareInsert&#34; width=&#34;400&#34; height=&#34;150&#34;&gt;&lt;/canvas&gt;

&lt;h3 id=&#34;更新:da68abc810593941936aaba3d62b3b96&#34;&gt;更新&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;横坐标:并发用户数&lt;/li&gt;
&lt;li&gt;纵坐标:TPS&lt;/li&gt;
&lt;/ul&gt;

&lt;canvas id=&#34;compareUpdate&#34; width=&#34;400&#34; height=&#34;150&#34;&gt;&lt;/canvas&gt;

&lt;h2 id=&#34;sharding-jdbc单库与双库性能对比:da68abc810593941936aaba3d62b3b96&#34;&gt;Sharding-JDBC单库与双库性能对比&lt;/h2&gt;

&lt;p&gt;对比测试:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;单库用例中所有数据全部在DB1中&lt;/li&gt;
&lt;li&gt;双库用例中所有数据均匀分布在DB1与DB2中&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;结论:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TPS双库比单库可以增加大约94%的性能&lt;/li&gt;
&lt;li&gt;TPS双库比单库可以增加大约50%的性能&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;查询-1:da68abc810593941936aaba3d62b3b96&#34;&gt;查询&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;横坐标:并发用户数&lt;/li&gt;
&lt;li&gt;纵坐标:TPS&lt;/li&gt;
&lt;/ul&gt;

&lt;canvas id=&#34;singleAndDubbleQuery&#34; width=&#34;400&#34; height=&#34;150&#34;&gt;&lt;/canvas&gt;

&lt;h3 id=&#34;插入-1:da68abc810593941936aaba3d62b3b96&#34;&gt;插入&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;横坐标:并发用户数&lt;/li&gt;
&lt;li&gt;纵坐标:TPS&lt;/li&gt;
&lt;/ul&gt;

&lt;canvas id=&#34;singleAndDubbleInsert&#34; width=&#34;400&#34; height=&#34;150&#34;&gt;&lt;/canvas&gt;

&lt;h3 id=&#34;更新-1:da68abc810593941936aaba3d62b3b96&#34;&gt;更新&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;横坐标:并发用户数&lt;/li&gt;
&lt;li&gt;纵坐标:TPS&lt;/li&gt;
&lt;/ul&gt;

&lt;canvas id=&#34;singleAndDubbleUpdate&#34; width=&#34;400&#34; height=&#34;150&#34;&gt;&lt;/canvas&gt;

&lt;h2 id=&#34;sharding-jdbc疲劳测试:da68abc810593941936aaba3d62b3b96&#34;&gt;Sharding-JDBC疲劳测试&lt;/h2&gt;

&lt;p&gt;经过8个小时的疲劳测试,jvm的堆大约占用不到600MB的内存,且使用量比较稳定。没有发生fullgc。
&lt;canvas id=&#34;fatigueTest&#34; width=&#34;400&#34; height=&#34;150&#34;&gt;&lt;/canvas&gt;&lt;/p&gt;
</description>
</item>

<item>
<title>未来线路规划</title>
<link>http://dangdangdotcom.github.io/sharding-jdbc/post/roadmap/</link>
Expand Down
2 changes: 2 additions & 0 deletions sharding-jdbc-doc/public/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ <h2 id="使用基于shardingdatasource的jdbc接口:d680e8a854a7cbad6d490c445cba

<script src="js/prism.js"></script>



</body>
</html>

2 changes: 2 additions & 0 deletions sharding-jdbc-doc/public/post/architecture/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ <h1 id="架构图:1bf455b3a3c6e1e40be41ef6023b75eb">架构图</h1>

<script src="js/prism.js"></script>



</body>
</html>

2 changes: 2 additions & 0 deletions sharding-jdbc-doc/public/post/features/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ <h2 id="稳定性:e1ec7fcfd5aa4d3ea3e990d9b707a3b4">稳定性</h2>

<script src="js/prism.js"></script>



</body>
</html>

4 changes: 4 additions & 0 deletions sharding-jdbc-doc/public/post/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ <h2>相关文档</h2>

<li> <a href="http://dangdangdotcom.github.io/sharding-jdbc/post/restriction/" target="_blank">使用限制</a></li>

<li> <a href="http://dangdangdotcom.github.io/sharding-jdbc/post/stress_test/" target="_blank">压力测试报告</a></li>

<li> <a href="http://dangdangdotcom.github.io/sharding-jdbc/post/roadmap/" target="_blank">未来线路规划</a></li>

</ul>
Expand Down Expand Up @@ -148,6 +150,8 @@ <h2>相关文档</h2>

<script src="js/prism.js"></script>



</body>
</html>

Loading

0 comments on commit 35dde20

Please sign in to comment.