Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

C#
Visual Basic
Visual C++

Berkeley DB .NET API Documentation
LockingConfig..::.Partitions Property
LockingConfig Class See Also Send Feedback

The number of lock table partitions in the Berkeley DB environment.

Namespace: BerkeleyDB
Assembly: libdb_dotnet181 (in libdb_dotnet181.dll) Version: 18.1.32.0

# Syntax

C#
    public uint Partitions { get; set; }

Visual Basic (Declaration)
    Public Property Partitions As UInteger

Visual C++
    public:
    property unsigned int Partitions {
    	unsigned int get ();
    	void set (unsigned int value);
    }

# Remarks

The default value is 10 times the number of CPUs on the system if there is more than one CPU. Increasing the number of partitions can provide for greater throughput on a system with multiple CPUs and more than one thread contending for the lock manager. On single processor systems more than one partition may increase the overhead of the lock manager. Systems often report threading contexts as CPUs. If your system does this, set the number of partitions to 1 to get optimal performance.

If the database environment already exists when Open(String, DatabaseEnvironmentConfig) is called, the value of Partitions is ignored.

# See Also

LockingConfig Class
BerkeleyDB Namespace