LinuxParametersProps

class aws_cdk.aws_batch.LinuxParametersProps(*, init_process_enabled=None, max_swap=None, shared_memory_size=None, swappiness=None)

Bases: object

The properties for defining Linux-specific options that are applied to the container.

Parameters:
  • init_process_enabled (Optional[bool]) – Specifies whether to run an init process inside the container that forwards signals and reaps processes. Default: false

  • max_swap (Optional[Size]) – The total amount of swap memory a container can use. This parameter will be translated to the –memory-swap option to docker run. This parameter is only supported when you are using the EC2 launch type. Accepted values are positive integers. Default: No swap.

  • shared_memory_size (Optional[Size]) – The value for the size of the /dev/shm volume. Default: No shared memory.

  • swappiness (Union[int, float, None]) – This allows you to tune a container’s memory swappiness behavior. This parameter maps to the –memory-swappiness option to docker run. The swappiness relates to the kernel’s tendency to swap memory. A value of 0 will cause swapping to not happen unless absolutely necessary. A value of 100 will cause pages to be swapped very aggressively. This parameter is only supported when you are using the EC2 launch type. Accepted values are whole numbers between 0 and 100. If a value is not specified for maxSwap then this parameter is ignored. Default: 60

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_batch as batch

# size: cdk.Size

linux_parameters_props = batch.LinuxParametersProps(
    init_process_enabled=False,
    max_swap=size,
    shared_memory_size=size,
    swappiness=123
)

Attributes

init_process_enabled

Specifies whether to run an init process inside the container that forwards signals and reaps processes.

Default:

false

max_swap

The total amount of swap memory a container can use.

This parameter will be translated to the –memory-swap option to docker run.

This parameter is only supported when you are using the EC2 launch type. Accepted values are positive integers.

Default:

No swap.

shared_memory_size

The value for the size of the /dev/shm volume.

Default:

No shared memory.

swappiness

This allows you to tune a container’s memory swappiness behavior.

This parameter maps to the –memory-swappiness option to docker run. The swappiness relates to the kernel’s tendency to swap memory. A value of 0 will cause swapping to not happen unless absolutely necessary. A value of 100 will cause pages to be swapped very aggressively.

This parameter is only supported when you are using the EC2 launch type. Accepted values are whole numbers between 0 and 100. If a value is not specified for maxSwap then this parameter is ignored.

Default:

60