Skip to content

Commit 059aa5a

Browse files
authored
run localhost/http case with static file
1 parent 2f00f26 commit 059aa5a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

benchmarks.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ Let's test 3 cases:
4949
---
5050
```sh
5151
postgres@dev:~$ #### http, localhost
52-
postgres@dev:~$ echo "select left(http_get.content, 50) from http_get('http://localhost/');" > ~/local_http_c.sql
53-
postgres@dev:~$ echo "select left(_get, 50) from http_client._get('http://localhost/', 2);" > ~/local_http_plsh.sql
54-
postgres@dev:~$ echo "select left(get, 50) from get('http://localhost/');" > ~/local_http_python.sql
55-
postgres@dev:~$ echo "select left(get_python3, 50) from get_python3('http://localhost/');" > ~/local_http_python3.sql
52+
postgres@dev:~$ echo "select left(http_get.content, 50) from http_get('http://localhost/robots.txt');" > ~/local_http_c.sql
53+
postgres@dev:~$ echo "select left(_get, 50) from http_client._get('http://localhost/robots.txt', 2);" > ~/local_http_plsh.sql
54+
postgres@dev:~$ echo "select left(get, 50) from get('http://localhost/robots.txt');" > ~/local_http_python.sql
55+
postgres@dev:~$ echo "select left(get_python3, 50) from get_python3('http://localhost/robots.txt');" > ~/local_http_python3.sql
5656
postgres@dev:~$ pgbench -f ~/local_http_c.sql -c 10 -t 100 test
5757
starting vacuum...end.
5858
transaction type: /var/lib/postgresql/local_http_c.sql
@@ -62,9 +62,9 @@ number of clients: 10
6262
number of threads: 1
6363
number of transactions per client: 100
6464
number of transactions actually processed: 1000/1000
65-
latency average = 5.250 ms
66-
tps = 1904.627674 (including connections establishing)
67-
tps = 1915.319878 (excluding connections establishing)
65+
latency average = 5.013 ms
66+
tps = 1994.932871 (including connections establishing)
67+
tps = 2007.401692 (excluding connections establishing)
6868
postgres@dev:~$ pgbench -f ~/local_http_plsh.sql -c 10 -t 100 test
6969
starting vacuum...end.
7070
transaction type: /var/lib/postgresql/local_http_plsh.sql
@@ -74,9 +74,9 @@ number of clients: 10
7474
number of threads: 1
7575
number of transactions per client: 100
7676
number of transactions actually processed: 1000/1000
77-
latency average = 19.543 ms
78-
tps = 511.693475 (including connections establishing)
79-
tps = 512.487107 (excluding connections establishing)
77+
latency average = 19.199 ms
78+
tps = 520.853950 (including connections establishing)
79+
tps = 521.675404 (excluding connections establishing)
8080
postgres@dev:~$ pgbench -f ~/local_http_python.sql -c 10 -t 100 test
8181
starting vacuum...end.
8282
transaction type: /var/lib/postgresql/local_http_python.sql
@@ -86,9 +86,9 @@ number of clients: 10
8686
number of threads: 1
8787
number of transactions per client: 100
8888
number of transactions actually processed: 1000/1000
89-
latency average = 4.093 ms
90-
tps = 2443.022605 (including connections establishing)
91-
tps = 2461.714190 (excluding connections establishing)
89+
latency average = 2.203 ms
90+
tps = 4539.882871 (including connections establishing)
91+
tps = 4602.161543 (excluding connections establishing)
9292
postgres@dev:~$ pgbench -f ~/local_http_python3.sql -c 10 -t 100 test
9393
starting vacuum...end.
9494
transaction type: /var/lib/postgresql/local_http_python3.sql
@@ -98,9 +98,9 @@ number of clients: 10
9898
number of threads: 1
9999
number of transactions per client: 100
100100
number of transactions actually processed: 1000/1000
101-
latency average = 4.611 ms
102-
tps = 2168.910404 (including connections establishing)
103-
tps = 2183.211150 (excluding connections establishing)
101+
latency average = 3.180 ms
102+
tps = 3144.268470 (including connections establishing)
103+
tps = 3175.129339 (excluding connections establishing)
104104
postgres@dev:~$
105105
postgres@dev:~$
106106
postgres@dev:~$ #### http, ya.ru
@@ -289,10 +289,10 @@ Conclusions
289289

290290
Method | Latency, ms | TPS
291291
------------ | ------------- | -------------
292-
pgsql-http (C) | 5.25 | 1915
293-
plsh (curl) | 19.5 | 512
294-
plpython2u | 4.09 | 2462
295-
plpython3u | 4.61 | 2183
292+
pgsql-http (C) | 5.01 | 2007
293+
plsh (curl) | 19.20 | 521.6
294+
plpython2u | 2.20 | 4602
295+
plpython3u | 3.18 | 3175
296296

297297
### Results for HTTP, ya.ru:
298298

0 commit comments

Comments
 (0)