#8404 Detect and fail if not enough memory is available for installation
Closed: fixed by rcritten. Opened by rcritten.

Issue

There are few hard rules for sizing of an IPA server but with a CA at least 2 GB of RAM is necessary to avoid constant swapping and chance of failure during installation and service restarts.

The solution needs to support bare metal, VM and container installations.

cgroup should be able to detect low memory situations for the container case but both v1 and v2 must be supported.

For bare metal and VM cases reading installed memory should be sufficient.

We already strongly discourage running other services on an IPA server so we will have to assume that any free memory will remain free and available for a new IPA installation.

The installer will check this available memory and fail with a description of the current condition and how much RAM is available. An installer override option will be necessary to allow a user to forge ahead.

The amount of memory required should be conditioned on the services being configured. This will also need to be considered when services are added post-installation (CA and DNS).


I wanted to get some baselines to see what the absolute minimum install RAM is so I created a F32 vagrant VM (libvirt) using the cloud image.

I was able to successfully install IPA + CA + DNS in 1280 of RAM, no swap. This was...unexpected.

Granted this is likely not at all useful but I was able to do some minor commands and generate a cert so the basics work.

So maybe 2GB is a reasonable minimum for VRAM + swap (free).

I haven't even looked at the restrictions in a container yet. It would be ideal to use the same API for both but it appears that psutil doesn't understand cgroups and will only report on host memory.

Metadata Update from @rcritten:
- Issue assigned to rcritten

https://github.com/freeipa/freeipa/pull/5067

I decided to ignore swap. If you are so RAM tight that you want to include swap then fine but you'll need to skip the memory check.

master:

  • cfad7af35dd5a2cdd4081d1e9ac7c245f47f1dce Require at least 1.6Gb of available RAM to install the server
  • fc271a55bb6c942ec5268f190dca72dbb6cb8387 ipatests: Add tests for checking available memory

ipa-4-8:

  • 1fd4440a2d49118c9be4f6a6bb9d90ca3abd7c53 Require at least 1.6Gb of available RAM to install the server
  • 9fa534c92c31488d7dbf7fb84ec0ed934e0376a8 ipatests: Add tests for checking available memory

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • b47ddb0186eae69bca09d93035d69a24e7a03595 Reduce the memory requirement from 1.6 to 1.2 GB

ipa-4-8:

  • 8255bc7b92db44d375819857fed12faa85609c3a Reduce the memory requirement from 1.6 to 1.2 GB

Metadata Update from @abbra:
- Custom field changelog adjusted to FreeIPA server now requires at least 1.2 GiB RAM for installation to prevent performance degradation.

master:

  • 75c1b7ed345fc3f21483ffe071b40e665b175adc Provide more detailed logging around memory detection

ipa-4-9:

  • 6eff5b9527d5d187922eed6f569d3e63d67e094d Provide more detailed logging around memory detection

This was implemented, but without the discussed override. I think I'll implement it, because it's causing me some grief on my dev VMs.

Nevermind, the override is implemented (--skip-mem-check) but was not adequately documented. I will file a PR to address that.

https://github.com/freeipa/freeipa/pull/6350

master:

  • cb0ce1bd8b6345f84876bdd3557e2881d51e1048 man: add --skip-mem-check to man pages
  • f8da5bfbea067960dded17cdc469fb6376eb760a install: suggest --skip-mem-check when mem check fails

ipa-4-9:

  • 585cebb1a9673e2fc083dd3c9545a6c080e171e3 man: add --skip-mem-check to man pages
  • cbf2614d8acc11a1b41558a45dac8ec98b032732 install: suggest --skip-mem-check when mem check fails

ipa-4-10:

  • e7bee5b668fee083d8ada167f307857761c25d80 man: add --skip-mem-check to man pages
  • cebfb8792006af1a41c4c26c49372f0ea822dbaf install: suggest --skip-mem-check when mem check fails
Metadata