Sets the initial memory reserved for caching database pages and other server information.
{ dbsrv10 | dbeng10 } -c { size[ k | m | g | p ] } ...
All operating systems and servers.
The amount of memory available for use as a database server cache is one of the key factors controlling performance. You can set the initial amount of cache memory using the -c server option. The more cache memory that can be given the server, the better its performance.
The size is the amount of memory, in bytes. Use k, m, or g to specify units of kilobytes, megabytes, or gigabytes, respectively.
The unit p is a percentage either of the physical system memory, or of the available address space, whichever is lower. Available address space depends on the operating system. For example:
2.8 GB for Windows 32-bit Advanced Server, Enterprise Server, Datacenter Server, and Vista
3.8 GB for the 32-bit database server running on Windows x64 Edition
1.8 GB on all other 32-bit systems
On Windows CE, the available address space is a percentage of the available physical system memory
If you use p, the argument is a percentage. You can use % as an alternative to p, but as most non-Unix operating systems use % as an environment variable escape character, you must escape the % character. To set the minimum cache size to 50 percent of the physical system memory, you would use the following:
dbeng10 -c 50%% ...
On NetWare and Unix operating systems, the cache size is set to the lesser of:
the value specified after -c
95% of (available memory - 5 MB)
On Windows CE, the cache size will be set to the lesser of:
the value specified after -c
95% of (available memory - 2 MB)
If no -c option is provided, the database server computes the initial cache allocation as follows:
It uses the following operating-system-specific default cache sizes:
Windows CE 600 KB
Windows 2 MB
NetWare 8 MB
Unix 8 MB
It computes a runtime-specific minimum default cache size, which is the lesser of the following items:
25% of the computer's physical memory
The sum of the sizes of the main database files specified on the command line. Additional dbspaces apart from the main database files aren't included in the calculation. If no files are specified, this value is zero.
It allocates the greater of the two values computed.
NetWare database serverThere is a tradeoff between memory for the database server and memory for the NetWare file system buffers. A larger database server cache will improve database server performance at the expense of NetWare file system performance. If the database server cache is too big, NetWare will report an error that there is insufficient memory for cache buffers. NetWare memory requirements increase with every new directory and file on the file server. To track memory usage on the NetWare server, load monitor.nlm (if it isn't already loaded) and select "Resource Utilization". Extra memory for your NetWare server computer could improve database performance and/or file server performance dramatically. |
If your database is encrypted, you may want to increase the cache size. As well, if you are using dynamic cache resizing (-ca option), then the cache size that is used may be restricted by the amount of memory that is available.
The Server Messages window displays the size of the cache at startup, and you can use the following statement to obtain the current size of the cache:
SELECT PROPERTY( 'CacheSize' )
The following example, entered all on one line, starts a server named myserver that starts with a cache size of 3 MB and loads the sample database:
dbeng10 -c 3m -n myserver "samples-dir\demo.db"
For information about samples-dir, see Samples directory.