Tuesday, September 14, 2010

Lotus Notes preloader

A Notes preloader can be configured to run at OS startup. The preloader allows for faster Notes client startup by preloading some required Notes libraries when the OS is started.
The preloader opens and closes certain databases to load Notes libraries into memory and then shuts itself down. When enabled, users experience a faster Notes startup.
Enabling the preloader makes registry changes during Notes installation. On a locked down system, registry changes would require elevated privileges; the Notes installer already needs to run with those privileges.

The preloader is most effective with Windows XP.


How do I enable the preloader for a Notes install or upgrade?

The preloader option is off by default. You can enable the preloader option during Notes client install or upgrade using the Launch parts of Notes when the operating system starts to enable faster Notes startup option in the user interface. The option appears on the same install screen on which Notes can be enabled as the default mail, calendar, and contacts programs.

You can also enable the preloader option as follows:


-- Start the installation using /v"PRELOADNOTES=1" argument on the SETUP command line:

SETUP /v"PRELOADNOTES=1"

-- Add the following argument to the CmdLine setting:

CmdLine= /v"PRELOADNOTES=1"

-- Enable the preloader option using an MSI transform

Create a transform using the InstallShield Tuner for Lotus Notes and enable the "Preloader" option under Features > Notes Client.


Can I enable the preloader after I've run the Notes 8.5.2 installer?

Yes, you can enable preloading after Notes install by making the following changes to the Windows Registry:

For registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, specify the key name as "IBM Lotus Notes Preloader" and use the full path to the Notes preloader executable in the Notes install directory, for example:

C:\Progam Files\IBM\Lotus\Notes\NNTSPRELD.EXE


What exactly does the preloader do?

When the preloader runs, it preloads a portion of the Notes APIs and subsystem, a portion of the Java JVM, and some NSF databases that are used immediately at the time of the Notes client startup.

After the preloader has brought portions of the files into the OS file system in memory cache, the preloader executable exits; leaving no permanent EXEs or DLLs loaded in memory.

The preloader runs with respect to the Notes installation where the Notes preloader executable is located. In terms of client data, it uses the standard Notes client mechanisms to locate the current NOTES.INI for the user.


In Notes 8.5.2, the preloader does the following:

Calls NotesInit which causes low level Notes DLLs and files to be loaded
Reads several client databases including DESKTOP8.NDK, CACHE.NDK, BOOKMARK.NSF, and NAMES.NSF
Loads a number of Java JVM DLLs


If you make AntiVirus/AV exceptions at the EXE level (for example. NOTES2.EXE, NLNOTES.EXE or NTASKLDR.EXE), then you should consider adding NNTSPRELD.EXE to that same exception list.

However, if exceptions are made at the directory or file level, the preloader acts on the same set of files as the Notes client when it starts.

If you make exceptions for specific EXEs to run, then the NNTSPRELD.EXE should be included in those exceptions.

The NNTSPRELD.EXE runs with user privileges, in the same manner as the NLNOTES.EXE process.


Are admin rights required to both install and run the preloader?
No. Admin rights are required only for the install.



Does the preloader commit files to disk?

No, the preloader does not commit any files to disk. The portions of files read into memory will remain in the Windows in-memory file system cache. The preloader does not persist any of its data directly.


MSDN article: File Caching (Windows)


What's the recommended way to validate results?
Compare Notes cold startup times with and without the preloader with OS restarts in between. You should notice cold startup improvements after preloading has occurred compared to starting Notes after an OS restart without the preloader running.

NOTE: If your cold starts have variations due to daily tasks (i.e., software updates or anti-virus updates), be careful not to factor those variations into your timings. It would be best to perform a couple of timings to ensure that you have consistency in your numbers.


Is there a visual way to see the preloader activity?
The recommended way to verify preloader acitivity is through a comparison of cold startup times with and without it running. But for a visual look at the I/O that occurs during the preloading, you can use a tool like sysinternals by Microsoft.

No comments:

Post a Comment