Tech Note 2224: Mobility XE Warehouse Optimization Procedure
Mobility XE Warehouse Optimization Procedure
Technical Note 2224
Last Reviewed 15-Sep-2009Applies to:
Mobility XE Warehouse, Sun Directory Server 5.2
Printer-friendly versionSummary
This procedure optimizes the Mobility XE warehouse database to ensure that it performs as efficiently as possible. The procedure consists of a batch file containing a script that must be run on each of your warehouses – the primary and all standbys. The script only takes a minute or so to run. However, it does halt the Sun ONE Directory Server temporarily so you may want to run it during a time of minimal user impact. Please read this Tech Note carefully to ensure you have a complete understanding of all the steps involved.
Who should run the script
All Mobility XE deployments will benefit from running this procedure. However, for large deployments (more than 400 devices) or deployments that are experiencing periods of extreme slowness with the warehouse (where devices cannot connect or the Mobility Console cannot refresh), NetMotion strongly recommends performing this procedure immediately.
Smaller deployments, which are less likely to experience connectivity and/or slowness problems, may choose to perform this procedure at their earliest convenience.
Note: This is a one-time-only procedure. Once the script has successfully completed, it should not be run again.
Prerequisites for running the script
The machine hosting the Mobility warehouse must have at least 300 MB of disk space available.The script will not run unless Sun Patch 4 and Sun's memory leak patch have already been applied to the Mobility warehouse.To determine if Patch 4 has been applied to your warehouse, do the following:
Open the Sun ONE Directory Server console: on the Start menu, click Programs | Sun ONE Server Products (or Sun Java™) System Server Products) | Sun ONE Server Console 5.2 (or Sun Java™ System Server Console 5.2). Log on with the user ID and password you created during warehouse setup. The default user ID is admin.
On the Servers and Applications tab, expand the tree in the lefthand pane until you see the Directory Server listing.
Select (highlight) Directory Server.
In the righthand pane, look at the Version: line.
A warehouse that has had Sun Patch 4 applied will read "Version: 5.2_Patch_4".
See
Tech Note 2195 for instructions on applying Sun Patch 4.
To determine if Sun's memory leak patch has been applied to your warehouse, do the following:
- Open a command prompt window and change directory to the location of the
libback-ldbm.dll file. Typically the file is located in the C:\Program Files\Sun\MPS\lib directory. The path may vary depending on the location of your Mobility warehouse installation.
- Run the following command:
find "5.2" libback-ldbm.dll
- An unpatched libback-ldbm.dll file will display:
---------- LIBBACK-LDBM.DLL
5.2
Sun-ONE-Directory/5.2
Sun-ONE-ldbm/5.2
or:
---------- LIBBACK-LDBM.DLL
5.2_Patch_4
Sun Java(TM) System Directory Server/5.2_Patch_4
Sun-ONE-ldbm/5.2
A patched libback-ldbm.dll file will contain version number 6371707_1 as follows:
---------- LIBBACK-LDBM.DLL
5.2_Patch_4_PR_6371707_1
Sun-ONE-Directory (or Sun Java(TM) System Directory Server)/5.2_Patch_4_PR_6371707_1
Sun-ONE-ldbm/5.2
- If your libback-ldbm.dll file is unpatched, follow steps 5 and 6 in the Replacing the libback-ldbm.dll file section of Tech Note 2209 to replace it with the patched version (Sun Patch 4 must be applied before doing this). You only need to follow steps 5 and 6; the optimization script will take care of the rest.
What the script does
The script optimizes the page size that the warehouse uses for managing data entries. In order to make this change, the script stops the Directory Server, rebuilds the database with the new page size, and then restarts the server.
The script performs the following actions:
- Verifies that Sun Patch 4 has been applied. If it has not, the script will display a message and exit. See above for instructions on applying Sun Patch 4.
- Verifies that Sun's memory leak patch (libback-ldbm.dll) has been applied. If it has not, the script will display a message and exit. See above for instructions on applying Sun's memory leak patch.
- Stops the current Directory Server instance. Note: Stopping the Directory Server will not disconnect any currently-connected devices. If you have a standby warehouse, stopping the primary will cause your Mobility server(s) to fail over to the standby until the primary is back online. While the primary is offline, any already-registered devices will be able to connect. However, brand-new devices will not be able to connect and you will not be able to make any changes to settings in the Mobility Console.
- Creates backup copies of the warehouse data files.
- Optimizes the page size that the warehouse uses for managing data entries.
- Removes the current warehouse data files.
- Recreates the database by importing data from the backup copies.
- Restarts the Directory Server.
Note: On rare occasions, one or more of the Mobility servers in the pool may become unstable or stop working. Should this happen, the server will show as unreachable in the Mobility Console although clients will remain connected. When the optimization script has finished executing, reboot the machine hosting the non-working Mobility server.
How to run the script
Follow the steps below to download and run the performance optimization script. Run the script on each warehouse in your pool, starting with the primary warehouse. Note that the script must be executed from a command window.
Warning: Do not interrupt the script while it is running. Doing so could leave your database in an unknown state.
- Make a backup copy of your warehouse data. For instructions on backing up the warehouse, see Tech Note 2129.
- If your deployment includes a standby warehouse, check that replication is enabled and current. If your Mobility servers are version 7.0 or higher, you can open the Mobility Console, click on the Warehouse Status link, and view replication information on the Warehouse Status page. To check replication status on pre-7.0 Mobility servers, refer to Tech Note 2145 for instructions.
If replication is not current, do not execute this procedure. Contact Technical Support for further assistance.
- Click here to download the zip file containing the script.
- Verify the Sun ONE Console is not open.
- Unzip or copy the contents of the zip file into the directory where your Mobility warehouse resides. (The file unzips into
setpagesize.bat.)The default location is C:\Program Files\Sun\MPS\slapd-[servername]. If you have installed the Mobility warehouse into a non-default location you must find the location of the Sun\MPS\slapd-[servername] directory and unzip the file there.
- Open a command prompt window and change directory to this directory location.
- Type
setpagesize to run the setpagesize.bat script. The script will prompt you to type y to continue on and perform the optimization, or n to halt execution. When the script has finished it will inform you that the warehouse update is complete.
Note: If the script informs you that it has failed to complete, wait a few moments and then run it again. If it still fails to complete, contact Technical Support.
Sample output
Below is an example of script output:
C:\Program Files\Sun\MPS\slapd-bombadil>setpagesize
This script is running from C:\Program Files\Sun\MPS\slapd-bombadil.
This script changes the page size of the warehouse database. You must run
this script in the warehouse directory of the machine hosting the warehouse.
Only run this script if instructed by NetMotion technical support.
NOTE: Refer to tech note 2224 before running this script.
During this process:
- the warehouse will be stopped
- the data in the warehouse will be backed up
- the warehouse database configuration will be modified
- the database files will be deleted
- the warehouse will be rebuilt from the original data
- the warehouse will be restarted
Are you sure you want to continue? (y/n) y
Checking for Sun patch 4...Done.
Checking for libback-ldbm.dll...Done.
Stopping slapd instance...Done.
Exporting userroot...Done.
Exporting netscaperoot...Done.
Copying the config\dse.ldif file...Done.
Changing settings in dse.ldif...Done.
Deleting all files from db folder...Done.
Importing userroot...Done.
Importing netscaperoot...Done.
Starting slapd instance...Done.
Warehouse update complete.
Related Information
2195
|
How to Install Sun Patch 4 on a Mobility XE Warehouse
|
2209
|
Resolving Memory Leaks in the Mobility XE Warehouse
|
2129
|
Backing Up the Mobility XE Warehouse
|
2145
|
Monitoring Mobility XE Warehouse Replication
|
2202
|
Increasing the Mobility XE Warehouse Cache Size
|
9979
|
NetMotion Mobility Technical Notes
|
Please comment on this technical note.