Skip to main content

mserver5 man-page

NAME

mserver5 − the MonetDB server version 5

SYNOPSIS

mserver5 [ options ]

DESCRIPTION

Mserver5 is the current MonetDB server that performs all processing on request of clients for a certain database.

Note that while mserver5 is the process that does the actual work, it is usually more common to start, monitor and connect to the mserver5 process through monetdbd(1).

This man-page describes the options that mserver5 understands. It is intended for people who really need to work with mserver5 itself. In regular cases, the programs monetdbd(1) and monetdb(1) control the many options, and allow to adjust them to appropriate values where sensible. For normal usage, it is preferred to apply any configuration through these programs.

OPERATION

When the build-time configuration did not disable this, a mserver5 process presents the user with a console prompt. On this prompt, MAL commands can be executed. The architecture is setup to handle multiple streams of requests. The first thread started represents the server, which is the console prompt, reading from standard input and writing to standard output.

The server thread started remains in existence until all other threads die. The server is stopped by Ctrl-D on its console, typing quit() or by sending it a termination signal (SIGINT, SIGTERM, SIGQUIT).

MSERVER5 OPTIONS

Mserver5 can be started with options and scripts as arguments. The MAL scripts will be executed directly after startup on the console, which eases e.g. testing of MAL scripts directly, without starting a client.
−−dbpath=
path

Path where mserver5 should find a database. Shorthand for option gdk_dbpath. Default value: ${prefix}/var/monetdb5/dbfarm/demo.

−−dbextra=path

Path where mserver5 should store transient data. Default value is the value of the −−dbpath option.

−−config=file

Config file to read options from. This file can contain all options as can be set with the --set flag. See CONFIG FILE FORMAT.

−−daemon=yes
−−daemon=no

Disable the console prompt, do not read commands from standard input. Default: no.

−−set option=value

Set individual configuration option. For possible options, see PARAMETERS sections.

−−help

Print list of options.

−−version

Print version and compile configuration.

−−trace

Print information about MAL instructions as they are executed.

−−verbose[=value]
−v
[value]

Set or increase verbosity level. If no value is specified, the verbosity level is increased by 1. If a value is specified, the verbosity level is set to the given value.

−−debug[=value]
−d
[value]

Set debug level. This is mostly for debugging purposes. The value is an integer, which can be (a bit-wise OR of):
1
= THRDMASK = thread-specific debug output
2
= CHECKMASK = property enforcing on new BATs
4
= MEMMASK = memory allocation
8
= PROPMASK = property checking on all values:
tells about wrongly set properties

16
= IOMASK = major IO activity
32
= BATMASK = BAT handling
128
= PARMASK = Thread management
512
= TMMASK = Transaction management
1024
= TEMMASK = Locks and Triggers
4096
= PERFMASK = BBP Performance (?)
8192
= DELTAMASK = Delta debugging (?)
16384
= LOADMASK = Module loading
2097152
= ALGOMASK = show join/select algorithm chosen
4194304
= ESTIMASK = show result size estimations
(for join, select)

16777216
= NOSYNCMASK = disable forcefully synchronizing files
to disk. If this flag is set, there is
no guarantee that the database remains
consistent after a crash. DO NOT USE
(unless you really don’t care about your
data).

33554432
= DEADBEEFMASK = disable "cleaning" of freed memory
in GDKfree() (e.g., for performance
measurements)

67108864
= ALLOCMASK = exhaustive GDK malloc & free tracing
for debugging (GDK developers, only)

134217728
= OPTMASK = trace the actions, decisions and
effects of MAL optimizers

268435456
= HEAPMASK = trace/debug HEAPextend;
used only for development & debugging

536870912
= FORCEMITOMASK = forcefully activate mitosis even on
small tables, i.e., split small tables
in as many (tiny) pieces as there are
cores (threads) available;
this allows us to test mitosis
functionality without requiring large
data sets (— at the expense of a
potentially significant interpretation
overhead for unnecessarily large plans);
used only for development & testing;
set automatically by Mtest.py

The value together with the = sign is optional. If not specified, it defaults to 1. In the short form −d, the value, if present, must immediately (i.e. without space) follow the option. The values of multiple instances of this flag are OR-ed together.

−−threads

Equivalent to −−debug=(THRDMASK | PARMASK).

−−memory

Equivalent to −−debug=(MEMMASK | ALLOCMASK).

−−properties

Equivalent to −−debug=(CHECKMASK | PROPMASK | BATMASK).

−−io

Equivalent to −−debug=(IOMASK | PERFMASK).

−−heaps

Equivalent to −−debug=(HEAPMASK).

−−transactions

Equivalent to −−debug=(TMMASK | DELTAMASK | TEMMASK).

−−modules

Equivalent to −−debug=(LOADMASK).

−−algorithms

Equivalent to −−debug=(ALGOMASK | ESTIMASK).

−−performance

Equivalent to −−debug=(DEADBEEFMASK).

−−optimizers

Equivalent to −−debug=(OPTMASK).

−−forcemito

Equivalent to −−debug=(FORCEMITOMASK | NOSYNCMASK).

MSERVER5 PARAMETERS

Mserver5 instructs the GDK kernel through the MAL (MonetDB Assembler Language) language. MonetDB 5 contains an extensive optimiser framework to transform MAL plans into more optimal or functional (e.g. distributed) plans. These parameters control behaviour on the MAL level.
monet_vault_key

The authorisation tables inside mserver5 can be encrypted with a key, such that reading the BATs does not directly disclose any credentials. The monet_vault_key setting points to a file that stores a secret key to unlock the password vault. It can contain anything. The file is read up to the first null-byte (’ ’), hence it can be padded to any length with trailing null-bytes to obfuscate the key length. Generating a key can be done for example by using a tool such as pwgen and adding a few of the passwords generated. Make sure not to choose a too small key. Note that on absence of a vault key file, some default key is used to encrypt the authorisation tables. Changing this setting (effectively changing the key) for an existing database makes that database unusable as noone is any longer able to login. If you use monetdbd(1), a per-database vault key is set.

max_clients

Controls how many client slots are allocated for clients to connect. This settings limits the maximum number of connected clients at the same time. Note that MonetDB is not designed to handle massive amounts of connected clients. The funnel capability from monetdbd(1) might be a more suitable solution for such workloads.

Default 64.

SQL PARAMETERS

The SQL component of MonetDB 5 runs on top of the MAL environment. It has its own SQL-level specific settings.
sql_debug

Enable debugging using a mask. This option should normally be disabled (0). Default: 0.

sql_optimizer

The default SQL optimizer pipeline can be set per server. See the optpipe setting in monetdb(1) when using monetdbd. During SQL initialization, the optimizer pipeline is checked against the dependency information maintained in the optimizer library to ensure there are no conflicts and at least the pre-requisite optimizers are used. The setting of sql_optimizer can be either the list of optimizers to run. Default: default_pipe.
The following are possible pipes to use:
minimal_pipe

The minimal pipeline necessary by the server to operate correctly. minimal_pipe=inline,remap,deadcode,multiplex,generator,profiler,candidates,garbageCollector

default_pipe

The default pipeline contains the mitosis-mergetable-reorder optimizers, aimed at large tables and improved access locality. default_pipe=inline,remap,costModel,coercions,aliases,evaluate,emptybind,pushselect,aliases,mitosis,mergetable,deadcode,aliases,constants,commonTerms,projectionpath,deadcode,reorder,matpack,dataflow,querylog,multiplex,generator,profiler,candidates,postfix,deadcode,wlc,garbageCollector

no_mitosis_pipe

The no_mitosis pipeline is identical to the default pipeline, except that optimizer mitosis is omitted. It is used mainly to make some tests work deterministically, and to check/debug whether "unexpected" problems are related to mitosis (and/or mergetable). no_mitosis_pipe=inline,remap,costModel,coercions,aliases,evaluate,emptybind,pushselect,aliases,mergetable,deadcode,aliases,constants,commonTerms,projectionpath,deadcode,reorder,matpack,dataflow,querylog,multiplex,generator,profiler,candidates,postfix,deadcode,wlc,garbageCollector

sequential_pipe

The sequential pipeline is identical to the default pipeline, except that optimizers mitosis & dataflow are omitted. It is use mainly to make some tests work deterministically, i.e., avoid ambigious output, by avoiding parallelism. sequential_pipe=inline,remap,costModel,coercions,aliases,evaluate,emptybind,pushselect,aliases,mergetable,deadcode,aliases,constants,commonTerms,projectionpath,deadcode,reorder,matpack,querylog,multiplex,generator,profiler,candidates,postfix,deadcode,wlc,garbageCollector

embedded_py

Enable embedded Python. This means Python code can be called from SQL. The value is true or 2 for embedded Python 2, or 3 for embedded Python 3. Note that by enabling embedded Python, users of the server are allowed to execute arbitrary Python code, and are therefore able to read and modify all data that the server process has access to. Also note that it is not possible to enable both Python 2 and 3 at the same time.

embedded_r=true

Enable embedded R. This means R code can be called from SQL. Note that by enabling embedded R, users of the server are allowed to execute arbitrary R code, and are therefore able to read and modify all data that the server process has access to.

embedded_c=true

Enable embedded C. This means C code can be called from SQL. The C code will first be compiled and then executed. This means a C compiler must be available. Note also that by enabling embedded C, users of the server are allowed to execute arbitrary C code, and are therefore able to read and modify all data that the server process has access to. In addition, if the C code causes a crash, all bets are off.

CONFIG FILE FORMAT

The configuration file readable by mserver5 consists of parameters of the form "name=value". The file is line-based, each newline-terminated line represents either a comment or a parameter. Only the first equals sign in a parameter is significant. Whitespace before or after the first equals sign is not stripped. Trailing whitespace in a parameter value is retained verbatim. Any line beginning with a hash (#) is ignored, as are lines containing only whitespace. The values following the equals sign in parameters are all a string where quotes are not needed, and if written be part of the string.

SEE ALSO

monetdbd(1), monetdb(1), mclient(1)