Home / Documentation / FAQ / Support / Download Database Configuration Reference

### Database Configuration Reference Index

> 1. Configuration Reference Introduction
> 2. General Features Settings
> 3. File System Settings
> 4. Log Settings
> 5. Network Configuration Settings
> 6. Performance/Cache Settings

1. Configuration Reference Introduction

> This section is a reference for the configuration properties that are available for use. These properties can be set in a database configuration file or, if you are using the Control API, through the `com.mckoi.database.control.DefaultDBConfig` class.

2. General Features Settings

> The following configuration properties are for changing general database features.

> - read_only - This property may be either enabled or disabled and is disabled by default. When the read_only property is enabled, modifications to the database are not permitted. This property is useful for enforcing a read only policy or if the database is stored on a read only media such as a CD-ROM.

> - ignore_case_for_identifiers - This property may be either enabled or disabled and is disabled by default. When the ignore_case_for_identifiers property is enabled, the engine ignores the case of SQL identifiers. For example, the query `SELECT A_COLUMN FROM A_TABLE` becomes equivalent to the query `SELECT a_column FROM a_table`.

> - transaction_error_on_dirty_select - This property may be either enabled or disabled and is enabled by default. See the section on Transaction conflicts (Transactions.html#3) for further details.

3. File System Settings

> The following configuration properties change how Mckoi interacts with the file system and how Mckoi persists the contents of the database.

> - root_path - This property can be set to either `jvm` or `configuration` and defaults to `jvm`. When this property is set to `jvm` the location of the database files are found relative to the current JVM root directory. The JVM root directory is the path where the Java application was started. When this property is set to `configuration` the location of the database file are found relative to the path of the configuration file. This property allows an administrator to set the database_path and log_path to a position in the file system relative to either the JVM or the configuration file.

>   Example:

>         root_path = configuration
>         database_path = ./data
>         log_path = ./log

> - database_path - Sets the path in the file system to store the data files. This property requires the use of the Unix forward slash path deliminator.

>   Example: `database_path = /home/databases/mckoi/db1/`

> - storage_system - This property may be set to either `v1file` or `v1javaheap` and defaults to `v1file`. This property specifies the persistence method the Mckoi engine uses for storing and modifying data in the database. The `v1file` storage system persists the database to the local file system. The `v1javaheap` storage system persists the database on the local Java heap. Note that if you use the `v1javaheap` storage system the database will not survive past the lifetime of the JVM and so should only be used for temporary in-memory databases.

>   Example: `storage_system = v1javaheap`

4. Log Settings

> The following configuration properties modify where Mckoi stores log information and the type of information that is logged.

> - log_path - Sets the path in the file system to store the log files. This property requires the use of the Unix forward slash path deliminator.

>   Example: `log_path = C:/mckoi_databases/logs/`

> - debug_log_file - Sets the name of the debug log file. By default the log file is called '`debug.log`'.

>   Example: `debug_log_file = database1_debug.log`

> - debug_logs - This property may be either enabled or disabled and by default is enabled. When disabled no debug information is generated.

> - debug_level - Sets the level of debug information that is output to the debug log file ranging from 0 to 40. By default the engine is set to 20 which means all alerts, warnings and errors are output to the log file. Reducing the debug level causes more information to be output to the log.

>   Example: `debug_level = 10`

> - query_logging - This property may be either enabled or disabled and by default is disabled. When enabled all SQL queries on the database are logged in the file '`commands.log`' in the log directory.

>   Example: `query_logging = enabled`

5. Network Configuration Settings

> The network configuration properties are only applicable when Mckoi SQL is being used as a network server.

> - jdbc_server_address - The local IP address to bind the Mckoi server to. If this property is not present the engine defaults to all local interfaces. This property is useful when a Mckoi database is running on a server with multiple interfaces and access to the database should only be allowed through one interface.

>   Example: `jdbc_server_address=127.0.0.1`

> - jdbc_server_port - The TCP port address to bind the Mckoi server to. If this property is not present the engine defaults to `9157`. If this property is changed from the default, the new port address must be specified in the JDBC URL when a connection is made.

> - maximum_worker_threads - The maximum number of threads that are made available to process queries from remote connections. The default setting for this property is 4. Setting this to 1 will cause the engine to be single threaded for all incoming queries. Setting this higher will allow more queries to be processed concurrently.

6. Performance/Cache Settings

> The Mckoi engine offers a number of options for tuning the performance of the database. The default settings offer good performance for the majority of applications, however sometimes it is necessary to tune performance further.

> - data_cache_size - The size (in bytes) that the in-memeory data cache can grow to. The data cache stores accesses to all data in tables. By default this cache is set to 4 MB. It is recommended that the data cache should scale in size relative to the amount of data being stored in the database. It is recommended that for every 100 MB of data being stored that 4 MB of cache is allocated. The 100/4 rule is a rule of thumb however, and some applications may benefit from a larger cache with a smaller amount of data being stored.

>   Example: `data_cache_size=8388608`

> - max_cache_entry_size - The maximum size (in bytes) of an element in the data cache. By default the maximum size is set to 8 KB (8192 bytes). Some applications that stores a lot of data that is larger than 8 KB in size may find improved performance if this is increased.

> - dont_synch_filesystem - This property may be enabled or disabled and by default is disabled. The Mckoi engine file synchs all changes made to a database during a commit unless this property is enabled. A file synch will tell the Operating System to make sure the copy of the data on the disk is completely up to date. When the dont_synch_filesystem property is enabled, the database is less robust and performance is increased because the file synch incurs an overhead.

> - io_safety_level - A value between 1 and 10 that represents the level of safety of all IO operations to the file system where 1 is the least safe and 10 is the most safe. By default the io_safety_level property is set to the most safe level (10). This property can be set to a lower value to improve disk write performance and disable safety features. When the io_safety_level property is set to 2 or below, the engine will not disable journaling (for crash recovery) and will not sync file changes to disk. Setting the io_safety_level to a low value is only recommended for environments where there is hardware protection for power failure and disk crashes, and where disk write performance is an essential requirement.

> - use_nio_if_available - This property may be either enabled or disabled and by default is disabled. When use_nio_if_available is enabled the NIO API available in Java 1.4 will be used for file access. Using NIO for file access may improve performance on some operating systems.

> - buffered_nio_page_size and buffered_nio_max_pages - These properties alter the number and size of pages used by the NIO buffer manager. By default buffered_nio_page_size is set to 1 MB and buffered_nio_max_pages is set to 64. These properties are only used on Java 1.4 when NIO is enabled with the use_nio_if_available property. Different operating systems offer varying performance/memory overhead associated with the use of NIO so experimentation with these properties will no doubt be necessary for optimal use of NIO.

> - buffered_io_page_size and buffered_io_max_pages - These properties alter the number and size of pages used by the IO buffer manager. By default buffered_io_page_size is set to 8192 and buffered_io_max_pages is set to 256. Multiply the values of these properties to calculate the amount of memory used for IO buffering (by default 2 MB). Performance may be improved by increasing the maximum pages property if you have stored a large amount of data that is frequenty accessed.

Last Updated: Mon Aug 16 00:27:18 PDT 2004 Mckoi SQL Database Copyright © 2000 - 2004 Diehl and Associates, Inc. All rights reserved.