dbTalk Databases Forums  

how to sizing the lock subsystem?

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss how to sizing the lock subsystem? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default how to sizing the lock subsystem? - 05-18-2006 , 01:54 AM






i create database environment in this way:

ret = dbenv->open(dbenv,
sz_full_dbhome,
DB_CREATE | DB_INIT_LOCK | DB_INIT_MPOOL |
DB_THREAD,
0);

the only parameter is how many databases i will create in the
environment, each database is stored as btree.

so, how to sizing the lock subsystem? the locks, lockers, lock objects?

and another problem is, when i set the locks, lockers, lock objects a
very big number, the __db.00x files are up to 2~3 hundreds megabytes!
can i reduce the file size?


Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: how to sizing the lock subsystem? - 05-18-2006 , 02:58 PM






Hi,

db_stat -c will help you monitor and size the lock table parameters.

http://www.sleepycat.com/docs/utility/db_stat.html

Your cache size may be set very large (just a guess) . You can use
some of the other db_stat command options to help determine environment
configuration settings.. Your environment configuration parameters
will determine the size of those files.

Ron


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: how to sizing the lock subsystem? - 05-18-2006 , 07:53 PM



yes, the environment configuration parameters determine the size of
those files.
but when i close the environmnet, what save in those files? why so
large? can i reduce the size or delete them when close?

i have a simple test, that only create an environment and close it, but
set the max locks, lockers, lock objects very large, e.g, 1000000,
those file will be 300 megabytes!

Ron wrote:
Quote:
Hi,

db_stat -c will help you monitor and size the lock table parameters.

http://www.sleepycat.com/docs/utility/db_stat.html

Your cache size may be set very large (just a guess) . You can use
some of the other db_stat command options to help determine environment
configuration settings.. Your environment configuration parameters
will determine the size of those files.

Ron


Reply With Quote
  #4  
Old   
Ron
 
Posts: n/a

Default Re: how to sizing the lock subsystem? - 05-19-2006 , 08:41 AM



I'm not sure I know what your goal is here. If you are concerned about
having an environment backing file and it's size after shutdown then
maybe you should consider some of the other options and look at the
benefits of each such as DB_PRIVATE. WHen the environment shuts down,
there are no backing files. Please review:

http://www.sleepycat.com/docs/ref/env/region.html

Why do you have a setting of lock objects (lockers/locks ) of
1,000,000?

What is your environment configuration? How large is your cache?

Ron


Reply With Quote
  #5  
Old   
Florian Weimer
 
Posts: n/a

Default Re: how to sizing the lock subsystem? - 06-02-2006 , 02:01 PM



Quote:
Why do you have a setting of lock objects (lockers/locks ) of
1,000,000?
Because you want to load a large file into the database in a single
transaction? One record per transaction is often too slow, and
splitting the update into multiple transactions is sometimes not
really justified. Spending several hours on implementing
functionality which is only rarely used isn't that much fun.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.