← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1946003] [NEW] hotplug causing cloud-init to spike CPU usage

 

Public bug reported:

In 21.3, we added udev rules to enable the cloud-init hotplug
functionality. If a new device is detected, we call into cloud-init to
see if hotplug is supported/enabled, then proceed accordingly based on
the results. There are cloud users that are creating and disposing
docker containers at a very high rate. This causes many virtual ethernet
adapters to be created and disposed. This is triggering cloud-init
events at a high volume, consuming significant CPU. Even with the
hotplug functionality being disabled, the act of checking if hotplug is
enabled is causing the spikes in CPU.

The path taken is:
https://github.com/canonical/cloud-init/blob/main/udev/10-cloud-init-hook-hotplug.rules
to
https://github.com/canonical/cloud-init/blob/main/tools/hook-hotplug
to
https://github.com/canonical/cloud-init/blob/main/cloudinit/cmd/devel/hotplug_hook.py#L158


For more context, see IRC conversations from 10/1/2021 and 10/4/2021:
https://irclogs.ubuntu.com/2021/10/01/%23cloud-init.html
https://irclogs.ubuntu.com/2021/10/04/%23cloud-init.html

** Affects: cloud-init
     Importance: Critical
         Status: Triaged

** Changed in: cloud-init
       Status: New => Triaged

** Changed in: cloud-init
   Importance: Undecided => Critical

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1946003

Title:
  hotplug causing cloud-init to spike CPU usage

Status in cloud-init:
  Triaged

Bug description:
  In 21.3, we added udev rules to enable the cloud-init hotplug
  functionality. If a new device is detected, we call into cloud-init to
  see if hotplug is supported/enabled, then proceed accordingly based on
  the results. There are cloud users that are creating and disposing
  docker containers at a very high rate. This causes many virtual
  ethernet adapters to be created and disposed. This is triggering
  cloud-init events at a high volume, consuming significant CPU. Even
  with the hotplug functionality being disabled, the act of checking if
  hotplug is enabled is causing the spikes in CPU.

  The path taken is:
  https://github.com/canonical/cloud-init/blob/main/udev/10-cloud-init-hook-hotplug.rules
  to
  https://github.com/canonical/cloud-init/blob/main/tools/hook-hotplug
  to
  https://github.com/canonical/cloud-init/blob/main/cloudinit/cmd/devel/hotplug_hook.py#L158


  For more context, see IRC conversations from 10/1/2021 and 10/4/2021:
  https://irclogs.ubuntu.com/2021/10/01/%23cloud-init.html
  https://irclogs.ubuntu.com/2021/10/04/%23cloud-init.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1946003/+subscriptions



Follow ups