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
DatabaseEnvironment..::.CacheSize Property
DatabaseEnvironment Class See Also Send Feedback

The size of the shared memory buffer pool -- that is, the cache.

Namespace: BerkeleyDB
Assembly: libdb_dotnet53 (in libdb_dotnet53.dll) Version: 5.3.21.0

# Syntax

C#
    public CacheInfo CacheSize { get; set; }

Visual Basic (Declaration)
    Public Property CacheSize As CacheInfo

Visual C++
    public:
    property CacheInfo^ CacheSize {
    	CacheInfo^ get ();
    	void set (CacheInfo^ value);
    }

# Remarks

The cache should be the size of the normal working data set of the application, with some small amount of additional memory for unusual situations. (Note: the working set is not the same as the number of pages accessed simultaneously, and is usually much larger.)

The default cache size is 256KB, and may not be specified as less than 20KB. Any cache size less than 500MB is automatically increased by 25% to account for buffer pool overhead; cache sizes larger than 500MB are used as specified. The maximum size of a single cache is 4GB on 32-bit systems and 10TB on 64-bit systems. (All sizes are in powers-of-two, that is, 256KB is 2^18 not 256,000.) For information on tuning the Berkeley DB cache size, see Selecting a cache size in the Programmer's Reference Guide.

# See Also

DatabaseEnvironment Class
BerkeleyDB Namespace