CircleCI Ideas

Set cgroup swapaccounting to be on (or add an option)

We are currently trying to migrate from Travis CI to CircleCI for our open source project DOMjudge, a programming contest control system. 
One of the things we do is monitor memory usage for a running program, including swap. We do this using cgroups.

However, we need both the memory.limit_in_bytes and memory.memsw.limit_in_bytes cgroups to do this correctly and it seems the latter is not available on the machine executor on CircleCI. Using the Docker executor doesn't work for us either, because there we don't have access to the cgroups at all (and probably this one is not available there either).

Is there any way support for memory.memsw.limit_in_bytes could be added? 
In our own documentation, we added the following on how to enable this:

To fix this, please make the following changes: 
1. In /etc/default/grub, add 'cgroup_enable=memory swapaccount=1' to GRUB_CMDLINE_LINUX_DEFAULT 
2. Run update-grub 
3. Reboot

Because the last step (reboot), this is currently not possible.

Travis CI does seem to have this enabled, as our build succeeds there.

It would be really great if this could be an option!

I openend a support ticket a few days ago ( and they told me to create a feature request here.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Apr 1 2019
  • New
  • Attach files