#include <db_cxx.h> DB_ENV->set_backup_config(DB_BACKUP_CONFIG option, u_int32_t value);
The DbEnv::set_backup_config()
method
configures tuning parameters for the hot backup APIs. See the
DbEnv::backup()
and
DbEnv::dbbackup()
methods for a description of the hot backup APIs.
The DbEnv::set_backup_config()
method
configures operations performed using the specified
DbEnv handle, not all operations
performed on the underlying database environment.
The DbEnv::set_backup_config()
method may
be called at any time during the life of the application.
The DbEnv::set_backup_config()
method either returns a non-zero error value or throws an
exception that encapsulates a non-zero error value on
failure, and returns 0 on success.
The option parameter identifies the backup parameter to be modified. It must be one of the following:
DB_BACKUP_WRITE_DIRECT
Turning this on causes direct I/O to be used when writing pages to the disk. For some environments, direct I/O can provide faster write throughput, but usually it is slower because the OS buffer pool offers asynchronous activity.
By default, this option is turned off.
DB_BACKUP_READ_COUNT
Configures the number of pages to read before pausing. Increasing this value increases the amount of I/O the backup process performs for any given time interval. If your application is already heavily I/O bound, setting this value to a lower number may help to improve your overall data throughput by reducing the I/O demands placed on your system.
By default, all pages are read without a pause.
DB_BACKUP_READ_SLEEP
Configures the number of microseconds to sleep between batches of reads. Increasing this value decreases the amount of I/O the backup process performs for any given time interval. If your application is already heavily I/O bound, setting this value to a higher number may help to improve your overall data throughput by reducing the I/O demands placed on your system.
DB_BACKUP_SIZE
Configures the size of the buffer, in bytes, to read from the database. Default is 1 megabyte.
The value parameter sets
the configuration value for the option identified by the
option parameter. For
those options which can only be turned on or off, this
parameter should be set to 0
for off and 1
for on. Otherwise, set
this parameter to an integer value that represents the
number of units for which you are configuring the backup
APIs.