Q&A: Understanding IBM Notes preloader
IBM Notes 8.5.2 introduces a Notes preloader for the Windows platform that can be run at OS startup. The preloader allows for faster Notes client startup by preloading some required Notes libraries when the OS is started. See below for Q&A about this feature.
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.
Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program's operation if properly and appropriately used. The opposite of lazy loading is eager loading. Therefore, the preloader is an example of eager-loading because it will initialize some Notes processes at the start of the operating system, before Notes is launched or used. Lazy-loading is accomplished in other ways once Notes is launched and a particular function is invoked by the end-user, but specifically for the preloader, it should be viewed and discussed as an 'eager-loading' approach that should speed up the initial launch of the Notes client if Superfetch is not available (e.g.: WinXP and/or older systems that are I/O constrained).
What are the options to enable the preloader?
You must enable the preloader during a Notes install or upgrade. Your options to do so include:
|Option 1||Select the "Launch parts of Notes when the operating system starts to enable faster Notes startup" through the install user interface. As shown below, the option appears on the same install screen on which Notes can be enabled as the default mail, calendar, and contacts program.
|Option 2||Start the install by using /v"PRELOADNOTES=1" argument on the SETUP command line:
|Option 3||Add the following argument to the CmdLine setting:
|Option 4||Enable the preloader option using an MSI transform. Create a transform using the InstallShield Tuner for Notes and enable the "Preloader" option under Features > Notes Client.|
If it is NOT enabled during install, will the preloader file still be copied to the workstation?
No. Enabling the preloader option during install is necessary to both update the registry and copy the related executable (NNTSPRELD.EXE) to the workstation.
When the preloader runs, exactly what does it do?
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.
Is it possible to use a MSI transform file to enable the preloader?
Due to a bug in the 8.5.2 installer, the designed interface for turning on the Preload feature via a command line property doesn't work properly. Currently, as a workaround a transform file must be generated that sets the default feature state to "1", which indicates the preloader feature will always be installed. To generate this simple transform file, you can use either the InstallShield Tuner for IBM Notes or Orca.
In the feature table, the Install State column value for the Preloader item must be set to "1".
Once the transform file is saved, the command line for the Installer should be modified to include it. For example, a silent installation of Notes with the preload feature enabled via a transform file would look like this:
setup /s /v" /qb+ TRANSFORMS=preloader.mst"
The attached transform file will correctly install the preloader feature for a Notes 8.5.2 (Standard Configuration) install kit.
Notes 9.x: The option for the preloader is hidden in Notes 9.0 just for Windows 7 and Windows 8, but it still appears in Windows XP. The option is hidden specifically because testing showed that the Superfetch feature in Windows 7 accomplished the same goal as the preloader. You could enable the preloader on Windows 7 or Windows 8 if you wanted to by simply using a transform to remove the condition on the feature.
What debug options are available?
You can use DEBUGGINGWCTENABLED=16386 to debug startup performance problems.
The statement "Dynamic client configuration started" can be used to note the startup end time.
How does Notes preloader compare to the Windows SuperFetch feature?
Both the Notes preloader and Windows SuperFetch essentially perform the same functionality of causing program caching in memory to enable faster load times. The preloader is a Notes specific solution for improving Notes' load time. SuperFetch works in a more generic way on multiple commonly used Windows applications. SuperFetch does take a certain amount of time to learn which applications are commonly used whereas the preloader loads Notes no matter how often it is used. Because both features result in similar performance gains for Notes startup time you should only use one. Thus, it is recommended that customers leverage SuperFetch in Windows 7 and disable the Notes preloader.
The superfetch and prefetch features in Windows helps improve the overall performance of the operating system and all of the applications used on the system and not just of the Notes client. The Notes Preloader is similar to these Windows features in that it accomplishes similar tasks, but only with the Notes client, and not for any other applications on Windows. Therefore, if the workstation hardware is not a Windows Prefetch candidate, then it is not a Notes Preloader candidate.