Previous page

Next page

Locate page in Contents

Print this page

Kernel Parameters

There is a number of kernel limits that should be set for the Parallels Cloud Server software to work correctly. Parallels Cloud Server is shipped with a tuned /etc/sysctl.conf file. Understanding what parameters were changed is essential for running the required number of Containers. Below is the contents of the /etc/sysctl.conf file as shipped with Parallels Cloud Server:

# Controls IP packet forwarding

net.ipv4.ip_forward = 1

# Controls source route verification

net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing

net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel

kernel.sysrq = 1

# Controls whether core dumps will append the PID to the core filename.

# Useful for debugging multi-threaded applications.

kernel.core_uses_pid = 1

# Controls the use of TCP syncookies

net.ipv4.tcp_syncookies = 1

# Disable netfilter on bridges.

net.bridge.bridge-nf-call-ip6tables = 1

net.bridge.bridge-nf-call-iptables = 1

net.bridge.bridge-nf-call-arptables = 0

# Controls the default maxmimum size of a mesage queue

kernel.msgmnb = 65536

# Controls the maximum size of a message, in bytes

kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes

kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages

kernel.shmall = 4294967296

net.ipv6.conf.all.proxy_ndp=1

net.ipv4.conf.default.proxy_arp = 0

net.ipv4.conf.all.rp_filter = 0

fs.super-max = 2560

fs.file-max = 262144

kernel.fairsched-nodes-max = 1538

net.ipv4.neigh.default.gc_thresh2 = 2048

net.ipv4.neigh.default.gc_thresh3 = 4096

net.ipv4.conf.default.send_redirects = 0

net.ipv4.conf.all.send_redirects = 0

net.ipv6.neigh.default.gc_thresh2 = 2048

net.ipv6.neigh.default.gc_thresh3 = 4096

net.nf_conntrack_max = 500000

fs.aio-max-nr = 1048576

Notice that some parameters of the kernel configuration depends on the maximum number of Containers you plan to run. In the default configuration file, these numbers were calculated under the assumption the maximum Container number is 512. If you plan to run another number of Containers, it is recommended to recalculate net.ipv4.neigh.default.gc_thresh2 and net.ipv4.neigh.default.gc_thresh3 parameters as three per Container plus 128…512. Keep the second parameter twice as great as the first one.

To apply the changes issue the following command:

# sysctl -p

Besides, it makes sense to set net.ipv4.tcp_use_sg to 0, since corresponding “Scatter/gather IO” feature is not supported by the venet device, used in Parallels Cloud Server networking.

It is also worth mentioning that normally you should have forwarding turned on since the server forwards packets destined to or originated from Containers.