ON THIS PAGE
Example: Configuring Virtual Memory for Process Configuration Data
This example shows how to use virtual-memory-mapping to configure different fixed and page-pooling sizes for the configuration database for individual processes in Junos OS.
Requirements
This example uses the following hardware and software components:
A Juniper Networks M Series, MX Series, PTX Series, or T Series router
Junos OS Release 13.2 or later
Overview
Typically, the maximum database size available for storing configuration data per process is 665.99 MB for M, MX, PTX, and T i386 platforms, with certain devices such as the PTX1000 Packet Transport Router having a maximum database size of 409.99 MB. The database size is mapped within the address space reserved for that process. Depending on the process, this database size might impact commit performance for a process that manages many changes at commit.
To improve commit performance, you can use virtual-memory-mapping at the [edit system configuration-database] hierarchy level to allocate virtual memory for storing process configuration data on a per-process basis. You can configure a portion of the virtual memory as fixed size and a portion for page-pooling. Page-pooling uses just a small amount of memory to swap pages in or out as needed, rather than mapping the entire configuration database at once.
Using virtual-memory-mapping and enabling page-pooling are methods used to improve commit performance for processes that manage many changes at commit time that negatively impact commit performance.
Additionally, for M, MX, PTX, and T i386 systems, the option extend-size is available at the [edit system configuration-database] hierarchy level to increase the configuration database size, improving commit performance for mgd. The extended default size is based on the original default database size. A device with a default database size of 409.99 MB will extend to a maximum of 1049.99 MB, and a device with a default database size of 665.99 MB will extend to a maximum of 1305.99. The extended size will automatically be used by mgd. Other processes will only be able to access the increased size by using page-pooling. The extend-size option is not available on MX80, MX40, MX10, or MX5 platforms.
The configurations provided here are only examples. The sizes and processes that you configure will be different depending on the needs of your system.
Syntax
The syntax structure used in this example is available in Junos OS Release 13.2 or later.
Configuration
Configuring Virtual Memory Parameters for a Single Process
Step-by-Step Procedure
This example sets parameters of 512 KB for the fixed size and 512 KB for the page-pooling size of virtual memory mapping for the interface-control process, which controls the router’s physical interface devices and logical interfaces.
We assume the interface-control process on this sample system manages so many changes at commit time that performance is impacted. After completing this configuration on this system, we can expect improvement in the commit time performance.
- Set the virtual memory fixed size to 512 KB and the page-pooling
size to 512 KB for the interface-control process.[edit]user@host# set system configuration-database virtual-memory-mapping process interface-control fixed-size 512 page-pooling 512
- Commit the changes.user@host# commit
Results
Verify the setup using the show system configuration-database usage command.
Prior to Junos OS Release 15.1, use the show system configuration database operational mode command instead to view the usage statistics of configuration database memory.
Configuring Virtual Memory Parameters for Multiple Processes
Step-by-Step Procedure
You can configure virtual memory parameters for configuration data for more than one process on a single system. This example configures parameters to enable page-pooling for the processes: interface-control, mib-process, firewall, event-processing, vrrp, and snmp.
- Set the fixed-size to 20480 and set the page-pooling size
to 30720 for the interface-control process. user@host# set system configuration-database virtual-memory-mapping process interface-control fixed-size 20480 page-pooling 30720
- Set the fixed-size to 512 and set the page-pooling size
to 30720 for the mib-process. user@host# set system configuration-database virtual-memory-mapping process mib-process fixed-size 512 page-pooling 30720
- Set the fixed-size to 30720 and set the page-pooling size
to 1024 for the firewall process. user@host# set system configuration-database virtual-memory-mapping process firewall 30720 page-pooling 1024
- Set the fixed-size to 10240 and set the page-pooling size
to 10240 for the snmp process. user@host# set system configuration-database virtual-memory-mapping process snmp fixed-size 10240 page-pooling 10240
- Commit the changes.user@host# commit
Results
Verify the setup using the show system configuration-database usage command.
Prior to Junos OS Release 15.1, use the show system configuration database operational mode command instead to view the usage statistics of configuration database memory.
Configuring Extended Size for the Configuration Database
Step-by-Step Procedure
This example increases the configuration database size available to mgd and other processes on i386 versions of M Series, MX Series, PTX Series, or T Series platforms. Devices with a default database size of 409.99 MB will extend to a maximum of 1049.99 MB, and devices with a default database size of 665.99 MB will extend to a maximum of 1305.99.
This feature is only available on i386 platforms, and mgd automatically uses the increased database size. To make the extended memory available for other processes, enable page-pooling-size under virtual-memory-mapping. The extend-size option is not available on MX80, MX40, MX10, or MX5 platforms.
- Extend the configuration database size.[edit]user@host# set system configuration-database extend-size
- Commit the changes.user@host# commit
Results
Verify the setup using the show system configuration-database usage command.
Prior to Junos OS Release 15.1, use the show system configuration database operational mode command instead to view the usage statistics of configuration database memory.