Skip to content

Instantly share code, notes, and snippets.

@davisp
Last active September 1, 2015 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davisp/3ab37e9c69522fe1badd to your computer and use it in GitHub Desktop.
Save davisp/3ab37e9c69522fe1badd to your computer and use it in GitHub Desktop.
Data on 17.5 and +sbwt settings
% The lock counting VM is the same except for being built with
% --enable-lock-counting
(dbcore@db1.cluster.name.goes.here)3> erlang:system_info(system_version).
"Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:24:24] [async-threads:32] [hipe] [kernel-poll:true]\n"
% These were captured after the test and back on the non
% lock counting emulator just to show a rough estimate on
% reductions and proc counts for this node.
(dbcore@db1.cluster.name.goes.here)2> erlang:statistics(reductions).
{5844671251,8345795}
(dbcore@db1.cluster.name.goes.here)3> length(erlang:processes()).
19071
(dbcore@db1.cluster.name.goes.here)5> lcnt:start(),
(dbcore@db1.cluster.name.goes.here)5> lcnt:rt_opt({copy_save, true}),
(dbcore@db1.cluster.name.goes.here)5> lcnt:clear(),
(dbcore@db1.cluster.name.goes.here)5> timer:sleep(60000),
(dbcore@db1.cluster.name.goes.here)5> lcnt:collect(),
(dbcore@db1.cluster.name.goes.here)5>
(dbcore@db1.cluster.name.goes.here)5> lcnt:conflicts(),
(dbcore@db1.cluster.name.goes.here)5>
(dbcore@db1.cluster.name.goes.here)5> lcnt:conflicts([
(dbcore@db1.cluster.name.goes.here)5> {combine, false},
(dbcore@db1.cluster.name.goes.here)5> {max_locks, none},
(dbcore@db1.cluster.name.goes.here)5> {print, [name, id, type, tries, colls, ratio, time, duration]}
(dbcore@db1.cluster.name.goes.here)5> ]).
lock id #tries #collisions collisions [%] time [us] duration [%]
----- --- ------- ------------ --------------- ---------- -------------
run_queue 24 18908746 1021917 5.4045 16050636 26.7506
proc_link 117158 3482258 47573 1.3662 1682509 2.8041
proc_main 117158 5810562 254167 4.3742 1248094 2.0801
timeofday 1 2053147 76521 3.7270 1241633 2.0694
proc_msgq 117158 5534703 15671 0.2831 483755 0.8062
proc_status 117158 7985126 11640 0.1458 430530 0.7175
async_enq_mtx 24 764843 2808 0.3671 86022 0.1434
pollset 1 181308 780 0.4302 62374 0.1040
alcu_allocator 9 168676 2070 1.2272 36750 0.0612
db_tab 115 5224998 1240 0.0237 28876 0.0481
timer_wheel 1 419002 1890 0.4511 25265 0.0421
make_ref 1 836987 7738 0.9245 22007 0.0367
dist_entry_links 20 139617 226 0.1619 16387 0.0273
dist_entry_out_queue 20 369870 937 0.2533 11966 0.0199
bif_timers 1 30017 519 1.7290 7319 0.0122
drv_ev_state 16 292939 85 0.0290 2316 0.0039
db_hash_slot 1024 1033679 115 0.0111 2044 0.0034
child_status 1 24 1 4.1667 220 0.0004
db_tab_fix 115 644 1 0.1553 57 0.0001
lock id type #tries #collisions collisions [%] time [us] duration [%]
----- --- ----- ------- ------------ --------------- ---------- -------------
timeofday mutex 2053147 76521 3.7270 1241633 2.0694
run_queue 2 mutex 1122389 61760 5.5025 989035 1.6484
run_queue 4 mutex 1181217 66163 5.6013 978146 1.6302
run_queue 6 mutex 1402800 70816 5.0482 970177 1.6169
run_queue 11 mutex 1307767 62664 4.7917 955968 1.5933
run_queue 3 mutex 1133773 62482 5.5110 952507 1.5875
run_queue 5 mutex 1353540 68297 5.0458 943732 1.5729
run_queue 13 mutex 1073734 61010 5.6820 931738 1.5529
run_queue 14 mutex 1144373 63275 5.5292 923287 1.5388
run_queue 15 mutex 871349 53813 6.1758 877801 1.4630
run_queue 7 mutex 917803 50092 5.4578 874415 1.4573
run_queue 16 mutex 889047 49108 5.5237 855519 1.4258
run_queue 9 mutex 1054746 51456 4.8785 836173 1.3936
run_queue 8 mutex 884701 49930 5.6437 813207 1.3553
run_queue 1 mutex 876048 46904 5.3540 802433 1.3374
run_queue 10 mutex 1046125 51154 4.8899 764762 1.2746
run_queue 17 mutex 736017 44946 6.1067 721016 1.2017
run_queue 12 mutex 902703 44430 4.9219 710957 1.1849
run_queue 18 mutex 731716 44789 6.1211 700067 1.1668
proc_link ioq_server proclock 640781 32065 5.0040 536806 0.8947
proc_link couch_server proclock 94487 4795 5.0748 173469 0.2891
run_queue 19 mutex 89081 6381 7.1631 171900 0.2865
proc_main ioq_server proclock 435917 200122 45.9083 119485 0.1991
run_queue 20 mutex 64012 4302 6.7206 111211 0.1853
proc_status couch_server proclock 223821 3431 1.5329 107178 0.1786
proc_msgq couch_stats_process_tracker proclock 60719 909 1.4971 99799 0.1663
proc_link 'rexi_server_dbcore@db10.cluster.name.goes.here' proclock 36569 404 1.1048 93663 0.1561
proc_msgq couch_server proclock 180654 3219 1.7819 84054 0.1401
run_queue 22 mutex 49019 3375 6.8851 78865 0.1314
proc_msgq 'rexi_server_dbcore@db10.cluster.name.goes.here' proclock 55192 326 0.5907 68900 0.1148
proc_status 'rexi_server_dbcore@db10.cluster.name.goes.here' proclock 79766 434 0.5441 65191 0.1086
pollset mutex 181308 780 0.4302 62374 0.1040
run_queue 21 mutex 55199 3460 6.2682 62201 0.1037
proc_main <dbcore@db1.cluster.name.goes.here.6785.0> proclock 201667 889 0.4408 56375 0.0940
proc_main couch_server proclock 156168 24760 15.8547 55535 0.0926
proc_link 'rexi_server_dbcore@db8.cluster.name.goes.here' proclock 35085 371 1.0574 48509 0.0808
proc_link couch_stats_process_tracker proclock 31037 532 1.7141 48357 0.0806
proc_main <dbcore@db1.cluster.name.goes.here.2933.0> proclock 533930 1697 0.3178 48172 0.0803
proc_msgq ioq_server proclock 713992 5134 0.7191 39111 0.0652
proc_msgq 'rexi_server_dbcore@db8.cluster.name.goes.here' proclock 53338 274 0.5137 37238 0.0621
alcu_allocator driver_alloc mutex 167797 2070 1.2336 36750 0.0612
proc_link mem3_sync proclock 6280 552 8.7898 35985 0.0600
# +sbwt default
$ sudo strace -c -p 27282
Process 27282 attached - interrupt to quit
^CProcess 27282 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
91.21 28.848422 768 37549 2361 futex
6.13 1.937832 4 549044 sched_yield
2.10 0.662966 44 14986 epoll_wait
0.25 0.078493 892 88 munmap
0.15 0.047922 17 2904 writev
0.07 0.022658 12 1873 25 recvfrom
0.03 0.010821 7 1609 write
0.03 0.008352 6 1385 618 read
0.02 0.005834 154 38 mmap
0.01 0.002716 8 350 getsockopt
0.00 0.000496 6 77 2 epoll_ctl
0.00 0.000444 444 1 mremap
0.00 0.000274 1 257 setsockopt
0.00 0.000069 4 17 close
0.00 0.000048 2 20 getpeername
0.00 0.000028 7 4 sendto
0.00 0.000000 0 9 5 accept
0.00 0.000000 0 3 shutdown
0.00 0.000000 0 8 fcntl
0.00 0.000000 0 1 times
------ ----------- ----------- --------- --------- ----------------
100.00 31.627375 610223 3011 total
# +sbwt none
$ sudo strace -c -p 8190
Process 8190 attached - interrupt to quit
^CProcess 8190 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
99.57 32.231086 484 66616 4407 futex
0.29 0.092479 1468 63 munmap
0.09 0.027731 6 4811 epoll_wait
0.04 0.012086 432 28 mmap
0.01 0.003167 3 1175 writev
0.01 0.002090 2 874 sched_yield
0.00 0.001401 1 1528 write
0.00 0.000947 0 2871 1365 read
0.00 0.000548 1 1094 14 recvfrom
0.00 0.000082 7 12 close
0.00 0.000022 0 81 getsockopt
0.00 0.000012 0 51 2 epoll_ctl
0.00 0.000000 0 2 socket
0.00 0.000000 0 2 2 connect
0.00 0.000000 0 6 sendto
0.00 0.000000 0 3 shutdown
0.00 0.000000 0 2 bind
0.00 0.000000 0 2 getsockname
0.00 0.000000 0 2 getpeername
0.00 0.000000 0 65 setsockopt
0.00 0.000000 0 4 fcntl
------ ----------- ----------- --------- --------- ----------------
100.00 32.371651 79292 5790 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment