Sets the initial memory reserved for caching database pages and other database server information.
{ dbeng12 | dbsrv12 } -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 to the database 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 total 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:
2.5 GB for Windows 32-bit Advanced Server, Enterprise Server, Datacenter Server, and Vista
3.5 GB for the 32-bit database server running on Windows x64 Edition
1.5 GB on all other 32-bit Windows operating systems
On Windows Mobile, the cache size is limited by available physical memory
On 64-bit database servers, the cache size can be considered unlimited
If you use p, the argument is a percentage. You can use % as an alternative to p, but on Windows operating systems, which use % as an environment variable escape character, you must escape the % character. For example, to set the initial cache size to 50 percent of the physical system memory, run the following command:
dbeng12 -c 50%% ... |
If no -c option is provided, the database server calculates the initial cache allocation as follows:
Windows Mobile The formula is as follows:
max( 600 KB, min( dbsize, 0.25*TotalPhysicalMemory ) ); |
The dbsize is the total size of the database file or files started, and TotalPhysicalMemory the total amount of physical memory on the computer.
Windows The formula is as follows:
max( 2 MB, min( dbsize, 0.25*TotalPhysicalMemory ) ); |
The dbsize is the total size of the database file or files started, and TotalPhysicalMemory is the total amount of physical memory on the computer.
If an AWE cache is used on Windows the formula is as follows:
min( 100% of AvailablePhysicalMemory-128MB, dbsize ); |
An AWE cache is not used if this value is smaller than 2 MB.
For information about AWE caches, see -cw dbeng12/dbsrv12 server option (deprecated).
The use of AWE is deprecated. It is recommended that you use the 64-bit version of the database server on a 64-bit Windows operating system if you require a large cache.
Unix At least 8 MB.
max( 8 MB, min( 0.1*( physical-memory + available-swap ) , database-size*1.1 ) |
For information about Unix initial cache size, see Dynamic cache sizing on Unix.
If you attempt to set your initial or minimum cache sizes to a value that is less than one eighth of the maximum cache size, the initial and minimum cache sizes are automatically increased relative to the maximum cache size.
If you disable dynamic cache resizing (-ca option), then the cache size that is used may be restricted by the amount of memory that is available. See Use the cache to improve performance.
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( 'CurrentCacheSize' ); |
The following example starts a database server named myserver that starts with a cache size of 3 MB and loads the sample database:
dbeng12 -c 3m -n myserver "%SQLANYSAMP12%\demo.db" |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |