Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » The Database Server » The SQL Anywhere database server » Database server options

-b server option Next Page

-c server option


Sets the initial memory reserved for caching database pages and other server information.

Syntax

{ dbsrv10 | dbeng10 } -c { size[ k | m | g | p ] } ...

Applies to

All operating systems and servers.

Remarks

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:

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:

On Windows CE, the cache size will be set to the lesser of:

If no -c option is provided, the database server computes the initial cache allocation as follows:

  1. It uses the following operating-system-specific default cache sizes:

  2. It computes a runtime-specific minimum default cache size, which is the lesser of the following items:

  3. It allocates the greater of the two values computed.

NetWare database server

There 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.

See Increase the cache size.

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' )
See also
Example

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.