← Back to team overview

maria-developers team mailing list archive

Re: GSoC NUMA support Project


On 29/05/17 06:03, Sumit Lakra wrote:
> I think I am near done with dividing the buffer pool into the number of
> nodes available in a NUMA machine. There is one thing left to do - to
> check for the presence of 'libnuma' library in the server.

Based on https://jira.mariadb.org/browse/MDEV-12924 I probably broke it
in ab0e5031e41d0aa72dd77a6dced9eacc8be5c548

> As of now I
> have explicitly defined HAVE_LIBNUMA in the > CMakeList.txt to check my code.

CMakeList.txt in which directory?

I'd suggest refering to publicly pushed code/branches for review.
A branch on https://github.com/theGodlessLakra/server would be good.

> Also, to test whether the control of execution reaches within a function
> A, I tried to print out a message on the scree like 'fprintf(stderr, In
> function A);' This seems to work in main(), my_init(), sys_var_init()
> etc, but not in buf0buf.cc. The function which creates the buffer pool
> is called by 'buf_pool_init()', which is called by
> 'innobase_start_on_create_for_mysql()', which in turn is called by
> 'innobase_init()', but I couldn't find where an d how is this function
> called.

Its called by function pointer -> see maria_declare_plugin in
storage/innobase/handler/ha_innodb.cc which is called by the plugin
initialization code.

> Seems like the output to bot stdout and stderr is being
> redirected somewhere and I can't find where (in code).

reopen_fstreams in sql/{mysqld,log}.cc

> Having this printing stuff is a quick way of testing the flow of control
> and although my code is working,

You can also run mysqld in gdb and the use "break" to set a breakpoint
at a function/file:line and step through form there.

> I would like to know about this
> redirections if someone can tell me.

add --verbose to the mysqld argument.

> Also, which part of code calls the 'innobase_init()' function ?

sql/plugin.cc:plugin_initialize in the call to plugin->init()

> I have attached a screenshot of the server running on my NUMA emulated
> pc with and without --numa-interleave=all. [ PID - 21016 without NUMA,
> PID - 21058 with NUMA]
> At present it just ALLOCATES a buffer pool instance on each numa node.
> Need to work on specific node binding and stuff.