Hi,
I use the 4.3.28 version of Berkeley DB (Debian platform) in
combination with the Perl BerkeleyDB 0.27 module.
I noticed that when using a queue database created with the parameters
as shown below, my test application takes about 30 seconds, while when
enabling extents (the line commented out) increases the time to about
80 seconds. I could narrow the most likely cause down to the size of
the logs: instead of 10 Mb, I get now 120 Mb of logs (and as these are
written synchronously, this might explain the time increase).
When I compare the two versions of the logs, the most eye catching
difference is that each __qam_delext line is about 12000 (!)
characters long. Is this a bug, or a known issue, or something that I
misunderstood?
Here is the perl code (the actual record size that i use is 12000, and
the page_size 16k):
sub new {
my ($class, %args) = @_;
my $env = new BerkeleyDB::Env
-Flags => DB_CREATE | DB_INIT_MPOOL
Quote:
DB_INIT_LOG | DB_INIT_LOCK
DB_INIT_TXN,
-ErrFile => *STDERR;
|
$env->set_flags(DB_TXN_WRITE_NOSYNC, 1);
my $rec_size = $args{recsize} || 1000;
my $page_size = $args{pagesize} || 4096;
my $txn = $env->txn_begin();
my $db = new BerkeleyDB::Queue
-Filename => 'queue.db',
-Flags => DB_CREATE,
-Len => $rec_size,
-Pagesize => $page_size,
-Env => $env,
# -ExtentSize => 2**14,
-Txn => $txn
or die "ERROR: $! $BerkeleyDB::Error\n";
$txn->txn_commit() == 0
or die "? $! $BerkeleyDB::Error\n";
my $self = { env => $env,
db => $db
};
return bless $self, $class;
}
Thank you in advance for your time. And thanks for the great Berkeley
DB code!
Patrick Weemeeuw.