Enables use of Address Windowing Extensions (AWE) on Windows for setting the size of the database server cache.
The use of AWE is deprecated. It is recommended that you use the 64-bit version of the SQL Anywhere database server on a 64-bit Windows operating system if you require a large cache.
{ dbeng12 | dbsrv12 } -cw ...
Windows
The amount of memory available for use as a database server cache is one of the key factors controlling performance. Because Windows supports Address Windowing Extensions, you can use the -cw option to take advantage of large cache sizes based on the maximum amount of physical memory in the system.
AWE caches are not supported on 64-bit SQL Anywhere database servers.
Operating system (32-bit) | Maximum non-AWE cache size | Maximum amount of physical memory supported by Windows |
---|---|---|
Windows XP Home Edition | 1.5 GB | 2 GB |
Windows XP Professional | 1.5 GB | 4 GB |
Windows Server 2003 Web | 1.5 GB | 2 GB |
Windows Server 2003 Standard | 1.5 GB | 4 GB |
Windows Server 2003 Enterprise | 2.5 GB1 | 32 GB |
Windows Server 2003 Datacenter | 2.5 GB1 | 64 GB |
Windows Vista Ultimate | 2.5 GB1 | 4 GB |
Windows Vista Enterprise | 2.5 GB1 | 4 GB |
Windows Vista Business | 2.5 GB1 | 4 GB |
Windows Vista Home Premium | 2.5 GB1 | 4 GB |
Windows Vista Home Basic | 2.5 GB1 | 4 GB |
Windows Vista Starter | 2.5 GB1 | 1 GB |
Windows 7 Ultimate | 2.5 GB1 | 4 GB |
Windows 7 Enterprise | 2.5 GB1 | 4 GB |
Windows 7 Professional | 2.5 GB1 | 4 GB |
Windows 7 Home Premium | 2.5 GB1 | 4 GB |
Windows 7 Home Basic | 2.5 GB1 | 4 GB |
Windows 7 Starter | 2.5 GB1 | 1 GB |
Windows 2008 Datacenter | 2.5 GB1 | 64 GB |
Windows Server 2008 Enterprise | 2.5 GB1 | 64 GB |
Windows Server 2008 Standard | 2.5 GB1 | 4 GB |
Windows Server 2008 Small Business Server | 2.5 GB1 | 4 GB |
Windows Web Server 2008 | 2.5 GB1 | 4 GB |
1 If you have 2 GB-16 GB of memory, enable 4 gigabyte tuning (4GT):
Windows XP/2003 Add the /3GB option to the Windows boot line in the "[operating systems]" section of the boot.ini file.
Windows Vista and later Run the following command as an administrator:
bcdedit /set increaseuserva 3072 |
When using an AWE cache, most of the available physical memory in the system can be allocated for the cache.
If you can set a cache of the required size using a non-AWE cache, this is recommended because AWE caches allocate memory that can only be used by the database server. This means that while the database server is running, the operating system and other applications cannot use the memory allocated for the database server cache. AWE caches do not support dynamic cache sizing. Therefore, if an AWE cache is used and you specify the -ch or -cl options to set the upper and lower cache size, they are ignored.
By default, 512 MB of address space is reserved for purposes other than the SQL Anywhere AWE cache (address space is the amount of memory that can be accessed by a program at any given time). Although this amount is usually enough, you can use the -cm option to change the amount of reserved address space.
On Windows Vista and Windows 7, only elevated database servers can use AWE memory. If you are starting a database server automatically on Windows Vista or Windows 7, you must specify ELEVATE=YES in your connection string so that the database server executables are elevated. See Elevate connection parameter.
To start a database server with an AWE cache, you must do the following:
On Windows Vista and Windows 7, you must run the database server as an administrator.
Have at least 130 MB of memory available on your system.
If you have 2 GB-16 GB of memory, enable 4 gigabyte tuning (4GT):
Windows XP/2003 Add the /3GB option to the Windows boot line in the "[operating systems]" section of the boot.ini file.
Windows Vista and later Run the following command as an administrator:
bcdedit /set increaseuserva 3072 |
If you have more than 16 GB of memory, do not enable 4GT.
If you have at least 4 GB of memory, enable PAE:
Windows XP/2003 Add the /PAE option to the Windows boot line in the [operating systems] section of the boot.ini file.
Windows Vista and later Run the following command as an administrator:
bcdedit /set pae ForceEnable |
Grant the Lock Pages in Memory privilege to the user ID under which the server is run. The following steps explain how to do this on Windows XP.
Log on to Windows as an administrator.
Open the Control Panel.
Double-click Administrative Tools.
Double-click Local Security Policy.
Open Local Policies in the left pane.
Double-click User Rights Assignment.
Double-click the Lock Pages In Memory policy in the right pane.
Click Add User Or Group.
Type the name of the user, and then click OK.
Click OK on the Lock Pages In Memory window.
Close all open windows and restart the computer for the setting to take effect.
If you specify the -cw option and the -c option on the command line, the database server attempts the initial cache allocation as follows:
The AWE cache is no larger than the cache size specified by the -c option. If the value specified by the -c option is less than 2 MB, AWE isn't used.
The AWE cache is no larger than all available physical memory less 128 MB.
The AWE cache is no smaller than 2 MB. If this minimum amount of physical memory isn't available, an AWE cache isn't used.
When you specify the -cw option and do not specify the -c option, the database server attempts the initial cache allocation as follows:
The AWE cache uses 100% of all available memory except for 128 MB that is left free for the operating system.
The AWE cache is no larger than 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.
The AWE cache is no smaller than 2 MB. If this minimum amount of physical memory isn't available, an AWE cache isn't used.
When the server uses an AWE cache, the cache page size will be no smaller than 4 KB and dynamic cache sizing is disabled.
The following example starts a database server named myserver that starts with a cache size of 12 GB and loads the database c:\test\mydemo.db:
dbeng12 -n myserver -c 12G -cw c:\test\mydemo.db |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |