Skip to content

Instantly share code, notes, and snippets.

@igormunkin
Last active October 5, 2021 12:34
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 igormunkin/e956396d8fb3348d3ebbad60588af297 to your computer and use it in GitHub Desktop.
Save igormunkin/e956396d8fb3348d3ebbad60588af297 to your computer and use it in GitHub Desktop.
#!/usr/bin/tarantool
-- vim:ts=4 ss=4 sw=4 expandtab
-- Usage: tarantool relay-1mops.lua [num_ops] [nodes]
-- num_ops should be a number multiple of num_fibers * ops_per_txn
-- nodes should be a number from 1 to 31
local clock = require('clock')
local fiber = require('fiber')
local popen = require('popen')
local yaml = require('yaml')
-- TUNE OPTIONS HERE
-- working dir is cleared/created for every run, set mwd
-- during the test a subdir will be created for each replica
local mwd = './relay-test.data'
-- turn true to test the qsync
local test_qsync = false
-- number of operations performed by test
local num_ops = tonumber(arg[1] or 1e6)
-- number of fibers
local num_fibers = 50
-- number of operations per transaction
local ops_per_txn = 100
-- check the number of operations value
local txns, tail = math.modf(num_ops / num_fibers / ops_per_txn)
assert(txns > 0 and tail == 0,
('Invalid number of iterations: %s'):format(num_ops))
-- number of nodes - master and replicas
local nodes, tail = math.modf(tonumber(arg[2] or 0) + 1)
assert(nodes > 0 and nodes < 32 and tail == 0,
('Invalid number of nodes: %s'):format(nodes))
-- posterior evaluation shows that 256Mb is enough to make
-- 4 million replaces
local default_memtx_memory = 256 * 1024 * 1024
local memtx_memory = math.max(math.ceil(num_ops / 1e6 * default_memtx_memory),
default_memtx_memory)
-- END OF TUNABLE OPTIONS
print(('making %d operations, %d operations per txn using %d fibers'):format(
num_ops, ops_per_txn, num_fibers))
--- transactions per fiber
local trans_per_fiber = num_ops/ops_per_txn/num_fibers
os.execute(('rm -rf %s'):format(mwd))
os.execute(('mkdir -p %s'):format(mwd))
box.cfg({
listen = 3301,
log_level = 0,
memtx_memory = memtx_memory,
read_only = false,
replication = 'replicator:password@localhost:3301',
work_dir = mwd,
})
if test_qsync then
box.cfg({ replication_synchro_quorum = nodes })
end
box.schema.user.create('replicator', { password = 'password' })
box.schema.user.grant('replicator', 'replication')
-- number of nodes, storage for popen handles
local nodes_ph = {}
-- run replicas (if needed)
if nodes > 1 then
print(('starting %d replicas'):format(nodes - 1))
for i = 2, nodes do
-- subdir for replica's data
local rwd = ('relay-test.replica-%s'):format(i)
os.execute(('rm -rf %s'):format(rwd))
os.execute(('mkdir -p %s'):format(rwd))
-- command line for replica to start
local cmd = { arg[-1], '-e', ([[
box.cfg({
listen = %d,
log_level = 0,
memtx_memory = %d,
read_only = false,
replication = 'replicator:password@localhost:3301',
work_dir = '%s',
})
]]):format(3300 + i, memtx_memory, rwd) }
local res, err = popen.new(cmd, {
stdin = 'devnull',
stdout = 'devnull',
stderr = 'devnull',
})
assert(res, ('Error running replica %d: %s'):format(i, err))
nodes_ph[i] = res
end
-- wait for all replicas to connect
while #box.info.replication < nodes do
fiber.sleep(0.1)
end
end
local space = box.schema.create_space('test',
test_qsync and { is_sync = true } or { })
space:create_index('pk', { type = 'HASH' })
-- each fiber runs the fiber_load that has evenly distributed workload
function fiber_load(start, s)
for i = 1, trans_per_fiber do
box.begin()
for j = 1, ops_per_txn do
s:replace{ start, start }
start = start + 1
end
box.commit()
end
end
-- fiber storage to join them
local fibers_storage = { }
-- start timer
local start = {
lsn = box.info.replication[1].lsn,
proc = clock.proc(),
time = clock.time(),
}
for i = 1, num_fibers do
fibers_storage[i] = fiber.create(fiber_load, i*num_ops, space)
fibers_storage[i]:wakeup() -- needed for backward compatibility with 1.7
end
-- wait for all fibers to finish
for i = 1, num_fibers do
while fibers_storage[i]:status() ~= 'dead' do
fiber.yield()
end -- the loop is needed for backward compatibility with 1.7
end
local ops_done = box.info.replication[1].lsn
-- stop timer for master
local stop = {
lsn = ops_done - start.lsn,
proc = clock.proc() - start.proc,
time = clock.time() - start.time,
}
assert(num_ops == stop.lsn,
('Missing data: %d/%d inserted'):format(stop.lsn, num_ops))
print(('master done in time: %f, cpu: %f\nmaster speed: %d ops/sec'):format(
stop.time, stop.proc, math.floor(stop.lsn / stop.time)))
-- wait for all replicas and kill them
if nodes > 1 then
local done = false
repeat
for i = 2, nodes do
local r_vclock = box.info.replication[i].downstream.vclock
if r_vclock and r_vclock[1] < ops_done then
done = false
break
end
done = true
end
if not done then
fiber.sleep(0.001)
end
until done
-- stop timer for replicas
stop = {
lsn = box.info.replication[nodes].downstream.vclock[1] - start.lsn,
time = clock.time() - start.time,
proc = clock.proc() - start.proc,
}
print(('replicas done in time: %f, cpu: %f\nreplicas speed: %f ops/sec'):format(
stop.time, stop.proc, math.floor(stop.lsn / stop.time)))
for _, replica in pairs(nodes_ph) do
replica:kill()
replica:wait()
end
end
os.exit(0)
@igormunkin
Copy link
Author

igormunkin commented Aug 10, 2021

% sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
% uname -mrs
Darwin 19.4.0 x86_64
% sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.4
BuildVersion:   19E287
% md5 relay-1mops.lua                                                                                         
MD5 (relay-1mops.lua) = 69e3940e8975a4e29f77ea566f25709e
% ../src/tarantool -v
Tarantool 2.10.0-beta1-0-g7da4b1438
Target: Darwin-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=OFF
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc /Library/Developer/CommandLineTools/usr/bin/c++
C_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-common -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-gnu-alignof-expression
CXX_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-common -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-invalid-offsetof -Wno-gnu-alignof-expression
% ../src/tarantool -e 'print(jit.os, jit.arch)'
OSX     x64
% for n in 1e6 5e6 10e6 15e6 20e6; do for i in $(seq 1 15); do ../src/tarantool relay-1mops.lua $n; done; done
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.748003, cpu: 1.000784
master speed: 1336893 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.746805, cpu: 0.995779
master speed: 1339037 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.761108, cpu: 1.012378
master speed: 1313874 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.754540, cpu: 1.003087
master speed: 1325310 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.749934, cpu: 0.996619
master speed: 1333450 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.744439, cpu: 0.986160
master speed: 1343293 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.739956, cpu: 0.987343
master speed: 1351431 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.743603, cpu: 0.986241
master speed: 1344803 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.749837, cpu: 0.999556
master speed: 1333623 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.782833, cpu: 1.041348
master speed: 1277411 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.757378, cpu: 1.010349
master speed: 1320344 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.764940, cpu: 1.016631
master speed: 1307292 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.761197, cpu: 1.014898
master speed: 1313720 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.759262, cpu: 1.006105
master speed: 1317068 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.741279, cpu: 0.981495
master speed: 1349019 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.776349, cpu: 4.977438
master speed: 1324030 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.804778, cpu: 5.005573
master speed: 1314137 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.885928, cpu: 5.109005
master speed: 1286693 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.807674, cpu: 5.012843
master speed: 1313137 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.841435, cpu: 5.051812
master speed: 1301596 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.824105, cpu: 5.043984
master speed: 1307495 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.794555, cpu: 4.997625
master speed: 1317677 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.816000, cpu: 5.041856
master speed: 1310272 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.828471, cpu: 5.024742
master speed: 1306004 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.839865, cpu: 5.043088
master speed: 1302129 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.850235, cpu: 5.048385
master speed: 1298622 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.819322, cpu: 5.032066
master speed: 1309132 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.798568, cpu: 4.990996
master speed: 1316285 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.857829, cpu: 5.069566
master speed: 1296065 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.834212, cpu: 5.056494
master speed: 1304048 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.762757, cpu: 10.148653
master speed: 1288202 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.727071, cpu: 10.097074
master speed: 1294151 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.794160, cpu: 10.221397
master speed: 1283011 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.725877, cpu: 10.141006
master speed: 1294351 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.706742, cpu: 10.072012
master speed: 1297565 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.720944, cpu: 10.126591
master speed: 1295178 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.782066, cpu: 10.181287
master speed: 1285005 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.653392, cpu: 10.023680
master speed: 1306610 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.763674, cpu: 10.124499
master speed: 1288049 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.756269, cpu: 10.156432
master speed: 1289279 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.739745, cpu: 10.093656
master speed: 1292032 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.755129, cpu: 10.128027
master speed: 1289469 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.610581, cpu: 9.981838
master speed: 1313960 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.561276, cpu: 9.911779
master speed: 1322528 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.666159, cpu: 10.023491
master speed: 1304434 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.535024, cpu: 15.084888
master speed: 1300387 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.337260, cpu: 14.844181
master speed: 1323071 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.491279, cpu: 15.081998
master speed: 1305337 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.717567, cpu: 15.301102
master speed: 1280129 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.378644, cpu: 14.885644
master speed: 1318259 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.388558, cpu: 14.870015
master speed: 1317111 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.322730, cpu: 14.826263
master speed: 1324768 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.384407, cpu: 14.904165
master speed: 1317591 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.552321, cpu: 15.032332
master speed: 1298440 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.673460, cpu: 15.254366
master speed: 1284966 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.397923, cpu: 14.915563
master speed: 1316029 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.566382, cpu: 15.125053
master speed: 1296861 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.420542, cpu: 14.945501
master speed: 1313422 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.456617, cpu: 14.965877
master speed: 1309287 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.490075, cpu: 15.061668
master speed: 1305474 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.487407, cpu: 20.048666
master speed: 1291371 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.378478, cpu: 20.002097
master speed: 1300518 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.519103, cpu: 20.150905
master speed: 1288734 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.795245, cpu: 20.435142
master speed: 1266203 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.415219, cpu: 20.083331
master speed: 1297419 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.603739, cpu: 20.336397
master speed: 1281744 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.415684, cpu: 20.079524
master speed: 1297379 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.522275, cpu: 20.147702
master speed: 1288470 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.635055, cpu: 20.269601
master speed: 1279176 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.332810, cpu: 19.942507
master speed: 1304392 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.401282, cpu: 20.041680
master speed: 1298593 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.587846, cpu: 20.236653
master speed: 1283050 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.647438, cpu: 20.232646
master speed: 1278164 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.702419, cpu: 20.322521
master speed: 1273689 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.352604, cpu: 19.927939
master speed: 1302710 ops/sec

@igormunkin
Copy link
Author

igormunkin commented Aug 10, 2021

$ sysctl -n machdep.cpu.brand_string
Apple M1
$ uname -mrs
Darwin 20.6.0 arm64
$ sw_vers
ProductName:	macOS
ProductVersion:	11.5.1
BuildVersion:	20G80
$ md5 relay-1mops.lua                                                                                         
MD5 (relay-1mops.lua) = 69e3940e8975a4e29f77ea566f25709e
$ ../src/tarantool -v
Tarantool 2.10.0-beta1-0-g7da4b1438
Target: Darwin-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=OFF
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc /Library/Developer/CommandLineTools/usr/bin/c++
C_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-common -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-gnu-alignof-expression
CXX_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-common -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-invalid-offsetof -Wno-gnu-alignof-expression
$ ../src/tarantool -e 'print(jit.os, jit.arch)'
OSX	arm64
$ for n in 1e6 5e6 10e6 15e6 20e6; do for i in $(seq 1 15); do ../src/tarantool relay-1mops.lua $n; done; done
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.513485, cpu: 0.694377
master speed: 1947476 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.515587, cpu: 0.695593
master speed: 1939536 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.514109, cpu: 0.694142
master speed: 1945113 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.520584, cpu: 0.701663
master speed: 1920919 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.518380, cpu: 0.698936
master speed: 1929087 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.537575, cpu: 0.718700
master speed: 1860205 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.530633, cpu: 0.711810
master speed: 1884541 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.533390, cpu: 0.714883
master speed: 1874800 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.516247, cpu: 0.696320
master speed: 1937057 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.515243, cpu: 0.695665
master speed: 1940832 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.517204, cpu: 0.696521
master speed: 1933472 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.522334, cpu: 0.701736
master speed: 1914484 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.515059, cpu: 0.693252
master speed: 1941525 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.530446, cpu: 0.710382
master speed: 1885205 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.523705, cpu: 0.704330
master speed: 1909471 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.583679, cpu: 3.455264
master speed: 1935224 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.565490, cpu: 3.441563
master speed: 1948945 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.577809, cpu: 3.454398
master speed: 1939631 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.578820, cpu: 3.450931
master speed: 1938871 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.596891, cpu: 3.468740
master speed: 1925379 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.612779, cpu: 3.487325
master speed: 1913671 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.583271, cpu: 3.458284
master speed: 1935530 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.589305, cpu: 3.463304
master speed: 1931020 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.581282, cpu: 3.451028
master speed: 1937022 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.583490, cpu: 3.459056
master speed: 1935366 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.577924, cpu: 3.455759
master speed: 1939545 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.597693, cpu: 3.471893
master speed: 1924784 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.583340, cpu: 3.451979
master speed: 1935478 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.570901, cpu: 3.447417
master speed: 1944843 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 2.567064, cpu: 3.442098
master speed: 1947750 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.160520, cpu: 6.908711
master speed: 1937789 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.162725, cpu: 6.921334
master speed: 1936961 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.325083, cpu: 7.072004
master speed: 1877905 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.163672, cpu: 6.906250
master speed: 1936606 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.223807, cpu: 6.974090
master speed: 1914312 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.188444, cpu: 6.942314
master speed: 1927360 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.141926, cpu: 6.884945
master speed: 1944796 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.146730, cpu: 6.900254
master speed: 1942981 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.175809, cpu: 6.932020
master speed: 1932065 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.207238, cpu: 6.953084
master speed: 1920403 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.153160, cpu: 6.897668
master speed: 1940556 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.167791, cpu: 6.921510
master speed: 1935062 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.160697, cpu: 6.917151
master speed: 1937722 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.155869, cpu: 6.898616
master speed: 1939537 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.233821, cpu: 6.983177
master speed: 1910649 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.683132, cpu: 10.306493
master speed: 1952328 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.719851, cpu: 10.351335
master speed: 1943042 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.717612, cpu: 10.372665
master speed: 1943606 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.761347, cpu: 10.382849
master speed: 1932654 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.695678, cpu: 10.322931
master speed: 1949146 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.711488, cpu: 10.327153
master speed: 1945149 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.698423, cpu: 10.320968
master speed: 1948451 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.707843, cpu: 10.327750
master speed: 1946069 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.708424, cpu: 10.325776
master speed: 1945923 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.720346, cpu: 10.346905
master speed: 1942918 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.694705, cpu: 10.314785
master speed: 1949392 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.725098, cpu: 10.349691
master speed: 1941722 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.684736, cpu: 10.312637
master speed: 1951921 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.706184, cpu: 10.328219
master speed: 1946488 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.735034, cpu: 10.358294
master speed: 1939228 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.454208, cpu: 13.927451
master speed: 1913105 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.543672, cpu: 14.054370
master speed: 1896872 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.456510, cpu: 13.928433
master speed: 1912684 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.337435, cpu: 13.805711
master speed: 1934715 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.367294, cpu: 13.834666
master speed: 1929143 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.340018, cpu: 13.802692
master speed: 1934232 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.340294, cpu: 13.812468
master speed: 1934180 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.401648, cpu: 13.861166
master speed: 1922772 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.364378, cpu: 13.834742
master speed: 1929686 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.363388, cpu: 13.838424
master speed: 1929870 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.325387, cpu: 13.784442
master speed: 1936973 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.351826, cpu: 13.840191
master speed: 1932026 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.452252, cpu: 13.915487
master speed: 1913463 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.388245, cpu: 13.866625
master speed: 1925252 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.387833, cpu: 13.852002
master speed: 1925329 ops/sec

@Mons
Copy link

Mons commented Aug 10, 2021

> sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
# work/1m
> uname -mrs
Darwin 20.5.0 x86_64
# work/1m
> sw_vers
ProductName:  macOS
ProductVersion:  11.4
BuildVersion:  20F71
# work/1m
> md5 relay-1mops.lua
MD5 (relay-1mops.lua) = 127c31b1abf004a869906140c162e086
# work/1m
> tarantool -v
Tarantool 2.9.0-253-gdd7fa3429
Target: Darwin-x86_64-Release
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/tarantool/HEAD-dd7fa34_1 -DENABLE_BACKTRACE=ON
Compiler: /usr/bin/clang /usr/bin/clang++
C_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-gnu-alignof-expression -Wno-cast-function-type
CXX_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type
# work/1m
> tarantool -e 'print(jit.os, jit.arch)'
OSX  x64
# work/1m
> for i in $(seq 1 1); do time tarantool relay-1mops.lua; done
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.795921, cpu: 7.468413
master speed  894699  ops/sec

real  0m5.958s
user  0m6.980s
sys  0m0.594s
# work/1m
> for i in $(seq 1 15); do time tarantool relay-1mops.lua; done
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 4.934038, cpu: 6.386933
master speed  1050986  ops/sec

real  0m5.022s
user  0m5.982s
sys  0m0.472s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 4.838994, cpu: 6.281389
master speed  1071629  ops/sec

real  0m4.916s
user  0m5.897s
sys  0m0.453s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.450562, cpu: 7.037221
master speed  951389  ops/sec

real  0m5.538s
user  0m6.559s
sys  0m0.546s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.259865, cpu: 6.733558
master speed  985882  ops/sec

real  0m5.344s
user  0m6.327s
sys  0m0.475s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 4.949269, cpu: 6.423151
master speed  1047752  ops/sec

real  0m5.021s
user  0m6.004s
sys  0m0.487s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.019595, cpu: 6.511790
master speed  1033073  ops/sec

real  0m5.108s
user  0m6.106s
sys  0m0.477s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.317009, cpu: 6.844281
master speed  975286  ops/sec

real  0m5.384s
user  0m6.408s
sys  0m0.497s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.191459, cpu: 6.698964
master speed  998872  ops/sec

real  0m5.264s
user  0m6.285s
sys  0m0.479s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.326208, cpu: 6.842953
master speed  973602  ops/sec

real  0m5.399s
user  0m6.400s
sys  0m0.510s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 4.900490, cpu: 6.356106
master speed  1058181  ops/sec

real  0m4.989s
user  0m5.968s
sys  0m0.457s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 4.939425, cpu: 6.420652
master speed  1049840  ops/sec

real  0m5.012s
user  0m6.010s
sys  0m0.479s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.334370, cpu: 6.928080
master speed  972112  ops/sec

real  0m5.416s
user  0m6.492s
sys  0m0.506s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 5.049802, cpu: 6.497753
master speed  1026893  ops/sec

real  0m5.142s
user  0m6.106s
sys  0m0.466s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 4.866929, cpu: 6.333305
master speed  1065478  ops/sec
real  0m4.947s
user  0m5.920s
sys  0m0.478s
making 10000000 operations, 100 operations per txn usnig 50 fibers
master done in time: 4.992269, cpu: 6.489714
master speed  1038727  ops/sec

real  0m5.080s
user  0m6.063s
sys  0m0.498s

@igormunkin
Copy link
Author

igormunkin commented Aug 11, 2021

Some stats for wall clock timings and operations per second (Apple M1 vs Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz).

1000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (wall clock) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (ops/sec) Relation (i7-8700B/M1)
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Run 1 0.513485 1947476 0.748003 1336893 1.456718307
Run 2 0.515587 1939536 0.746805 1339037 1.448455838
Run 3 0.514109 1945113 0.761108 1313874 1.480440918
Run 4 0.520584 1920919 0.754540 1325310 1.449410662
Run 5 0.518380 1929087 0.749934 1333450 1.446687758
Run 6 0.537575 1860205 0.744439 1343293 1.384809561
Run 7 0.530633 1884541 0.739956 1351431 1.394477916
Run 8 0.533390 1874800 0.743603 1344803 1.394107501
Run 9 0.516247 1937057 0.749837 1333623 1.452477206
Run 10 0.515243 1940832 0.782833 1277411 1.519347182
Run 11 0.517204 1933472 0.757378 1320344 1.464369958
Run 12 0.522334 1914484 0.764940 1307292 1.464465266
Run 13 0.515059 1941525 0.761197 1313720 1.477883116
Run 14 0.530446 1885205 0.759262 1317068 1.431365304
Run 15 0.523705 1909471 0.741279 1349019 1.415451447
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Med 0.518380 1929087 0.749934 1333450 1.446687758
Avg 0.521599 1917581.533 0.7536742667 1327104.533 1.444931167
Min 0.513485 1860205 0.739956 1277411 1.441046963
Max 0.537575 1947476 0.782833 1351431 1.456230293
5000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (wall clock) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (ops/sec) Relation (i7-8700B/M1)
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Run 1 2.583679 1935224 3.776349 1324030 1.461616942
Run 2 2.565490 1948945 3.804778 1314137 1.483060936
Run 3 2.577809 1939631 3.885928 1286693 1.507453811
Run 4 2.578820 1938871 3.807674 1313137 1.476517942
Run 5 2.596891 1925379 3.841435 1301596 1.479243834
Run 6 2.612779 1913671 3.824105 1307495 1.463615943
Run 7 2.583271 1935530 3.794555 1317677 1.468895443
Run 8 2.589305 1931020 3.816000 1310272 1.473754540
Run 9 2.581282 1937022 3.828471 1306004 1.483166504
Run 10 2.583490 1935366 3.839865 1302129 1.486309217
Run 11 2.577924 1939545 3.850235 1298622 1.493540927
Run 12 2.597693 1924784 3.819322 1309132 1.470274586
Run 13 2.583340 1935478 3.798568 1316285 1.470409625
Run 14 2.570901 1944843 3.857829 1296065 1.500574701
Run 15 2.567064 1947750 3.834212 1304048 1.493617611
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Med 2.583271 1935530 3.824105 1307495 1.480334429
Avg 2.583315867 1935537.267 3.8252884 1307154.8 1.480766812
Min 2.56549 1913671 3.776349 1286693 1.471979622
Max 2.612779 1948945 3.885928 1324030 1.487277722
10000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (wall clock) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (ops/sec) Relation (i7-8700B/M1)
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Run 1 5.160520 1937789 7.762757 1288202 1.504258679
Run 2 5.162725 1936961 7.727071 1294151 1.496703969
Run 3 5.325083 1877905 7.79416 1283011 1.463669205
Run 4 5.163672 1936606 7.725877 1294351 1.496198248
Run 5 5.223807 1914312 7.706742 1297565 1.475311396
Run 6 5.188444 1927360 7.720944 1295178 1.488103948
Run 7 5.141926 1944796 7.782066 1285005 1.513453519
Run 8 5.146730 1942981 7.653392 1306610 1.487039732
Run 9 5.175809 1932065 7.763674 1288049 1.499992368
Run 10 5.207238 1920403 7.756269 1289279 1.489516899
Run 11 5.153160 1940556 7.739745 1292032 1.501941527
Run 12 5.167791 1935062 7.755129 1289469 1.500666145
Run 13 5.160697 1937722 7.610581 1313960 1.474719597
Run 14 5.155869 1939537 7.561276 1322528 1.466537649
Run 15 5.233821 1910649 7.666159 1304434 1.464734656
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Med 5.163672 1936606 7.727071 1294151 1.496429479
Avg 5.184486133 1928980.267 7.715056133 1296254.933 1.488104305
Min 5.141926 1877905 7.561276 1283011 1.470514356
Max 5.325083 1944796 7.79416 1322528 1.463669205
15000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (wall clock) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (ops/sec) Relation (i7-8700B/M1)
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Run 1 7.683132 1952328 11.535024 1300387 1.501343983
Run 2 7.719851 1943042 11.337260 1323071 1.468585339
Run 3 7.717612 1943606 11.491279 1305337 1.488968220
Run 4 7.761347 1932654 11.717567 1280129 1.509733684
Run 5 7.695678 1949146 11.378644 1318259 1.478575897
Run 6 7.711488 1945149 11.388558 1317111 1.476830153
Run 7 7.698423 1948451 11.322730 1324768 1.470785640
Run 8 7.707843 1946069 11.384407 1317591 1.476989996
Run 9 7.708424 1945923 11.552321 1298440 1.498661854
Run 10 7.720346 1942918 11.673460 1284966 1.512038450
Run 11 7.694705 1949392 11.397923 1316029 1.481268353
Run 12 7.725098 1941722 11.566382 1296861 1.497247284
Run 13 7.684736 1951921 11.420542 1313422 1.486133291
Run 14 7.706184 1946488 11.456617 1309287 1.486678361
Run 15 7.735034 1939228 11.490075 1305474 1.485458887
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Med 7.708424 1945923 11.456617 1309287 1.486246346
Avg 7.711326733 1945202.467 11.47418593 1307408.8 1.487965214
Min 7.683132 1932654 11.32273 1280129 1.473712804
Max 7.761347 1952328 11.717567 1324768 1.509733684
20000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (wall clock) Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz (ops/sec) Relation (i7-8700B/M1)
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Run 1 10.454208 1913105 15.487407 1291371 1.481451967
Run 2 10.543672 1896872 15.378478 1300518 1.458550494
Run 3 10.456510 1912684 15.519103 1288734 1.484157047
Run 4 10.337435 1934715 15.795245 1266203 1.527965593
Run 5 10.367294 1929143 15.415219 1297419 1.486908638
Run 6 10.340018 1934232 15.603739 1281744 1.509063040
Run 7 10.340294 1934180 15.415684 1297379 1.490836141
Run 8 10.401648 1922772 15.522275 1288470 1.492289972
Run 9 10.364378 1929686 15.635055 1279176 1.508537705
Run 10 10.363388 1929870 15.332810 1304392 1.479517123
Run 11 10.325387 1936973 15.401282 1298593 1.491593681
Run 12 10.351826 1932026 15.587846 1283050 1.505806415
Run 13 10.452252 1913463 15.647438 1278164 1.497039872
Run 14 10.388245 1925252 15.702419 1273689 1.511556476
Run 15 10.387833 1925329 15.352604 1302710 1.477940972
-------- ----------------------- -------------------- ------------------------------------------------------- ---------------------------------------------------- ------------------------
Med 10.367294 1929143 15.519103 1288734 1.496928996
Avg 10.39162587 1924686.8 15.5197736 1288774.133 1.493488488
Min 10.325387 1896872 15.33281 1266203 1.484962259
Max 10.543672 1936973 15.795245 1304392 1.498078184

@igormunkin
Copy link
Author

$ sysctl -n machdep.cpu.brand_string
Apple M1
$ uname -mrs
Darwin 20.6.0 x86_64
$ sw_vers
ProductName:	macOS
ProductVersion:	11.5.1
BuildVersion:	20G80
$ md5 relay-1mops.lua
MD5 (relay-1mops.lua) = 69e3940e8975a4e29f77ea566f25709e
$ ../src/tarantool -v
Tarantool 2.10.0-beta1-0-g7da4b1438
Target: Darwin-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=ON
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc /Library/Developer/CommandLineTools/usr/bin/c++
C_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-gnu-alignof-expression
CXX_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-invalid-offsetof -Wno-gnu-alignof-expression
$ ../src/tarantool -e 'print(jit.os, jit.arch)'
OSX	x64
$ for n in 1e6 5e6 10e6 15e6 20e6; do for i in $(seq 1 15); do ../src/tarantool relay-1mops.lua $n; done; done
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.779232, cpu: 1.054822
master speed: 1283314 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.803177, cpu: 1.089019
master speed: 1245055 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.805633, cpu: 1.085222
master speed: 1241259 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.826969, cpu: 1.104036
master speed: 1209234 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.806673, cpu: 1.083981
master speed: 1239659 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.812485, cpu: 1.089466
master speed: 1230791 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.809894, cpu: 1.086409
master speed: 1234729 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.795565, cpu: 1.072323
master speed: 1256968 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.776764, cpu: 1.054203
master speed: 1287392 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.793976, cpu: 1.071376
master speed: 1259483 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.799150, cpu: 1.078550
master speed: 1251329 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.784650, cpu: 1.062039
master speed: 1274453 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.814270, cpu: 1.091158
master speed: 1228093 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.810215, cpu: 1.086353
master speed: 1234240 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 0.800976, cpu: 1.077614
master speed: 1248476 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.001385, cpu: 5.353211
master speed: 1249567 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.026963, cpu: 5.379230
master speed: 1241630 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.046618, cpu: 5.397919
master speed: 1235599 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.924158, cpu: 5.277416
master speed: 1274158 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.993017, cpu: 5.345797
master speed: 1252186 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.011028, cpu: 5.358081
master speed: 1246563 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.037565, cpu: 5.385246
master speed: 1238370 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.160194, cpu: 5.512235
master speed: 1201866 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.978172, cpu: 5.329920
master speed: 1256858 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.062729, cpu: 5.422704
master speed: 1230699 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.943704, cpu: 5.297591
master speed: 1267843 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.982676, cpu: 5.335357
master speed: 1255437 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.041098, cpu: 5.393311
master speed: 1237287 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 4.016310, cpu: 5.368148
master speed: 1244923 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 3.924667, cpu: 5.280958
master speed: 1273993 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.988666, cpu: 10.639232
master speed: 1251773 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 8.019857, cpu: 10.663752
master speed: 1246905 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 8.196429, cpu: 10.840957
master speed: 1220043 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.993553, cpu: 10.639569
master speed: 1251008 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.983247, cpu: 10.628156
master speed: 1252623 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.981670, cpu: 10.636188
master speed: 1252870 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.968451, cpu: 10.623843
master speed: 1254949 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.980432, cpu: 10.629974
master speed: 1253065 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.983253, cpu: 10.633591
master speed: 1252622 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 8.024833, cpu: 10.668663
master speed: 1246131 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 8.052429, cpu: 10.709954
master speed: 1241861 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 7.982209, cpu: 10.625852
master speed: 1252786 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 8.053599, cpu: 10.701820
master speed: 1241680 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 8.216340, cpu: 10.867200
master speed: 1217086 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 8.136962, cpu: 10.778715
master speed: 1228959 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 12.593965, cpu: 16.584331
master speed: 1191046 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.920311, cpu: 15.836402
master speed: 1258356 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.891690, cpu: 15.791418
master speed: 1261385 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.978406, cpu: 15.884661
master speed: 1252253 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 12.044989, cpu: 15.962908
master speed: 1245331 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.847263, cpu: 15.749704
master speed: 1266115 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.839738, cpu: 15.740902
master speed: 1266919 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 12.133204, cpu: 16.039724
master speed: 1236276 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.911222, cpu: 15.835867
master speed: 1259316 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 12.301178, cpu: 16.209813
master speed: 1219395 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 12.188065, cpu: 16.088337
master speed: 1230712 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.593513, cpu: 15.486125
master speed: 1293826 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 11.755976, cpu: 15.655370
master speed: 1275946 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 12.038474, cpu: 15.940606
master speed: 1246005 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 12.084654, cpu: 16.035791
master speed: 1241243 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.982102, cpu: 21.039756
master speed: 1251399 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.944010, cpu: 21.017411
master speed: 1254389 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.730944, cpu: 20.786987
master speed: 1271379 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.761880, cpu: 21.821644
master speed: 1193183 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.608073, cpu: 21.669512
master speed: 1204233 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.909022, cpu: 20.983648
master speed: 1257148 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.069270, cpu: 21.130120
master speed: 1244611 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.200727, cpu: 21.281045
master speed: 1234512 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.016578, cpu: 21.086773
master speed: 1248706 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.116791, cpu: 21.173121
master speed: 1240941 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.179631, cpu: 21.244263
master speed: 1236122 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.725964, cpu: 20.791326
master speed: 1271782 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.156782, cpu: 21.240669
master speed: 1237870 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.441910, cpu: 21.515849
master speed: 1216403 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.754389, cpu: 20.822628
master speed: 1269487 ops/sec

@igormunkin
Copy link
Author

Some stats for wall clock timings and operations per second (Apple M1 vs Apple M1 (Rosetta 2)).

1000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Apple M1 (Rosetta 2) (wall clock) Apple M1 (Rosetta 2) (ops/sec) Relation (Rosetta 2/M1)
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Run 1 0.513485 1947476 0.779232 1283314 1.517536053
Run 2 0.515587 1939536 0.803177 1245055 1.557791411
Run 3 0.514109 1945113 0.805633 1241259 1.567047066
Run 4 0.520584 1920919 0.826969 1209234 1.588540946
Run 5 0.518380 1929087 0.806673 1239659 1.556142212
Run 6 0.537575 1860205 0.812485 1230791 1.511389108
Run 7 0.530633 1884541 0.809894 1234729 1.526278991
Run 8 0.533390 1874800 0.795565 1256968 1.491525900
Run 9 0.516247 1937057 0.776764 1287392 1.504636347
Run 10 0.515243 1940832 0.793976 1259483 1.540973871
Run 11 0.517204 1933472 0.799150 1251329 1.545134995
Run 12 0.522334 1914484 0.784650 1274453 1.502199742
Run 13 0.515059 1941525 0.814270 1228093 1.580925680
Run 14 0.530446 1885205 0.810215 1234240 1.527422207
Run 15 0.523705 1909471 0.800976 1248476 1.529441193
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Med 0.518380 1929087 0.803177 1245055 1.549398125
Avg 0.521599 1917581.533 0.8013086 1248298.333 1.536254881
Min 0.513485 1860205 0.776764 1209234 1.512729681
Max 0.537575 1947476 0.826969 1287392 1.538332326
5000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Apple M1 (Rosetta 2) (wall clock) Apple M1 (Rosetta 2) (ops/sec) Relation (Rosetta 2/M1)
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Run 1 2.583679 1935224 4.001385 1249567 1.548715998
Run 2 2.565490 1948945 4.026963 1241630 1.569666224
Run 3 2.577809 1939631 4.046618 1235599 1.569789693
Run 4 2.578820 1938871 3.924158 1274158 1.521687438
Run 5 2.596891 1925379 3.993017 1252186 1.537614401
Run 6 2.612779 1913671 4.011028 1246563 1.535157776
Run 7 2.583271 1935530 4.037565 1238370 1.562966100
Run 8 2.589305 1931020 4.160194 1201866 1.606683647
Run 9 2.581282 1937022 3.978172 1256858 1.541161330
Run 10 2.583490 1935366 4.062729 1230699 1.572573921
Run 11 2.577924 1939545 3.943704 1267843 1.529798396
Run 12 2.597693 1924784 3.982676 1255437 1.533158845
Run 13 2.583340 1935478 4.041098 1237287 1.564291963
Run 14 2.570901 1944843 4.016310 1244923 1.562218849
Run 15 2.567064 1947750 3.924667 1273993 1.528854364
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Med 2.583271 1935530 4.011028 1246563 1.552693465
Avg 2.583315867 1935537.267 4.010018933 1247131.933 1.552275889
Min 2.56549 1913671 3.924158 1201866 1.529593957
Max 2.612779 1948945 4.160194 1274158 1.592248713
10000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Apple M1 (Rosetta 2) (wall clock) Apple M1 (Rosetta 2) (ops/sec) Relation (Rosetta 2/M1)
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Run 1 5.160520 1937789 7.988666 1251773 1.548035082
Run 2 5.162725 1936961 8.019857 1246905 1.553415493
Run 3 5.325083 1877905 8.196429 1220043 1.539211501
Run 4 5.163672 1936606 7.993553 1251008 1.548036552
Run 5 5.223807 1914312 7.983247 1252623 1.528243099
Run 6 5.188444 1927360 7.981670 1252870 1.538355237
Run 7 5.141926 1944796 7.968451 1254949 1.549701610
Run 8 5.146730 1942981 7.980432 1253065 1.550582992
Run 9 5.175809 1932065 7.983253 1252622 1.542416461
Run 10 5.207238 1920403 8.024833 1246131 1.541092034
Run 11 5.153160 1940556 8.052429 1241861 1.562619635
Run 12 5.167791 1935062 7.982209 1252786 1.544607551
Run 13 5.160697 1937722 8.053599 1241680 1.560564203
Run 14 5.155869 1939537 8.216340 1217086 1.593589752
Run 15 5.233821 1910649 8.136962 1228959 1.554688630
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Med 5.163672 1936606 7.993553 1251008 1.548036552
Avg 5.184486133 1928980.267 8.037462 1244290.733 1.550290963
Min 5.141926 1877905 7.968451 1217086 1.549701610
Max 5.325083 1944796 8.216340 1254949 1.542950598
15000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Apple M1 (Rosetta 2) (wall clock) Apple M1 (Rosetta 2) (ops/sec) Relation (Rosetta 2/M1)
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Run 1 7.683132 1952328 12.593965 1191046 1.639170718
Run 2 7.719851 1943042 11.920311 1258356 1.544111538
Run 3 7.717612 1943606 11.891690 1261385 1.540850978
Run 4 7.761347 1932654 11.978406 1252253 1.543341124
Run 5 7.695678 1949146 12.044989 1245331 1.565162810
Run 6 7.711488 1945149 11.847263 1266115 1.536313485
Run 7 7.698423 1948451 11.839738 1266919 1.537943290
Run 8 7.707843 1946069 12.133204 1236276 1.574137408
Run 9 7.708424 1945923 11.911222 1259316 1.545221436
Run 10 7.720346 1942918 12.301178 1219395 1.593345428
Run 11 7.694705 1949392 12.188065 1230712 1.583954810
Run 12 7.725098 1941722 11.593513 1293826 1.500759343
Run 13 7.684736 1951921 11.755976 1275946 1.529782676
Run 14 7.706184 1946488 12.038474 1246005 1.562183566
Run 15 7.735034 1939228 12.084654 1241243 1.562327199
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Med 7.708424 1945923 11.978406 1252253 1.553937095
Avg 7.711326733 1945202.467 12.00817653 1249608.267 1.557212779
Min 7.683132 1932654 11.593513 1191046 1.508956634
Max 7.761347 1952328 12.593965 1293826 1.622651970
20000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Apple M1 (Rosetta 2) (wall clock) Apple M1 (Rosetta 2) (ops/sec) Relation (Rosetta 2/M1)
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Run 1 10.454208 1913105 15.982102 1251399 1.528772146
Run 2 10.543672 1896872 15.944010 1254389 1.512187595
Run 3 10.456510 1912684 15.730944 1271379 1.504416292
Run 4 10.337435 1934715 16.761880 1193183 1.621473799
Run 5 10.367294 1929143 16.608073 1204233 1.601967977
Run 6 10.340018 1934232 15.909022 1257148 1.538587457
Run 7 10.340294 1934180 16.069270 1244611 1.554043821
Run 8 10.401648 1922772 16.200727 1234512 1.557515405
Run 9 10.364378 1929686 16.016578 1248706 1.545348693
Run 10 10.363388 1929870 16.116791 1240941 1.555166226
Run 11 10.325387 1936973 16.179631 1236122 1.566975746
Run 12 10.351826 1932026 15.725964 1271782 1.519148796
Run 13 10.452252 1913463 16.156782 1237870 1.545770423
Run 14 10.388245 1925252 16.441910 1216403 1.582741839
Run 15 10.387833 1925329 15.754389 1269487 1.516619395
-------- ----------------------- -------------------- ----------------------------------- -------------------------------- -------------------------
Med 10.367294 1929143 16.069270 1244611 1.549996556
Avg 10.39162587 1924686.8 16.1065382 1242144.333 1.549953627
Min 10.325387 1896872 15.725964 1193183 1.523038701
Max 10.543672 1936973 16.76188 1271782 1.589757345

@igormunkin
Copy link
Author

$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
$ uname -mrs
Darwin 20.6.0 x86_64
$ sw_vers
ProductName:	macOS
ProductVersion:	11.6
BuildVersion:	20G165
$ md5 relay-1mops.lua
MD5 (relay-1mops.lua) = 69e3940e8975a4e29f77ea566f25709e
$ ../src/tarantool -v
Tarantool 2.10.0-beta1-0-g7da4b1438
Target: Darwin-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=ON
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
C_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-gnu-alignof-expression
CXX_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-invalid-offsetof -Wno-gnu-alignof-expression
$ ../src/tarantool -e 'print(jit.os,jit.arch)'
OSX	x64
$ for n in 1e6 5e6 10e6 15e6 20e6; do for i in $(seq 1 15); do ../src/tarantool relay-1mops.lua $n; done; done
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.078086, cpu: 1.441896
master speed: 927569 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.116990, cpu: 1.511190
master speed: 895263 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.094748, cpu: 1.466973
master speed: 913452 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.090597, cpu: 1.458207
master speed: 916929 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.114640, cpu: 1.533273
master speed: 897150 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.095783, cpu: 1.487613
master speed: 912589 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.079496, cpu: 1.444364
master speed: 926358 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.078900, cpu: 1.447987
master speed: 926869 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.110369, cpu: 1.498742
master speed: 900601 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.081358, cpu: 1.454200
master speed: 924763 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.066245, cpu: 1.426832
master speed: 937870 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.089303, cpu: 1.470655
master speed: 918018 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.058271, cpu: 1.424584
master speed: 944937 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.072334, cpu: 1.434280
master speed: 932545 ops/sec
making 1000000 operations, 100 operations per txn using 50 fibers
master done in time: 1.075167, cpu: 1.460369
master speed: 930088 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.365338, cpu: 7.094546
master speed: 931907 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.426003, cpu: 7.160997
master speed: 921488 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.464272, cpu: 7.217848
master speed: 915034 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.291650, cpu: 7.057934
master speed: 944884 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.434663, cpu: 7.168030
master speed: 920020 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.417282, cpu: 7.156694
master speed: 922972 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.480857, cpu: 7.279844
master speed: 912266 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.324999, cpu: 7.075412
master speed: 938967 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.300625, cpu: 7.032333
master speed: 943285 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.247602, cpu: 6.972393
master speed: 952816 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.163495, cpu: 6.887207
master speed: 968336 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.213042, cpu: 6.939031
master speed: 959132 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.283318, cpu: 7.034796
master speed: 946374 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.437720, cpu: 7.203053
master speed: 919503 ops/sec
making 5000000 operations, 100 operations per txn using 50 fibers
master done in time: 5.381596, cpu: 7.174760
master speed: 929092 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.798749, cpu: 14.231064
master speed: 926033 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.828895, cpu: 14.301153
master speed: 923455 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.714711, cpu: 14.125515
master speed: 933296 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.839264, cpu: 14.289900
master speed: 922571 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.696577, cpu: 14.122867
master speed: 934878 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.736090, cpu: 14.184479
master speed: 931437 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.710851, cpu: 14.153043
master speed: 933632 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.674525, cpu: 14.081225
master speed: 936809 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.605407, cpu: 14.022934
master speed: 942915 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.738789, cpu: 14.157755
master speed: 931203 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.680092, cpu: 14.118046
master speed: 936321 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.522609, cpu: 13.900426
master speed: 950334 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.612297, cpu: 14.045949
master speed: 942303 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.664438, cpu: 14.068861
master speed: 937695 ops/sec
making 10000000 operations, 100 operations per txn using 50 fibers
master done in time: 10.863212, cpu: 14.287467
master speed: 920538 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.920179, cpu: 21.033215
master speed: 942200 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.268209, cpu: 21.380859
master speed: 922043 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.285820, cpu: 21.415234
master speed: 921046 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.945280, cpu: 21.008641
master speed: 940717 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.083569, cpu: 21.173547
master speed: 932628 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.858925, cpu: 20.930795
master speed: 945839 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.905716, cpu: 20.948465
master speed: 943057 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.710405, cpu: 20.711412
master speed: 954781 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.045040, cpu: 21.142873
master speed: 934868 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.076839, cpu: 21.168112
master speed: 933019 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 15.881122, cpu: 20.987646
master speed: 944517 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.508107, cpu: 21.709523
master speed: 908644 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.493120, cpu: 21.663989
master speed: 909470 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.134264, cpu: 21.234363
master speed: 929698 ops/sec
making 15000000 operations, 100 operations per txn using 50 fibers
master done in time: 16.024290, cpu: 21.104762
master speed: 936078 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.257546, cpu: 27.889241
master speed: 940842 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.468545, cpu: 28.161993
master speed: 931595 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.379360, cpu: 28.053694
master speed: 935481 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.822884, cpu: 28.512005
master speed: 916469 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.661464, cpu: 28.329287
master speed: 923298 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.758416, cpu: 28.425663
master speed: 919184 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.383367, cpu: 28.313236
master speed: 935306 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.398162, cpu: 28.076717
master speed: 934659 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.324088, cpu: 27.955555
master speed: 937906 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.490854, cpu: 28.206381
master speed: 930628 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.664436, cpu: 28.420061
master speed: 923171 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.447941, cpu: 28.176676
master speed: 932490 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.521186, cpu: 28.273360
master speed: 929316 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.445809, cpu: 28.118842
master speed: 932583 ops/sec
making 20000000 operations, 100 operations per txn using 50 fibers
master done in time: 21.638631, cpu: 28.366392
master speed: 924272 ops/sec

@igormunkin
Copy link
Author

Some stats for wall clock timings and operations per second (Apple M1 vs Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz).

1000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (wall clock) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (ops/sec) Relation (i5-1038NG7/M1)
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Run 1 0.513485 1947476 1.078086 927569 2.099547212
Run 2 0.515587 1939536 1.11699 895263 2.166443297
Run 3 0.514109 1945113 1.094748 913452 2.129408355
Run 4 0.520584 1920919 1.090597 916929 2.094949134
Run 5 0.518380 1929087 1.11464 897150 2.150237278
Run 6 0.537575 1860205 1.095783 912589 2.038381621
Run 7 0.530633 1884541 1.079496 926358 2.034355195
Run 8 0.533390 1874800 1.0789 926869 2.022722586
Run 9 0.516247 1937057 1.110369 900601 2.150848334
Run 10 0.515243 1940832 1.081358 924763 2.098733995
Run 11 0.517204 1933472 1.066245 937870 2.061555982
Run 12 0.522334 1914484 1.089303 918018 2.085452986
Run 13 0.515059 1941525 1.058271 944937 2.054659757
Run 14 0.530446 1885205 1.072334 932545 2.021570527
Run 15 0.523705 1909471 1.075167 930088 2.053001213
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Med 0.518380 1929087 1.081358 924763 2.086033412
Avg 0.521599 1917581.533 1.086819133 920333.4 2.083630699
Min 0.513485 1860205 1.058271 895263 2.060957964
Max 0.537575 1947476 1.11699 944937 2.077831
5000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (wall clock) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (ops/sec) Relation (i5-1038NG7/M1)
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Run 1 2.583679 1935224 5.365338 931907 2.076627166
Run 2 2.565490 1948945 5.426003 921488 2.114996745
Run 3 2.577809 1939631 5.464272 915034 2.119735015
Run 4 2.578820 1938871 5.29165 944884 2.051965628
Run 5 2.596891 1925379 5.434663 920020 2.092757455
Run 6 2.612779 1913671 5.417282 922972 2.073379341
Run 7 2.583271 1935530 5.480857 912266 2.121673258
Run 8 2.589305 1931020 5.324999 938967 2.05653602
Run 9 2.581282 1937022 5.300625 943285 2.053485439
Run 10 2.583490 1935366 5.247602 952816 2.031206624
Run 11 2.577924 1939545 5.163495 968336 2.00296634
Run 12 2.597693 1924784 5.213042 959132 2.0067968
Run 13 2.583340 1935478 5.283318 946374 2.045150077
Run 14 2.570901 1944843 5.43772 919503 2.115102837
Run 15 2.567064 1947750 5.381596 929092 2.09640118
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Med 2.583271 1935530 5.365338 931907 2.076955147
Avg 2.583315867 1935537.267 5.3488308 935071.7333 2.070529148
Min 2.56549 1913671 5.163495 912266 2.012673992
Max 2.612779 1948945 5.480857 968336 2.09771167
10000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (wall clock) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (ops/sec) Relation (i5-1038NG7/M1)
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Run 1 5.160520 1937789 10.798749 926033 2.092569935
Run 2 5.162725 1936961 10.828895 923455 2.097515363
Run 3 5.325083 1877905 10.714711 933296 2.012120938
Run 4 5.163672 1936606 10.839264 922571 2.099138752
Run 5 5.223807 1914312 10.696577 934878 2.047659303
Run 6 5.188444 1927360 10.73609 931437 2.069231161
Run 7 5.141926 1944796 10.710851 933632 2.083042619
Run 8 5.146730 1942981 10.674525 936809 2.074040216
Run 9 5.175809 1932065 10.605407 942915 2.049033687
Run 10 5.207238 1920403 10.738789 931203 2.062281194
Run 11 5.153160 1940556 10.680092 936321 2.072532582
Run 12 5.167791 1935062 10.522609 950334 2.036190899
Run 13 5.160697 1937722 10.612297 942303 2.056368936
Run 14 5.155869 1939537 10.664438 937695 2.068407479
Run 15 5.233821 1910649 10.863212 920538 2.075579581
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Med 5.163672 1936606 10.710851 933632 2.074270209
Avg 5.184486133 1928980.267 10.71243373 933561.3333 2.066247928
Min 5.141926 1877905 10.522609 920538 2.046433379
Max 5.325083 1944796 10.863212 950334 2.040008015
15000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (wall clock) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (ops/sec) Relation (i5-1038NG7/M1)
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Run 1 7.683132 1952328 15.920179 942200 2.072094948
Run 2 7.719851 1943042 16.268209 922043 2.107321631
Run 3 7.717612 1943606 16.28582 921046 2.110214921
Run 4 7.761347 1932654 15.94528 940717 2.054447508
Run 5 7.695678 1949146 16.083569 932628 2.08994828
Run 6 7.711488 1945149 15.858925 945839 2.05653241
Run 7 7.698423 1948451 15.905716 943057 2.066100551
Run 8 7.707843 1946069 15.710405 954781 2.038236248
Run 9 7.708424 1945923 16.04504 934868 2.08149422
Run 10 7.720346 1942918 16.076839 933019 2.082398768
Run 11 7.694705 1949392 15.881122 944517 2.063902645
Run 12 7.725098 1941722 16.508107 908644 2.13694467
Run 13 7.684736 1951921 16.49312 909470 2.146218165
Run 14 7.706184 1946488 16.134264 929698 2.093677493
Run 15 7.735034 1939228 16.02429 936078 2.071650881
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Med 7.708424 1945923 16.04504 934868 2.08149422
Avg 7.711326733 1945202.467 16.076059 933240.3333 2.084733219
Min 7.683132 1932654 15.710405 908644 2.044791759
Max 7.761347 1952328 16.508107 954781 2.126964173
20000000 replaces
Apple M1 (wall clock) Apple M1 (ops/sec) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (wall clock) Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (ops/sec) Relation (i5-1038NG7/M1)
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Run 1 10.454208 1913105 21.257546 940842 2.033396121
Run 2 10.543672 1896872 21.468545 931595 2.036154482
Run 3 10.456510 1912684 21.37936 935481 2.044598054
Run 4 10.337435 1934715 21.822884 916469 2.111054048
Run 5 10.367294 1929143 21.661464 923298 2.08940385
Run 6 10.340018 1934232 21.758416 919184 2.104291888
Run 7 10.340294 1934180 21.383367 935306 2.067965089
Run 8 10.401648 1922772 21.398162 934659 2.057189591
Run 9 10.364378 1929686 21.324088 937906 2.057440205
Run 10 10.363388 1929870 21.490854 930628 2.073728591
Run 11 10.325387 1936973 21.664436 923171 2.098171817
Run 12 10.351826 1932026 21.447941 932490 2.071899296
Run 13 10.452252 1913463 21.521186 929316 2.058999917
Run 14 10.388245 1925252 21.445809 932583 2.064430421
Run 15 10.387833 1925329 21.638631 924272 2.083074593
-------- ----------------------- -------------------- --------------------------------------------------------- ------------------------------------------------------ --------------------------
Med 10.367294 1929143 21.468545 931595 2.070795426
Avg 10.39162587 1924686.8 21.51084593 929813.3333 2.070017359
Min 10.325387 1896872 21.257546 916469 2.058765061
Max 10.543672 1936973 21.822884 940842 2.069761275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment