Skip to content

System parameters

View as Markdown

System parameters control how the CoraDB server, the broker and the client tools behave: memory sizes, ports, logging, locking and SQL compatibility options. This page explains where the parameters are set and how to change them, and lists every database server parameter with a link to its description.

The parameters are described in detail on these pages:

CoraDB reads its configuration from files in the $CORADB/conf directory:

File Used by
coradb.conf The database server, and the client programs (CAS, corasql and the coradb utilities)
coradb_broker.conf The brokers. See Broker parameters.
cm.conf CoraDB Manager Server (CMS)

coradb.conf is divided into sections: [common] applies to every database, [@dbname] to one database, [standalone] to utilities run in stand-alone mode, and [service] lists the processes that coradb service start launches. See Sections of coradb.conf.

The database server has a client/server architecture. The server process (cora_server) manages storage, concurrency and transactions; the client side (the broker's CAS processes, corasql and the coradb utilities in client/server mode) parses and prepares queries. Each parameter in coradb.conf applies to one side or both:

  • A server parameter is read by the cora_server process.
  • A client parameter is read by CAS, corasql and the coradb utilities.
  • A client/server parameter is read by both.

Some parameters can be changed while the database is running (Dynamic in the reference tables below). What a change affects depends on the kind of parameter:

  • A dynamic server parameter changes for the whole server, until the server restarts.
  • A dynamic session parameter changes only for the session (application connection) that changed it. For example, after a session sets block_ddl_statement=yes, only that session is refused DDL statements.
  • A dynamic client/server parameter that is not a session parameter changes on the server and in the client that changed it, but not in other clients. For example, if one corasql session changes error_log_level from ERROR to WARNING, the server and that corasql session use WARNING; other clients keep ERROR.

A DBA can change any dynamic parameter. Other users can change only session parameters.

Edit coradb.conf in $CORADB/conf and restart the server. These rules apply:

  • Parameter names are not case-sensitive.
  • The name and value of a parameter must be on the same line, separated by an equal sign (=). Spaces around the equal sign are allowed.
  • String values are written without quotes, unless they contain spaces.
  • Size parameters accept the units B, K, M, G and T (for example data_buffer_size=512M); time parameters accept ms, s, min and h. Without a unit, sizes are in bytes and times in the unit given in the parameter's description.

The SET SYSTEM PARAMETERS statement changes one or more dynamic parameters. Separate several assignments with semicolons; the value DEFAULT restores the default value (except for call_stack_dump_activation_list).

SET SYSTEM PARAMETERS 'cte_max_recursions=100; lock_timeout=10';
SET SYSTEM PARAMETERS 'lock_timeout=DEFAULT';

In the corasql interpreter, the ;set session command (abbreviated ;se) changes a parameter for the current session:

corasql> ;se block_ddl_statement=1
=== Set Param Input ===
block_ddl_statement=1

In the tables below, Applied to tells which processes read the parameter (client: CAS, CSQL and the coradb utilities in client/server mode; server: the database server process; client/server: both). Session marks session parameters, and Dynamic marks parameters that can be changed while the database is running.

Described in Connection-related parameters.

Parameter Applied to Session Type Default Dynamic
coradb_port_id client int 1,523
check_peer_alive client/server yes string both yes
db_hosts client yes string NULL yes
max_clients server int 100
tcp_keepalive client/server bool yes

Described in Memory-related parameters.

Parameter Applied to Session Type Default Dynamic
data_buffer_size server byte 32,768 × db_page_size
index_scan_oid_buffer_size server byte 4 × db_page_size
max_agg_hash_size server byte 2,097,152(2M)
max_hash_list_scan_size server byte 134,217,728 (128M)
sort_buffer_size server byte 128 × db_page_size
temp_file_memory_size_in_pages server int 4
thread_stacksize server byte 1,048,576

Described in Disk-related parameters.

Parameter Applied to Session Type Default Dynamic
db_volume_size server byte 512M
dont_reuse_heap_file server bool no
log_volume_size server byte 512M
temp_file_max_size_in_pages server int -1
temp_volume_path server string NULL
unfill_factor server float 0.1
volume_extension_path server string NULL
double_write_buffer_size server byte 2M
data_file_os_advise server int 0
max_values_unpaged_list client/server yes int 2,048 yes
ro_data_buffer_size server byte 512M
ro_data_buffer_pages server int 32,768

Described in Error message-related parameters.

Parameter Applied to Session Type Default Dynamic
call_stack_dump_activation_list client/server string DEFAULT
call_stack_dump_deactivation_list client/server string NULL
call_stack_dump_on_error client/server bool no
error_log client/server string cora_client.err, cora_server.err
error_log_level client/server string NOTIFICATION
error_log_warning client/server bool no
error_log_size client/server int 512M

Described in Concurrency/lock-related parameters.

Parameter Applied to Session Type Default Dynamic
deadlock_detection_interval_in_secs server float 1.0
isolation_level client yes int 4 yes
lock_escalation server int 100,000
lock_timeout client yes msec -1 yes
rollback_on_lock_escalation server bool no

Described in Logging-related parameters.

Parameter Applied to Session Type Default Dynamic
adaptive_flush_control server bool yes
background_archiving server bool yes
checkpoint_every_size server byte 100,000 × log_page_size
checkpoint_interval server msec 6min
checkpoint_sleep_msecs server msec 1
force_remove_log_archives server bool yes
log_buffer_size server byte 16k × log_page_size
log_max_archives server int INT_MAX
log_trace_flush_time server msec 0
max_flush_size_per_second server byte 10,000 × db_page_size
remove_log_archive_interval_in_secs server sec 0
sync_on_flush_size server byte 200 × db_page_size
ddl_audit_log client bool no
ddl_audit_log_size client byte 10M

Described in Transaction processing-related parameters.

Parameter Applied to Session Type Default Dynamic
async_commit server bool no
group_commit_interval_in_msecs server msec 0

Described in Statement/type-related parameters.

Parameter Applied to Session Type Default Dynamic
add_column_update_hard_default client/server yes bool no yes
alter_table_change_type_strict client/server yes bool yes yes
allow_truncated_string client/server yes bool no yes
ansi_quotes client bool yes
block_ddl_statement client yes bool no yes
block_nowhere_statement client yes bool no yes
compat_numeric_division_scale client/server yes bool no yes
create_table_reuseoid client yes bool yes yes
cte_max_recursions client/server yes int 2000 yes
default_week_format client/server yes int 0 yes
group_concat_max_len server yes byte 1,024
intl_check_input_string client yes bool no yes
intl_collation client yes string yes
intl_date_lang client yes string yes
intl_number_lang client yes string yes
json_max_array_idx server yes string 65,536 yes
no_backslash_escapes client bool yes
only_full_group_by client yes bool no yes
oracle_style_empty_string client bool no
pipes_as_concat client bool yes
plus_as_concat client bool yes
require_like_escape_character client bool no
return_null_on_function_errors client/server yes bool no yes
string_max_size_bytes client/server yes byte 1,048,576 yes
unicode_input_normalization client yes bool no yes
unicode_output_normalization client yes bool no yes
update_use_attribute_references client yes bool no yes

Described in Thread-related parameters.

Parameter Applied to Session Type Default Dynamic
thread_connection_pooling server bool yes
thread_connection_timeout_seconds server int 300
thread_worker_pooling server bool yes
thread_worker_timeout_seconds server int 300
loaddb_worker_count server int 8

Described in Timezone parameter.

Parameter Applied to Session Type Default Dynamic
server_timezone server string OS timezone yes
timezone client/server yes string The value of server_timezone yes
tz_leap_second_support server bool no yes

Described in Query plan cache-related parameters.

Parameter Applied to Session Type Default Dynamic
max_plan_cache_entries client/server int 1,000
max_filter_pred_cache_entries client/server int 1,000

Described in Query cache-related parameters.

Parameter Applied to Session Type Default Dynamic
max_query_cache_entries server int 0 yes
query_cache_size_in_pages server int 0 yes

Described in Utility-related parameters.

Parameter Applied to Session Type Default Dynamic
backup_volume_max_size_bytes server byte 0
communication_histogram client yes bool no yes
compactdb_page_reclaim_only server int 0
corasql_history_num client yes int 50 yes

Described in Other parameters.

Parameter Applied to Session Type Default Dynamic
access_ip_control server bool no
access_ip_control_file server string
agg_hash_respect_order client yes bool yes yes
auto_restart_server server yes bool yes
enable_string_compression client/server bool yes
index_scan_in_oid_order client yes bool no yes
index_unfill_factor server float 0.05
java_stored_procedure server bool no
java_stored_procedure_port server int 0
java_stored_procedure_jvm_options server string
multi_range_optimization_limit server yes int 100
optimizer_enable_merge_join client yes bool no yes
use_stat_estimation server bool no
pthread_scope_process server bool yes
server server string
service server string
session_state_timeout server sec 21,600
sort_limit_max_count client yes int 0 yes
sql_trace_slow server yes msec -1
sql_trace_execution_plan server yes bool no
use_orderby_sort_limit server yes bool yes
data_buffer_neighbor_flush_pages server int 8
data_buffer_neighbor_flush_nondirty server bool no
tde_keys_file_path server string NULL
tde_default_algorithm server string AES

Described in Graph-related parameters.

Parameter Applied to Session Type Default Dynamic
graph_query_rewrite_mode client yes bool no yes
graph_query_filter_mode client/server yes string NULL yes
concurrent_map_erase_threshold server float 0.7
graph_insert_dml_logging server bool no
graph_deferred_load_threads server int 0 yes
graph_edges_container_buckets_count server int 1,009 yes
graph_vertices_container_buckets_count server int 1,009 yes
graph_use_dagger server bool yes yes

  • log_page_size: A log volume page size specified by --log-page-size option when you are creating database. Default: 16KB. log page related parameter's value is rounded off by page unit. For example, the value of checkpoint_every_size is divided by 16KB and its decimal point is dropped, then it is multiplied by 16KB.

  • db_page_size: A DB volume page size specified by --db-page-size option when you are creating database. Default: 16KB. DB page related parameter's value is rounded off by page unit. For example, the value of data_buffer_size is divided by 16KB and its decimal point is dropped, then it is multiplied by 16KB.

Parameters specified in coradb.conf have the following four sections:

  • Used when the CoraDB service starts: [service] section
  • Applied commonly to all databases: [common] section
  • Applied individually to each database: [@<database>] section
  • Used only when the coradb utilities are run with stand-alone mode(--SA-mode): [standalone] section

Where <database> is the name of the database to which each parameter applies. If a parameter configured in [common] is the same as the one configured in [@<database>], the one configured in [@<database>] is applied.

.....
[common]
.....
sort_buffer_size=2M
.....
[standalone]
sort_buffer_size=256M
.....

Configuration defined in [standalone] is used only when coradb utilities started with "coradb" are run with stand-alone mode. For example, on the above configuration, if DB is started with --CS-mode(default)(coradb databases start db_name), "sort_buffer_size=2M" is applied. However, if DB is stopped and "coradb loaddb --SA-mode" is executed, "sort_buffer_size=256M" is applied. If you run "coradb loaddb --SA-mode", bigger size of sort buffer will be required during index creation; therefore, increasing sort buffer size will be better for the performance of "loaddb" execution.

The coradb.conf file installed with CoraDB sets the most important parameters. Any parameter not listed here takes its default value; to change it, add it to the file. Without the license header, the file looks like this:

# Service section - a section for 'coradb service' command
[service]
# The list of processes to be started automatically by 'coradb service start' command
service=server,broker,manager
# The list of database servers in all by 'coradb service start' command.
# This property is effective only when the above 'service' property contains 'server' keyword.
#server=foo,bar
# Common section - properties for all databases
# This section will be applied before other database specific sections.
[common]
# Size of data buffer are using K, M, G, T unit
data_buffer_size=512M
# Size of data buffer are using K, M, G, T unit
ro_data_buffer_size=512M
# Size of log buffer are using K, M, G, T unit
log_buffer_size=256M
# Size of sort buffer are using K, M, G, T unit
# The sort buffer should be allocated per thread.
# So, the max size of the sort buffer is sort_buffer_size * max_clients.
sort_buffer_size=2M
# The maximum number of concurrent client connections the server will accept.
# This value also means the total # of concurrent transactions.
max_clients=100
# TCP port id for the CORADB programs (used by all clients).
coradb_port_id=1523
# The createdb and addvoldb create a volume file of 'db_volume_size' size
# if don't have any options about size.
db_volume_size=512M
# The createdb creates a log volume file of 'log_volume_size' size
# if don't have any options about size.
log_volume_size=512M
# The log_max_archives parameter configures the maximum number of archive log files kept.
log_max_archives=0

To give one database its own values, add a section named after it. Here testdb gets a smaller data buffer and fewer clients than the other databases:

[common]
data_buffer_size=512M
max_clients=100
[@testdb]
data_buffer_size=128M
max_clients=10

The broker reads its own file, coradb_broker.conf. Its parameters are listed in Broker parameters.