You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
200-400ms insert latency with Tornado driver #4007
I updated to latest , built both server and drivers.
Did a quick test , Ran 300 curl posts which does inserts:
which does insert of
{'body': "i fine thank you"}
Here is my working chat app example of rethinkdb and python based on Tornado Chatdemo.
It decrease 40 lines of code in chat thanks to Change feeds, removing Buffer object.
Thanks for the code and benchmark @v3ss0n .
Since the app is using hard durability during insert it could be bottlenecking on the disk, but I'm not sure. The max of 193ms sounds very high. I'll give it a try later.
If you want to test this out in the meantime, you can change messages = (yield evt.insert(message).run(con))
to messages = (yield evt.insert(message, durability="soft").run(con))
I tried performing my own benchmarks to help locate any bottlenecks, here are my results:
Each client runs 1000 POST requests serially. I tried with 1, 3, 10, 30, and 50 clients. Larger numbers of clients results in some errors, which I suspect is due to file descriptor limitations, but I didn't bother investigating. I tested with a single connection in the tornado app, and with a pool of 10 connections (round robined). For each case, I tested with hard durability, soft durability, and noreply queries.
All times are in milliseconds and describe the total time taken for yield table.insert... to return. The exception is total which is the total time for that test case to complete, and is in seconds.
1 connection, hard durability:
clients
total (s)
min
max
avg
stddev
90%
99%
1
17.17
3.34
40.02
7.92
5.09
15.81
25.96
3
18.87
3.14
69.57
9.11
6.45
16.79
35.28
10
22.78
3.27
95.19
12.75
9.67
23.70
49.24
30
42.65
3.41
123.35
25.75
12.25
41.78
67.31
50
72.93
4.15
118.09
41.48
14.71
61.93
80.68
1 connection, soft durability:
clients
total (s)
min
max
avg
stddev
90%
99%
1
14.81
2.13
23.72
5.52
4.17
13.57
13.90
3
16.21
1.84
26.15
6.23
4.52
14.14
21.75
10
17.86
1.68
35.48
8.47
5.35
16.46
25.67
30
40.25
2.67
66.88
21.53
8.72
33.93
48.53
50
71.24
1.95
104.21
37.43
12.66
53.12
75.74
1 connection, noreply:
clients
total (s)
min
max
avg
stddev
90%
99%
1
9.65
0.15
1.38
0.31
0.10
0.31
0.87
3
10.28
0.14
7.52
0.33
0.18
0.45
0.97
10
10.85
0.14
10.05
0.19
0.23
0.24
0.52
30
34.07
0.14
10.87
0.20
0.19
0.25
0.54
50
59.46
0.14
17.89
0.21
0.26
0.27
0.57
10 connections, hard durability:
clients
total (s)
min
max
avg
stddev
90%
99%
1
17.06
3.73
32.39
7.44
4.54
15.32
25.46
3
18.54
3.19
68.56
8.63
6.46
16.09
36.23
10
22.48
2.85
175.20
12.41
11.11
24.41
55.06
30
45.69
3.61
166.72
24.70
13.12
42.96
67.84
50
73.87
4.38
177.69
40.86
15.63
61.68
81.50
10 connections, soft durability:
clients
total (s)
min
max
avg
stddev
90%
99%
1
14.98
2.08
29.03
5.63
4.39
13.64
18.41
3
16.47
1.93
66.28
6.41
5.14
14.11
23.93
10
18.16
1.85
148.29
8.22
6.15
16.09
24.80
30
43.28
2.17
155.67
22.96
9.43
34.02
52.68
50
75.26
2.04
204.43
37.60
14.19
55.32
76.64
10 connections, noreply:
clients
total (s)
min
max
avg
stddev
90%
99%
1
9.85
0.15
1.59
0.32
0.12
0.35
0.95
3
10.04
0.15
7.88
0.32
0.20
0.45
0.97
10
10.86
0.15
5.71
0.19
0.16
0.24
0.50
30
37.11
0.14
13.30
0.22
0.22
0.28
0.58
50
61.32
0.14
18.44
0.22
0.23
0.28
0.58
I'll perform some more analysis on what these numbers mean shortly.
Also if there any test performed on SATA drives please let me know. Would like to see , coz i have a friend who want to try RethinkDB because RethinkDB take cares about data integrity . Although not fully ACID. Other NoSQLs do not . For my case Soft Durability is good!
Activity
v3ss0n commentedon Apr 2, 2015
I will do actual benchmarks on this
danielmewes commentedon Apr 2, 2015
Thank you for your help @v3ss0n !
v3ss0n commentedon Apr 2, 2015
I updated to latest , built both server and drivers.
Did a quick test , Ran 300 curl posts which does inserts:
which does insert of
{'body': "i fine thank you"}
So latest seem fine ? what is expected reponse rate on Intel haswell core i7 3.2ghz with 16 GB RAM and 1TB SATA 7200 RPM ?
EDIT: Fixed my mistake of seconds with ms.
v3ss0n commentedon Apr 2, 2015
Here is my working chat app example of rethinkdb and python based on Tornado Chatdemo.
It decrease 40 lines of code in chat thanks to Change feeds, removing Buffer object.
https://github.com/v3ss0n/rechat
I am enjoying RethinDB so far. It give a lot better code quality thanks to awesome ReQL.
You guys can do benchmarks with it.
danielmewes commentedon Apr 2, 2015
Thanks for the code and benchmark @v3ss0n .
Since the app is using hard durability during insert it could be bottlenecking on the disk, but I'm not sure. The max of 193ms sounds very high. I'll give it a try later.
If you want to test this out in the meantime, you can change
messages = (yield evt.insert(message).run(con))to
messages = (yield evt.insert(message, durability="soft").run(con))v3ss0n commentedon Apr 2, 2015
good , i will test it.
v3ss0n commentedon Apr 2, 2015
suprising! i will test with normal python.
v3ss0n commentedon Apr 2, 2015
on the server side 1.7 ms response rate is average 4.0 ms response rate is max. very good
v3ss0n commentedon Apr 2, 2015
Can we set that option as default somewhere? For application like chat/ instant messaging , durability is not necessary .
danielmewes commentedon Apr 2, 2015
You can set the default at table creation our through the table_config system table. See the API docs for table_create.
v3ss0n commentedon Apr 2, 2015
Those over 100ms latencies happens like every 30 to 40 inserts.
v3ss0n commentedon Apr 2, 2015
Thanks , i will look into it.
Tryneus commentedon Apr 3, 2015
I tried performing my own benchmarks to help locate any bottlenecks, here are my results:
Each client runs 1000 POST requests serially. I tried with 1, 3, 10, 30, and 50 clients. Larger numbers of clients results in some errors, which I suspect is due to file descriptor limitations, but I didn't bother investigating. I tested with a single connection in the tornado app, and with a pool of 10 connections (round robined). For each case, I tested with hard durability, soft durability, and noreply queries.
All times are in milliseconds and describe the total time taken for
yield table.insert...to return. The exception istotalwhich is the total time for that test case to complete, and is in seconds.1 connection, hard durability:
1 connection, soft durability:
1 connection, noreply:
10 connections, hard durability:
10 connections, soft durability:
10 connections, noreply:
I'll perform some more analysis on what these numbers mean shortly.
18 remaining items
v3ss0n commentedon Apr 9, 2015
Also if there any test performed on SATA drives please let me know. Would like to see , coz i have a friend who want to try RethinkDB because RethinkDB take cares about data integrity . Although not fully ACID. Other NoSQLs do not . For my case Soft Durability is good!
danielmewes commentedon Apr 9, 2015
@v3ss0n
You mean something similar to @Tryneus' test but on rotational drives?
v3ss0n commentedon Apr 9, 2015
yes , for comparison
danielmewes commentedon Apr 16, 2015
Moving to subsequent for additional benchmarks.
v3ss0n commentedon Feb 9, 2017
as of rethinkdb 2.3.5 , there is no more random 200-400ms delays originally.
we are running in production and there is no such problems anymore.
AtnNn commentedon Feb 13, 2017
Thanks for the update.
If this happens again or if there is more benchmarking to do, please open a new issue.