Optimize File System Initialization (Compact 2013)

3/26/2014

This topic discusses file system loading and steps you can take to improve load time.

File System Loading Overview

During startup, the kernel initializes a file system that the OS will use after it starts. The following file system initialization operations affect boot time:

  • Initializing the RAM file system and RAM registry.
  • Mounting a HIVE-based registry from persistent storage. This mounting requires the registry to wait for Storage Manager and Device Manager to initialize, which adds time to the boot process.
  • Launching OS components and applications by using the HKey_Local_Machine\Init registry key.

For more information about Storage Manager settings, see Storage Manager Reference. For more information about Device Manager, see Device Manager.

Improvement Strategies for the Boot Time

  • Load any components and applications started in the HKey_local_Machine\Init key as late in the boot process as possible.
  • Ensure that components and applications start in the appropriate order so that all the dependencies run correctly, thereby reducing delay as a result of timeouts.

RAM File System Setting

To specify the size of your RAM file system, set a value for FSRAMPERCENT in the Config.bib file. FSRAMPERCENT allocates memory to the object store, which is persistent, nonvolatile RAM where the file system is stored. The minimum value of FSRAMPERCENT is 0x00000004, or 32 KB. The default value is 0x80808080, which specifies that 50 percent of available RAM is allocated for the file system.

For more information, see FSRAMPERCENT and the CONFIG Section of the Binary Image Builder (.bib) File.

Improvement Strategies for Initializing RAM

  • Calculate the amount of RAM actually needed. For example, if you want to reserve 12.5 percent of RAM for the file system, set each byte of FSRAMPERCENT to ((12.5/100)*(1 MB/4 KB)), or 12.5 * 2.56. This example works out to 32, or 0x20. Then, set the 4-byte value of FSRAMPERCENT to 0x20202020.

  • Call the OEMCalcFSPages function in the OAL. This function changes the amount of memory that will be allocated to the object store for the file system by specifying the number of pages. To implement OEMCalcFSPages, the pfnCalcFSPages member of OEMGLOBAL must point to this function.

    Note

    The maximum number of pages you can have is 32,000 (128 MB/4 KB).

See Also

Concepts

Startup Time Optimization Strategies