Pivotal Knowledge Base


How to update tcp keepalive parameters in VMs in Pivotal Cloud Foundry?


Product Version
Pivotal Cloud Foundry 1.7


To persist tcp keepalive parameters to the kernel configuration in VMs in a Pivotal Cloud Foundry cluster. 


In PCF 1.7, there is a new feature called "add-ons" using bosh. This feature enables operators to run software is not part of the bosh release - typically third-party monitoring agents, antivirus, security software, operating system kernel parameters etc. 

To change tcp keepalive parameters in a kernel configuration, see detailed instructions below: 

  • Upload the os-conf-release:

The tar bundle of the release is provided here:

bosh upload release https://bosh.io/d/github.com/cloudfoundry/os-conf-release
  • Create a runtime.yml manifest file and copy contents of https://github.com/cloudfoundry/os-conf-release/blob/master/manifests/tcp_keepalive.yml

  • Update version in the release section of the manifest file to match the os-conf-release version (from bosh releases output, note the os-conf-release version)

  • Add the tcp keep-alive properties in the yml file.

Sample file:

- name: os-conf
  version: 6

- name: networking
  - name: tcp_keepalive
    release: os-conf
      time: 121
      interval: 31
      probes: 9
  • Update the runtime config on the director:
bosh update runtime-config ./runtime.yml
  • Run bosh runtime-config to confirm

  • Click "Apply Changes" in the Ops Manager.

  • To verify the changes, ssh to the VM and run the following command:
    sysctl -a | grep tcp_keepalive

Note that the above procedure will update the kernel parameters across all of the VMs in the Pivotal Cloud Foundry cluster. There is no provision to update and persist the kernel settings on a per VM basis. 


Powered by Zendesk