Statement introduced in Junos OS Release 12.3.
Statement introduced in Junos OS Release 13.2X51-D10 for QFX Series switches.
Support at the [edit system extension extension-service application] hierarchy level introduced in Junos OS Release 16.1 for MX80, MX104, MX240, MX480, MX960, MX2010, MX2020, and vMX.
Support at the [edit system scripts translation] hierarchy level introduced in Junos OS Release 16.1.
Maximum amount of memory allocated for the data segment during execution of a script of the configured type. Junos OS sets the maximum memory limit for the executing script to the configured value irrespective of the total memory available on the system at the time of execution. If the executing script exceeds the specified maximum memory limit for that script type, it exits gracefully.
For op scripts, the max-datasize statement is only enforced for op scripts that are local to the device. If you execute an op script from a remote location using the op url command, Junos OS uses the default memory allocation settings.
For op scripts run with the max-datasize statement configured for the minimum, an error occurs. In Junos OS, the error is "Memory allocation failed." In Junos OS Evolved, the error is "Out of memory."
If you do not include the max-datasize statement, the system allocates half of the total available memory of the system up to a maximum value of 128 MB for the data segment portion of the executed script.
Syntax: size to specify bytes, sizek to specify KB, sizem to specify MB, or sizeg to specify GB
32-bit Junos OS—23,068,672 bytes (22 MB) through 1,073,741,824 bytes (1 GB)
64-bit Junos OS—23,068,672 bytes (22 MB) through 1,073,741,824 bytes (1 GB) (SNMP scripts)
64-bit Junos OS—23,068,672 bytes (22 MB) through 3,221,225,472 bytes (3 GB) (commit, event, op, translation, and extension service scripts)
The maximum memory for extension service scripts in 64-bit Junos OS images is 3,221,225,472 bytes (3 GB) starting in Junos OS Releases 16.1R4, 16.2R2, and 17.1R1. Prior to these releases, the maximum is 1,073,741,824 bytes (1 GB).
Required Privilege Level
maintenance—To view this statement in the configuration.
maintenance-control—To add this statement to the configuration.