Docs/linux基础/优化Haproxy/2.html
2022-10-18 16:59:37 +08:00

165 lines
No EOL
6.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="tool" content="leanote-desktop-app">
<title>2</title>
<style>
*{font-family:"lucida grande","lucida sans unicode",lucida,helvetica,"Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;}
body {
margin: 0;
}
/*公用文字样式*/
h1{font-size:30px}h2{font-size:24px}h3{font-size:18px}h4{font-size:14px}
.note-container{
width:850px;
margin:auto;
padding: 10px 20px;
box-shadow: 1px 1px 10px #eee;
}
#title {
margin: 0;
}
table {
margin-bottom: 16px;
border-collapse: collapse;
}
table th, table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table th {
font-weight: bold;
}
table tr {
background-color: none;
border-top: 1px solid #ccc;
}
table tr:nth-child(2n) {
background-color: rgb(247, 247, 249);
}
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
border: 1px solid #ddd;
border-collapse: collapse;
padding: 6px 13px;
}
blockquote {
border-left-width:10px;
background-color:rgba(128,128,128,0.05);
border-top-right-radius:5px;
border-bottom-right-radius:5px;
padding:15px 20px;
border-left:5px solid rgba(128,128,128,0.075);
}
blockquote p {
margin-bottom:1.1em;
font-size:1em;
line-height:1.45
}
blockquote ul:last-child,blockquote ol:last-child {
margin-bottom:0
}
pre {
padding: 18px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
border-radius: 3px;
display: block;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
white-space: nowrap;
background-color: #f9f2f4;
border-radius: 4px;
}
.footnote {
vertical-align: top;
position: relative;
top: -0.5em;
font-size: .8em;
}
hr {
margin:2em 0
}
img {
max-width:100%
}
pre {
word-break:break-word
}
p,pre,pre.prettyprint,blockquote {
margin:0 0 1.1em
}
hr {
margin:2em 0
}
img {
max-width:100%
}
.sequence-diagram,.flow-chart {
text-align:center;
margin-bottom:1.1em
}
.sequence-diagram text,.flow-chart text {
font-size:15px !important;
font-family:"Source Sans Pro",sans-serif !important
}
.sequence-diagram [fill="#ffffff"],.flow-chart [fill="#ffffff"] {
fill:#f6f6f6
}
.sequence-diagram [stroke="#000000"],.flow-chart [stroke="#000000"] {
stroke:#3f3f3f
}
.sequence-diagram text[stroke="#000000"],.flow-chart text[stroke="#000000"] {
stroke:none
}
.sequence-diagram [fill="#000"],.flow-chart [fill="#000"],.sequence-diagram [fill="#000000"],.flow-chart [fill="#000000"],.sequence-diagram [fill="black"],.flow-chart [fill="black"] {
fill:#3f3f3f
}
ul,ol {
margin-bottom:1.1em
}
ul ul,ol ul,ul ol,ol ol {
margin-bottom:1.1em
}
kbd {
padding:.1em .6em;
border:1px solid rgba(63,63,63,0.25);
-webkit-box-shadow:0 1px 0 rgba(63,63,63,0.25);
box-shadow:0 1px 0 rgba(63,63,63,0.25);
font-size:.7em;
font-family:sans-serif;
background-color:#fff;
color:#333;
border-radius:3px;
display:inline-block;
margin:0 .1em;
white-space:nowrap
}
.toc ul {
list-style-type:none;
margin-bottom:15px
}
</style>
<!-- 该css供自定义样式 -->
<link href="../leanote-html.css" rel="stylesheet">
</head>
<body>
<div class="note-container">
<h1 class="title" id="leanote-title">2</h1>
<div class="content-html" id="leanote-content"><h2>万能的图表</h2><p>我们不能通过多次随机压力的结果来得出结论,因为这样的数据没有意义。为了能够获取有意义的结果,必须设计一系列测试场景。因此我们参照了这个图:&nbsp;</p><p><img id="__LEANOTE_D_IMG_1505975062984" src="2_files/59c3cd3bd01cce1c4d00002a.png" alt="" data-mce-src="/api/file/getImage?fileId=59c3cd3bd01cce1c4d00002a"></p><p>该图表明,直到一个特定的点,随着请求总数的增长,延迟基本上没有变化。然而,当这个拐点之后,响应延迟几乎以指数级增长。这就是我们期望度量的机器或者配置的拐点。</p><h2>Ganglia</h2><p>在提供一些测试结果之前,首先介绍下<a href="http://ganglia.sourceforge.net/" data-mce-href="http://ganglia.sourceforge.net/">Ganglia</a>工具。</p><blockquote><p>Ganglia是一个为高性能计算系统例如集群和网格计算设计的可扩展分布式监控系统</p></blockquote><p>下面的一些图表是我们一台服务器的监控数据截图通过它们我们可以直观的了解Ganglia及其能够提供的图表信息。&nbsp;</p><p><img id="__LEANOTE_D_IMG_1505975094335" src="2_files/59c3cd3bd01cce1c4d00002b.png" alt="" width="550" data-mce-src="/api/file/getImage?fileId=59c3cd3bd01cce1c4d00002b"><img id="__LEANOTE_D_IMG_1505975094336" src="2_files/59c3cd3bd01cce1c4d000029.png" alt="" width="550" data-mce-src="/api/file/getImage?fileId=59c3cd3bd01cce1c4d000029"></p><p>看起来不错吧?</p><p>我们使用Ganglia来监控HAProxy服务器以提供一些核心指标包括</p><ol><li>TCP连接数能够让我们了解当前系统上创建创建的TCP连接总数。注意该数据是输入输出连接的总和。</li><li>数据包收发量HAProxy实际发送和接收到的TCP包数量。</li><li>数据收发量:实际发送和接收的数据总量。</li><li>内存:压力测试过程中服务器的内存变化情况。</li><li>网络:了解压力测试过程中的网络带宽情况。</li></ol><p>以下是基于之前的测试所得到的一些限制,也是我们希望在这次压力测试中能够达到的成绩:</p><ul><li>TCP连接数700k</li><li>发送数据包50k个接收数据包60k个</li><li>收发数据量均在1015MB字节左右</li><li>内存消耗约1415G</li><li>网络带宽7MB</li></ul><p>以上数据均为每秒数据</p><h2></h2><div class="article_page_left text_content_container" style="margin: 0px; padding: 0px; border: 0px; float: left; width: 610px; color: #000000; font-family: Helvetica, 'Open Sans', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 微软雅黑, STHeiti, 'WenQuanYi Micro Hei', SimSun, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2;" data-mce-style="margin: 0px; padding: 0px; border: 0px; float: left; width: 610px; color: #000000; font-family: Helvetica, 'Open Sans', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 微软雅黑, STHeiti, 'WenQuanYi Micro Hei', SimSun, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2;"></div></div>
</div>
<!-- 该js供其它处理 -->
<script src="../leanote-html.js"></script>
</body>
</html>