Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Logging-Related Parameters

The following are parameters related to logs used for database backup and restore. The types and value range for each parameter are as follows:

Parameter Name

Type

Default Value

Min.

Max.

adaptive_flush_control

bool

yes

 

 

background_archiving

bool

yes

 

 

checkpoint_every_npages

int

10000

10

 

checkpoint_interval_in_mins

int

720

1

 

force_remove_log_archives

bool

yes

 

 

log_buffer_size

int

2 MB

192 KB

 

log_max_archives

int

INT_MAX

0

 

max_flush_pages_per_second

int

10000

1

INT_MAX

page_flush_interval_in_msecs

int

0

-1

 

sync_on_nflush

int

200

1

INT_MAX

adaptive_flush_control

adaptive_flush_control is a parameter used automatically to adjust the flush capacity at every 50 ms depending on the current status of the flushing operation. Its default value is yes. That is, this capacity is increased if a large number of INSERT or UPDATE operations are concentrated at a certain point of time and the number of flushed pages reaches the max_flush_pages_per_second parameter value; and is decreased otherwise. In the same way, you can distribute the I/O load by adjusting the flush capacity on a regular basis depending on the workload.

background_archiving

background_archiving is a parameter used to create temporary archive logs periodically at a specific time. It is useful when balancing disk I/O load which has been caused by archiving logs. The default is yes.

checkpoint_every_npages

checkpoint_every_npages is a parameter used to configure checkpoint interval by log page. The default value is 10,000.

You can distribute disk I/O overload at the checkpoint by specifying lower number in the checkpoint_every_npages parameter, especially  in the environment where INSERT/UPDATE are heavily loaded at a specific time.

Checkpoint is a job to record every modified page in data buffers to database volumes (disk) at a specific point. It can restore data back to the latest checkpoint if database failure occurs. It is important to choose efficient checkpoint interval because large increase of log files stored in a disk may affect database operation, causing unnecessary disk I/O.

The checkpoint_interval_in_mins and checkpoint_every_npages parameters are related to setting checkpoint cycle. The checkpoint is periodically executed whenever the time specified in checkpoint_interval_in_mins parameter has elapsed or the number of log pages specified in checkpoint_every_npages parameter has reached.

checkpoint_interval_in_mins

checkpoint_interval_in_mins is a parameter used to configure execution period of checkpoint in minutes. The default value is 720.

force_remove_log_archives

force_remove_log_archives is a parameter used to configure whether to allow the deletion of the files other than the recent log archive files of which the number is specified by log_max_archives. The default value is yes.

If the value is set to yes, the files will be deleted other than the recent log archive files for which the number is specified by log_max_archives. If it is set to no, the log archive files will not be deleted. Exceptionally, if ha_mode is set to on, the files other than the log archive files required for the HA-related processes and the recent log archive files of which the number is specified by log_max_archives will be deleted.

If you want to build the CUBRID HA environment, see Configuration.

log_buffer_size

log_buffer_size is a parameter used to configure the size of log buffer to be cached in the memory. There are four types of unit available: K, M, G, and T; K stands for kilobytes (KB), M stands for megabytes (MB), G stands for gigabytes (GB), and T stands for terabytes (TB). If unit is omitted, byte-unit is applied and the default value is 2M.

If the value of the log_buffer_size parameter is large, performance can be improved (due to the decrease in disk I/O) in an environment where transactions are long and numerous. It is recommended to configure an appropriate value considering the memory size and operations of the system where CUBRID is installed.

  • Required memory size = the size of log buffer (log_buffer_size)
log_max_archives

log_max_archives is a parameter used to configure the maximum number of archive log files. The minimum value is 0 and default value is INT_MAX (2147483647). It is set to 0 in the cubrid.conf file when CUBRID has installed. Its operations can differ depending on the configuration of force_remove_log_archives. For example, when log_max_archives is 3 and force_remove_log_archives is yes in the cubrid.conf file, the most recent three archive log files are recorded and when a fourth archiving log file is generated, the oldest archive log file is automatically deleted; the information about the deleted archive logs are recorded in the *_lginf file.

However, if an active transaction still refers to an existing archive log file, the archive log file will not be deleted. That is, if a transaction starts at the point that the first archive log file is generated, and it is still active until the fifth archive log is generated, the first archive log file cannot be deleted.

For how to set up the CUBRID HA environment, see Administrator > CUBRID HA > cubrid.conf.

max_flush_pages_per_second

max_flush_pages_per_second is a parameter used to configure the maximum flush capacity when the flushing operation is performed from a buffer to a disk. Its default value is 10,000. That is, you can prevent concentration of I/O load at a certain point of time by configuring this parameter to control the maximum flush capacity per second.

If a large number of INSERT or UPDATE operations are concentrated at a certain point of time, and the flush capacity reaches the maximum capacity set by this parameter, only log pages are flushed to the disk, and data pages are no longer flushed. Therefore, you must set an appropriate value for this parameter considering the workload of the service environment.

page_flush_interval_in_msecs

page_flush_interval_in_msecs is a parameter used to configure the interval in milliseconds (msec.) at which dirty pages in a data buffer are flushed to a disk. Its default value is 0. When the minimum value is set to -1, it work as that is set to 0. This is a parameter that is related to I/O load and buffer concurrency. For this reason, you must set its value in consideration of the workload of the service environment.

sync_on_nflush

sync_on_nflush is a parameter used to configure the interval in pages between after data and log pages are flushed from buffer and before they are synchronized with FILE I/O of operating system. Its default value is 200. That is, the CUBRID Server performs synchronization with the FILE I/O of the operating system whenever 200 pages have been flushed. This is also a parameter related to I/O load.