Sets the initial memory reserved for caching database pages and other server information.
{ dbsrv11 | dbeng11 } -c { size[ k | m | g | p ] } ...
All operating systems and database 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 maximum non-AWE cache size, whichever is lower. The maximum non-AWE cache size 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:
dbeng11 -c 50%% ... |
On Unix operating systems, the cache size is set to the lesser of:
On Windows Mobile, 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:
Windows Mobile 600 KB
Windows 2 MB
Unix 8 MB
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 database 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:
dbeng11 -c 3m -n myserver "samples-dir\demo.db" |
For information about samples-dir, see Samples directory.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |