Setting Hard Limit for Services

cghealth sets a limit on the total memory consumption including swap of the PLD slice. If the measures specified fails, kernel enforces the limit by killing processes. The limit is configured in the cghealth.conf file. The local changes should be made via cghealth.conf.local file.

[memory]
limit = 60%

The percentage is in relation to the total physical memory of the machine. You can specify an absolute value, for example, limit = 17179869184 or, equivalently, a value with measurement, for example, limit = 16G.

Note:

  • Customizing cghealth services is optional.

  • MySQL is not part of pld.slice file. This limit should be chosen low enough to leave sufficient space for it.