Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit829978c

Browse files
knizhnikkelvich
authored andcommitted
Measure max wakeup time
1 parent04baf6b commit829978c

File tree

5 files changed

+76
-10
lines changed

5 files changed

+76
-10
lines changed

‎multimaster.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,13 +518,11 @@ MtmAdjustOldestXid(TransactionId xid)
518518
}
519519
}
520520
}
521-
if (MtmUseDtm) {
522-
if (prev!=NULL) {
523-
Mtm->transListHead=prev;
524-
Mtm->oldestXid=xid=prev->xid;
525-
}elseif (TransactionIdPrecedes(Mtm->oldestXid,xid)) {
526-
xid=Mtm->oldestXid;
527-
}
521+
if (prev!=NULL) {
522+
Mtm->transListHead=prev;
523+
Mtm->oldestXid=xid=prev->xid;
524+
}elseif (TransactionIdPrecedes(Mtm->oldestXid,xid)) {
525+
xid=Mtm->oldestXid;
528526
}
529527
MtmUnlock();
530528
}
@@ -782,13 +780,19 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
782780
MtmUnlock();
783781
MtmResetTransaction(x);
784782
}else {
783+
time_twakeupTime;
784+
statictime_tmaxWakeupTime;
785785
/* wait votes from all nodes */
786786
while (!ts->votingCompleted) {
787787
MtmUnlock();
788788
WaitLatch(&MyProc->procLatch,WL_LATCH_SET,-1);
789789
ResetLatch(&MyProc->procLatch);
790790
MtmLock(LW_SHARED);
791791
}
792+
wakeupTime=MtmGetCurrentTime()-ts->wakeupTime;
793+
if (wakeupTime>maxWakeupTime) {
794+
maxWakeupTime=wakeupTime;
795+
}
792796
x->status=ts->status;
793797
MTM_LOG3("%d: Result of vote: %d",MyProcPid,ts->status);
794798
MtmUnlock();
@@ -979,6 +983,7 @@ void MtmWakeUpBackend(MtmTransState* ts)
979983
{
980984
MTM_LOG3("Wakeup backed procno=%d, pid=%d",ts->procno,ProcGlobal->allProcs[ts->procno].pid);
981985
ts->votingCompleted= true;
986+
ts->wakeupTime=MtmGetCurrentTime();
982987
SetLatch(&ProcGlobal->allProcs[ts->procno].procLatch);
983988
}
984989

‎multimaster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ typedef struct MtmTransState
135135
intprocno;/* pgprocno of transaction coordinator waiting for responses from replicas,
136136
used to notify coordinator by arbiter */
137137
intnSubxids;/* Number of subtransanctions */
138+
time_twakeupTime;
138139
MtmMessageCodecmd;/* Notification message to be sent */
139140
structMtmTransState*nextVoting;/* Next element in L1-list of voting transactions. */
140141
structMtmTransState*next;/* Next element in L1 list of all finished transaction present in xid2state hash */

‎tests/deploy_layouts/cluster.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646
-"wal_sender_timeout = 0"
4747
-"max_replication_slots = 10"
4848
-"max_connections = 200"
49-
-"max_worker_processes =200"
49+
-"max_worker_processes =100"
5050
-"shared_preload_libraries = 'raftable,multimaster'"
5151
-"multimaster.conn_strings = '{{connections}}'"
5252
-"multimaster.node_id = {{ node_id }}"
5353
-"multimaster.buffer_size = 65536"
5454
-"multimaster.queue_size = 1073741824"
5555
-"multimaster.arbiter_port = 5600"
5656
-"multimaster.vacuum_delay = 1"
57-
-"multimaster.workers =100"
57+
-"multimaster.workers =32"
5858
-"multimaster.use_dtm = 0"
5959

6060
-name:restart postgrespro

‎tests/perf.results

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,63 @@ Bench finished at Чт. апр. 14 15:57:08 MSK 2016
192192
Bench started at Чт. апр. 14 16:07:25 MSK 2016
193193

194194
Bench finished at Чт. апр. 14 16:58:03 MSK 2016
195+
Bench started at Чт. апр. 14 17:14:41 MSK 2016
196+
astro5:{tps:841.620253, transactions:1000000, selects:0, updates:2000610, aborts:1045, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:10000, hosts:3}
197+
Bench finished at Чт. апр. 14 17:34:30 MSK 2016
198+
Bench started at Чт. апр. 14 17:38:52 MSK 2016
199+
astro5:{tps:103207.588648, transactions:100000, selects:200000, updates:0, aborts:0, abort_percent: 0, readers:0, writers:100, update_percent:0, accounts:500000, iterations:1000, hosts:3}
200+
Bench finished at Чт. апр. 14 17:38:53 MSK 2016
201+
Bench started at Чт. апр. 14 17:39:15 MSK 2016
202+
astro5:{tps:600.228131, transactions:100000, selects:0, updates:200058, aborts:94, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
203+
Bench finished at Чт. апр. 14 17:42:02 MSK 2016
204+
Bench started at Чт. апр. 14 17:47:53 MSK 2016
205+
astro5:{tps:2826.840100, transactions:100000, selects:0, updates:200060, aborts:105, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
206+
Bench finished at Чт. апр. 14 17:48:28 MSK 2016
207+
Bench started at Чт. апр. 14 17:50:15 MSK 2016
208+
astro5:{tps:1203.074674, transactions:100000, selects:0, updates:200038, aborts:102, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
209+
Bench finished at Чт. апр. 14 17:51:39 MSK 2016
210+
Bench started at Чт. апр. 14 17:56:22 MSK 2016
211+
astro5:{tps:16673.903141, transactions:100000, selects:0, updates:200044, aborts:68, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
212+
Bench finished at Чт. апр. 14 17:56:29 MSK 2016
213+
Bench started at Чт. апр. 14 18:01:48 MSK 2016
214+
astro5:{tps:15729.463298, transactions:100000, selects:0, updates:200052, aborts:68, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
215+
Bench finished at Чт. апр. 14 18:01:55 MSK 2016
216+
Bench started at Чт. апр. 14 18:33:55 MSK 2016
217+
astro5:{tps:16955.322556, transactions:100000, selects:0, updates:200074, aborts:83, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
218+
Bench finished at Чт. апр. 14 18:34:01 MSK 2016
219+
Bench started at Чт. апр. 14 18:34:29 MSK 2016
220+
astro5:{tps:16920.929961, transactions:150000, selects:0, updates:300194, aborts:187, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:1000, hosts:3}
221+
Bench finished at Чт. апр. 14 18:34:39 MSK 2016
222+
Bench started at Чт. апр. 14 18:35:08 MSK 2016
223+
224+
Bench finished at Чт. апр. 14 18:35:09 MSK 2016
225+
Bench started at Чт. апр. 14 18:35:40 MSK 2016
226+
227+
Bench finished at Чт. апр. 14 18:35:40 MSK 2016
228+
Bench started at Чт. апр. 14 18:36:33 MSK 2016
229+
230+
Bench finished at Чт. апр. 14 18:36:34 MSK 2016
231+
Bench started at Чт. апр. 14 18:38:59 MSK 2016
232+
astro5:{tps:15017.551012, transactions:150000, selects:0, updates:300180, aborts:200, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:1000, hosts:3}
233+
Bench finished at Чт. апр. 14 18:39:09 MSK 2016
234+
Bench started at Чт. апр. 14 18:42:34 MSK 2016
235+
astro5:{tps:6604.488490, transactions:150000, selects:0, updates:300154, aborts:215, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:1000, hosts:3}
236+
Bench finished at Чт. апр. 14 18:42:57 MSK 2016
237+
Bench started at Чт. апр. 14 18:45:11 MSK 2016
238+
astro5:{tps:734.388293, transactions:100000, selects:0, updates:200058, aborts:102, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
239+
Bench finished at Чт. апр. 14 18:47:28 MSK 2016
240+
Bench started at Чт. апр. 14 18:48:27 MSK 2016
241+
astro5:{tps:2989.544487, transactions:100000, selects:0, updates:200060, aborts:99, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
242+
Bench finished at Чт. апр. 14 18:49:01 MSK 2016
243+
Bench started at Чт. апр. 14 18:49:34 MSK 2016
244+
astro5:{tps:2579.759122, transactions:100000, selects:0, updates:200066, aborts:99, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
245+
Bench finished at Чт. апр. 14 18:50:14 MSK 2016
246+
Bench started at Чт. апр. 14 18:50:33 MSK 2016
247+
astro5:{tps:1825.359630, transactions:100000, selects:0, updates:200080, aborts:117, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:1000, hosts:3}
248+
Bench finished at Чт. апр. 14 18:51:28 MSK 2016
249+
Bench started at Чт. апр. 14 18:51:58 MSK 2016
250+
astro5:{tps:1769.625629, transactions:150000, selects:0, updates:300148, aborts:230, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:1000, hosts:3}
251+
Bench finished at Чт. апр. 14 18:53:23 MSK 2016
252+
Bench started at Чт. апр. 14 18:53:42 MSK 2016
253+
astro5:{tps:180.239135, transactions:150000, selects:0, updates:300156, aborts:232, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:1000, hosts:3}
254+
Bench finished at Чт. апр. 14 19:07:34 MSK 2016

‎tests/perf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
-name:run transfers
4747
shell:>
4848
~/pg_cluster/install/bin/dtmbench {{connections}}
49-
-w {{ nconns }} -r 0 -n10000 -a 500000 -p {{ up }} |
49+
-w {{ nconns }} -r 0 -n1000 -a 500000 -p {{ up }} |
5050
tee -a perf.results |
5151
sed "s/^/`hostname`:/"
5252
register:transfers_result

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp