10000 perf: update 1mops to support memcs by mkostoevr · Pull Request #11293 · tarantool/tarantool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

perf: update 1mops to support memcs #11293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mkostoevr
Copy link
Contributor

Now it takes a new `columns' parameter describing the amount of fields in replaced tuples (the default is 1 so the behavior is not changed).

NO_DOC=pref test
NO_TEST=perf test
NO_CHANGELOG=perf test

@mkostoevr mkostoevr requested review from ligurio and sergos March 24, 2025 13:25
@mkostoevr mkostoevr assigned ligurio, sergos and mkostoevr and unassigned ligurio and sergos Mar 24, 2025
@mkostoevr mkostoevr force-pushed the m.kostoev/1mops-memcs branch from 80225ef to cae7202 Compare March 24, 2025 13:46
@coveralls
Copy link
coveralls commented Mar 24, 2025

Coverage Status

coverage: 87.444% (-0.02%) from 87.463%
when pulling bd11fae on mkostoevr:m.kostoev/1mops-memcs
into 9942499
on tarantool:master
.

@mkostoevr mkostoevr force-pushed the m.kostoev/1mops-memcs branch 2 times, most recently from 8a2f2d8 to 1e03950 Compare March 27, 2025 12:25
Now it takes a new `columns' parameter describing the amount of fields
in replaced tuples (the default is 1 so the behavior is not changed).

NO_DOC=pref test
NO_TEST=perf test
NO_CHANGELOG=perf test
@mkostoevr mkostoevr force-pushed the m.kostoev/1mops-memcs branch from 1e03950 to 82658f5 Compare March 27, 2025 12:26
@mkostoevr mkostoevr assigned ligurio and sergos and unassigned mkostoevr Mar 27, 2025
The new fiber creates raw tuples without need to convert lua objects
to MessagePack. The option increases the test accuracy, so let's make
it use the new fiber by default (if the module is available).

NO_DOC=perf test
NO_TEST=perf test
NO_CHANGELOG=perf test
@mkostoevr mkostoevr force-pushed the m.kostoev/1mops-memcs branch from 82658f5 to bd11fae Compare March 27, 2025 12:51
Copy link
Member
@ligurio ligurio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magomed, thanks for the patches! Please see my comments.

@@ -10,6 +10,7 @@ local fiber = require('fiber')
local math = require('math')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in commit " perf: update the 1mops_write test to support memcs": s/pref/perf/

@@ -247,17 +263,28 @@ if (res ~= true) then
json.encode(index_config) .. ' :' .. json.encode(err))
end

-- Preallocate the test tuple
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous comments started from lowercase letter

}

static int
fiber_lua_func(struct lua_State *L)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems function has nothing common with fibers, I would rename it.

local MODULEPATH = fio.pathjoin(BUILDDIR, 'perf', 'lua',
'?.' .. tarantool.build.mod_format)
package.cpath = MODULEPATH .. ';' .. package.cpath
local module_is_available, module = pcall(require, '1mops_write_module')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/module_is_available/1mops_write_module/
s/module/1mops_write_module/

and probably it is better to rename 1mops_write_module to something that will reflect specific of this module. may be column_write_module?

@@ -0,0 +1,173 @@
#include <lua.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused how many low-level memcs modules we already have:

perf/lua/1mops_write_module.c
perf/lua/column_insert_module.c
perf/lua/column_scan_module.c

Do you ever plan to introduce a Lua API to memcs?

}

LUA_API int
luaopen_1mops_write_module(struct lua_State *L)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to ensure that 1mops_write_module.c uses memcs API in the same way as TCS. Should we involve someone from TCS team to review?

}

static bool
create_base_tuples(uint32_t num_columns)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused that we test engine by a limit number of datatypes. Should we parametrize a test (or probably add another one) that will test memcs by different datatypes (standard msgpack types and our extensions 1).

Footnotes

  1. https://www.tarantool.io/en/doc/latest/reference/internals/msgpack_extensions/

@@ -10,6 +10,7 @@ local fiber = require('fiber')
local math = require('math')
local json = require('json')
local fio = require('fio')
local tarantool = require('tarantool')

-- XXX: This benchmark should be able to work standalone without
-- any provided libraries or set LUA_PATH. Add stubs for that
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in commit "perf: update the 1mops_write test to support memcs": s/pref/perf/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4B3B
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0