You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sy...@apache.org on 2022/03/09 03:58:41 UTC

[apisix-website] branch master updated: fix: Change WASM article image to sheet (#954)

This is an automated email from the ASF dual-hosted git repository.

sylviasu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 31cee9e  fix: Change WASM article image to sheet (#954)
31cee9e is described below

commit 31cee9e97b0b75285475d81da78ca40e42007422
Author: Sylvia <39...@users.noreply.github.com>
AuthorDate: Wed Mar 9 11:58:28 2022 +0800

    fix: Change WASM article image to sheet (#954)
    
    * fix: Change WASM article image to sheet
---
 website/blog/2021/11/19/apisix-supports-wasm.md    | 141 ++++++++++++++++++++-
 .../2021/11/19/apisix-supports-wasm.md             | 141 ++++++++++++++++++++-
 2 files changed, 280 insertions(+), 2 deletions(-)

diff --git a/website/blog/2021/11/19/apisix-supports-wasm.md b/website/blog/2021/11/19/apisix-supports-wasm.md
index 73e1229..70fd29d 100644
--- a/website/blog/2021/11/19/apisix-supports-wasm.md
+++ b/website/blog/2021/11/19/apisix-supports-wasm.md
@@ -150,7 +150,146 @@ uri: /fault-injection
 
 Next, try to use wrk pressure. The specific data comparison is shown in the following chart:
 
-![Pressure test results](https://static.apiseven.com/202108/1637289637162-6d2ef1d6-9de8-410c-8ca6-e264205c1be1.png)
+<table>
+    <tr>
+        <td colspan="3">¥ wrk -d 30 -t 5 -c 50 http://127.0.0.1:9080/wasm | Running 30s test @ http://127.0.0.1:9080/wasm | 5 threads and 50 connections</td>
+    </tr>
+    <tr>
+        <td><b>Thread Stats</b></td>
+        <td><b>Latency</b></td>
+        <td><b>Req/Sec</b></td>
+    </tr>
+    <tr>
+        <td><b>Avg</b></td>
+        <td>66.17ms</td>
+        <td>7.01k</td>
+    </tr>
+    <tr>
+        <td><b>Sdev</b></td>
+        <td>226.42ms</td>
+        <td>3.09k</td>
+    </tr>
+    <tr>
+        <td><b>Max</b></td>
+        <td>1.99s</td>
+        <td>33.97k</td>
+    </tr>
+    <tr>
+        <td><b>+/- Stdev</b></td>
+        <td>91.89%</td>
+        <td>82.28%</td>
+    </tr>
+    <tr>
+        <td><b>Request details</b></td>
+        <td colspan="2">650497 requests in 36.33s, 119.70MB read</td>
+    </tr>
+    <tr>
+        <td><b>Socket errors</b></td>
+        <td colspan="2">connect 0, read 0, write 0, timeout 63</td>
+    </tr>
+    <tr>
+        <td><b>Request/sec</b></td>
+        <td colspan="2">17903.17</td>
+    </tr>
+    <tr>
+        <td><b>Transfer/sec</b></td>
+        <td colspan="2">3.29MB</td>
+    </tr>
+</table>
+
+<table>
+    <tr>
+        <td colspan="3">¥ wrk -d 30 -t 5 -c 50 http://127.0.0.1:9080/ext-plugin | Running 30s test @ http://127.0.0.1:9080/ext-plugin | 5 threads and 50 connections</td>
+    </tr>
+    <tr>
+        <td><b>Thread Stats</b></td>
+        <td><b>Latency</b></td>
+        <td><b>Req/Sec</b></td>
+    </tr>
+    <tr>
+        <td><b>Avg</b></td>
+        <td>95.69ms</td>
+        <td>3.23k</td>
+    </tr>
+    <tr>
+        <td><b>Sdev</b></td>
+        <td>229.09ms</td>
+        <td>1.47k</td>
+    </tr>
+    <tr>
+        <td><b>Max</b></td>
+        <td>1.70s</td>
+        <td>15.18k</td>
+    </tr>
+    <tr>
+        <td><b>+/- Stdev</b></td>
+        <td>87.37%</td>
+        <td>83.89%</td>
+    </tr>
+    <tr>
+        <td><b>Request details</b></td>
+        <td colspan="2">362151 requests in 30.50s, 66.64MB read</td>
+    </tr>
+    <tr>
+        <td><b>Socket errors</b></td>
+        <td colspan="2">connect 0, read 0, write 0, timeout 17</td>
+    </tr>
+    <tr>
+        <td><b>Request/sec</b></td>
+        <td colspan="2">11873.12</td>
+    </tr>
+    <tr>
+        <td><b>Transfer/sec</b></td>
+        <td colspan="2">2.18MB</td>
+    </tr>
+</table>
+
+<table>
+    <tr>
+        <td colspan="3">¥ wrk -d 30 -t 5 -c 50 http://127.0.0.1:9080/fault-injection | Running 30s test @ http://127.0.0.1:9080/fault-injection | 5 threads and 50 connections</td>
+    </tr>
+    <tr>
+        <td><b>Thread Stats</b></td>
+        <td><b>Latency</b></td>
+        <td><b>Req/Sec</b></td>
+    </tr>
+    <tr>
+        <td><b>Avg</b></td>
+        <td>86.91ms</td>
+        <td>7.90k</td>
+    </tr>
+    <tr>
+        <td><b>Sdev</b></td>
+        <td>263.14ms</td>
+        <td>2.04k</td>
+    </tr>
+    <tr>
+        <td><b>Max</b></td>
+        <td>1.91s</td>
+        <td>15.60k</td>
+    </tr>
+    <tr>
+        <td><b>+/- Stdev</b></td>
+        <td>90.73%</td>
+        <td>81.97%</td>
+    </tr>
+    <tr>
+        <td><b>Request details</b></td>
+        <td colspan="2">974326 requests in 30.07s, 179.29MB read</td>
+    </tr>
+    <tr>
+        <td><b>Socket errors</b></td>
+        <td colspan="2">connect 0, read 0, write 0, timeout 8</td>
+    </tr>
+    <tr>
+        <td><b>Request/sec</b></td>
+        <td colspan="2">32405.28</td>
+    </tr>
+    <tr>
+        <td><b>Transfer/sec</b></td>
+        <td colspan="2">5.96MB</td>
+    </tr>
+</table>
 
 As you can see from the results, the performance of the WASM version is somewhere between that of the external plugin and the native Lua.
 
diff --git a/website/i18n/zh/docusaurus-plugin-content-blog/2021/11/19/apisix-supports-wasm.md b/website/i18n/zh/docusaurus-plugin-content-blog/2021/11/19/apisix-supports-wasm.md
index 2de7f73..4752f17 100644
--- a/website/i18n/zh/docusaurus-plugin-content-blog/2021/11/19/apisix-supports-wasm.md
+++ b/website/i18n/zh/docusaurus-plugin-content-blog/2021/11/19/apisix-supports-wasm.md
@@ -151,7 +151,146 @@ uri: /fault-injection
 
 接下来试着用 wrk 进行压测,具体数据对比如下:
 
-![压测结果对比](https://static.apiseven.com/202108/1637289637162-6d2ef1d6-9de8-410c-8ca6-e264205c1be1.png)
+<table>
+    <tr>
+        <td colspan="3">¥ wrk -d 30 -t 5 -c 50 http://127.0.0.1:9080/wasm | Running 30s test @ http://127.0.0.1:9080/wasm | 5 threads and 50 connections</td>
+    </tr>
+    <tr>
+        <td><b>Thread Stats</b></td>
+        <td><b>Latency</b></td>
+        <td><b>Req/Sec</b></td>
+    </tr>
+    <tr>
+        <td><b>Avg</b></td>
+        <td>66.17ms</td>
+        <td>7.01k</td>
+    </tr>
+    <tr>
+        <td><b>Sdev</b></td>
+        <td>226.42ms</td>
+        <td>3.09k</td>
+    </tr>
+    <tr>
+        <td><b>Max</b></td>
+        <td>1.99s</td>
+        <td>33.97k</td>
+    </tr>
+    <tr>
+        <td><b>+/- Stdev</b></td>
+        <td>91.89%</td>
+        <td>82.28%</td>
+    </tr>
+    <tr>
+        <td><b>Request details</b></td>
+        <td colspan="2">650497 requests in 36.33s, 119.70MB read</td>
+    </tr>
+    <tr>
+        <td><b>Socket errors</b></td>
+        <td colspan="2">connect 0, read 0, write 0, timeout 63</td>
+    </tr>
+    <tr>
+        <td><b>Request/sec</b></td>
+        <td colspan="2">17903.17</td>
+    </tr>
+    <tr>
+        <td><b>Transfer/sec</b></td>
+        <td colspan="2">3.29MB</td>
+    </tr>
+</table>
+
+<table>
+    <tr>
+        <td colspan="3">¥ wrk -d 30 -t 5 -c 50 http://127.0.0.1:9080/ext-plugin | Running 30s test @ http://127.0.0.1:9080/ext-plugin | 5 threads and 50 connections</td>
+    </tr>
+    <tr>
+        <td><b>Thread Stats</b></td>
+        <td><b>Latency</b></td>
+        <td><b>Req/Sec</b></td>
+    </tr>
+    <tr>
+        <td><b>Avg</b></td>
+        <td>95.69ms</td>
+        <td>3.23k</td>
+    </tr>
+    <tr>
+        <td><b>Sdev</b></td>
+        <td>229.09ms</td>
+        <td>1.47k</td>
+    </tr>
+    <tr>
+        <td><b>Max</b></td>
+        <td>1.70s</td>
+        <td>15.18k</td>
+    </tr>
+    <tr>
+        <td><b>+/- Stdev</b></td>
+        <td>87.37%</td>
+        <td>83.89%</td>
+    </tr>
+    <tr>
+        <td><b>Request details</b></td>
+        <td colspan="2">362151 requests in 30.50s, 66.64MB read</td>
+    </tr>
+    <tr>
+        <td><b>Socket errors</b></td>
+        <td colspan="2">connect 0, read 0, write 0, timeout 17</td>
+    </tr>
+    <tr>
+        <td><b>Request/sec</b></td>
+        <td colspan="2">11873.12</td>
+    </tr>
+    <tr>
+        <td><b>Transfer/sec</b></td>
+        <td colspan="2">2.18MB</td>
+    </tr>
+</table>
+
+<table>
+    <tr>
+        <td colspan="3">¥ wrk -d 30 -t 5 -c 50 http://127.0.0.1:9080/fault-injection | Running 30s test @ http://127.0.0.1:9080/fault-injection | 5 threads and 50 connections</td>
+    </tr>
+    <tr>
+        <td><b>Thread Stats</b></td>
+        <td><b>Latency</b></td>
+        <td><b>Req/Sec</b></td>
+    </tr>
+    <tr>
+        <td><b>Avg</b></td>
+        <td>86.91ms</td>
+        <td>7.90k</td>
+    </tr>
+    <tr>
+        <td><b>Sdev</b></td>
+        <td>263.14ms</td>
+        <td>2.04k</td>
+    </tr>
+    <tr>
+        <td><b>Max</b></td>
+        <td>1.91s</td>
+        <td>15.60k</td>
+    </tr>
+    <tr>
+        <td><b>+/- Stdev</b></td>
+        <td>90.73%</td>
+        <td>81.97%</td>
+    </tr>
+    <tr>
+        <td><b>Request details</b></td>
+        <td colspan="2">974326 requests in 30.07s, 179.29MB read</td>
+    </tr>
+    <tr>
+        <td><b>Socket errors</b></td>
+        <td colspan="2">connect 0, read 0, write 0, timeout 8</td>
+    </tr>
+    <tr>
+        <td><b>Request/sec</b></td>
+        <td colspan="2">32405.28</td>
+    </tr>
+    <tr>
+        <td><b>Transfer/sec</b></td>
+        <td colspan="2">5.96MB</td>
+    </tr>
+</table>
 
 从上述结果可以看到,WASM 版本的性能介于外部插件和原生 Lua 之间。