-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes
126 lines (80 loc) · 2.59 KB
/
notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Wed May 15 02:53:47 EDT 2019
{
Sending messages presettled does not help.
In fact, it slows them down.
The relevant code is in the C proactor client in Mercury
( https://github.com/mgoulish/mercury )
in process_event() , in the case for PN_CONNECTION_INIT.
To send the messages unsettled, do this on all the links:
// trial 1
pn_link_set_snd_settle_mode ( context->addrs[i].link, PN_SND_UNSETTLED );
pn_link_set_rcv_settle_mode ( context->addrs[i].link, PN_RCV_FIRST );
To send the pre-settled, I wasn't sure what I should do with the receive
settle mode, so I tried both ways.
// trial 2
// do not specify any receive settle mode.
pn_link_set_snd_settle_mode ( context->addrs[i].link, PN_SND_SETTLED );
// trial 3
// specify that the receiver settles second.
pn_link_set_snd_settle_mode ( context->addrs[i].link, PN_SND_SETTLED );
pn_link_set_rcv_settle_mode ( context->addrs[i].link, PN_RCV_SECOND );
For each of these, I ran a test with 45 sender-receiver pairs, throttling to
1000 messages per second, 100 bytes payload per message.
Here are the results :
mean latency, in msec
trial 1 : 10.84260
trial 2 : 11.19267
trial 3 : 12.39805
So!
Let's keep sending them unsettled !
}
Thu May 16 10:37:51 EDT 2019
{
Total calls, across the whole router network,
to some of the AMQP_* functions. (The interesting
critical-path ones).
We expect these to scale as the number of routers...
and they DO.
So that's good.
But then where is the extra timing coming from?
1 -------------------
{
conn : 900090 1.0
dispo : 450000 1.0
flow : 900000 1.0
rx : 450000 1.0
total : 2700090 1.0
}
2 -------------------
{
conn : 1397113 1.5
dispo : 900541 2.0
flow : 1219849 1.4
rx : 900541 2.0
total : 4418044 1.6
}
3 -------------------
{
conn : 2620218 2.9
dispo : 1352712 3.0
flow : 2040723 2.3
rx : 1352712 3.0
total : 7366365 2.7
}
4 -------------------
{
conn : 3720868 4.1
dispo : 1805776 4.0
flow : 2773753 3.0
rx : 1805776 4.0
total : 10106173 3.7
}
5 -------------------
{
conn : 4861928 5.4
dispo : 2254693 5.0
flow : 3519855 3.9
rx : 2254693 5.0
total : 12891169 4.7
}
}