Skip to content

containers are not being load balanced evenly #284

Closed

Description

@chewymeister

We noticed that one of our concourse workers is being overloaded with containers, even though there are other workers which have a lot of capacity. Here is the status of the workers

01e85f7c-638f-43e5-9119-854826ba960a  84          linux     none
27e89480-4006-4ea5-9771-518a44076113  256         linux     none
2e96519b-81fb-446e-bca4-edd7bb29fb78  97          linux     none
5e6fd75a-185b-4cb1-8bbb-1299f87df6e1  0           linux     vsphere, cork
b4f1522d-3fc3-4ccd-a7c0-d75437aa5418  1           linux     aws
c6305523-3110-46ac-996c-4f2788670d97  1           linux     aws
f188c382-3540-434a-b651-c36ad1bc2bf0  0           linux     vsphere, cork
f4c82e25-ae6c-4435-a6ac-815abe329f68  84          linux     none

This results in jobs failing with the error insufficient subnets remaining in the pool.

We are on version concourse/0.68.0 and garden-linux/0.328.0.

Activity

  1. concourse-bot commented on Feb 16, 2016

    @concourse-bot

    Hi there!

    We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.

    The current status is as follows:

    • #113836611 containers are not being load balanced evenly
    • #117298637 Placement of long-lived resource checking containers should rebalance over time

    This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

  2. spikymonkey commented on Feb 18, 2016

    @spikymonkey

    Hey,

    We think we know what’s going on here. The struggling worker was loaded with containers for resource checking. For context - the team has scaled up the pool of available workers from 1 to 4 nodes (the linux, none ones you can see in @chewymeister’s post) at some point in the past. So we think that, pre-scaling, the single worker was already pretty loaded with containers for both resource interactions and tasks. Following the scale-up, the task containers, being transient things that only survive for the lifetime of the task, have been scheduled across the pool more or less evenly as expected. However, we think that the pre-existing resource check containers have persisted on the original worker. That’s left it with a disproportionately large share of the workload, and keeps its container count close to its maximum of 256.

    Poking around with fly containers seems to back this up… We can see that the check containers for resources that were created pre- worker pool scaling are all on the original worker. Check containers for resources created after the scaling are distributed reasonably fairly across the whole pool, which fits with the random scheduling approach we expect.

    We worked around our issue of having a single worker permanently close to its maximum container count by shooting it via the AWS console and then bosh cck’ing it back to life. This forced concourse to reschedule the stuck containers across the remaining workers. The new distribution isn’t ideal since concourse rescheduled before the replacement worker came back online, but having those resource checks spread across 3 nodes rather than 1 leaves us in a better situation than we had before.

    So, this is all guesswork :) But if it’s correct, we think that to prevent this from happening in the general case, concourse would need to redistribute resource check containers across all available workers whenever the worker pool size increases.

  3. supertopher commented on Apr 20, 2016

    @supertopher

    just reiterating that this problem still exists for us. If it matters for the purposes of debugging, we have workers deployed across several different environments

    29b032c3-cf43-47a7-9fc8-2d696bb7c541  18          linux     none
    55d4e9e0-61bb-4846-b483-b263819bc004  6           linux     none
    89e43993-1699-44a2-ac6c-8ed250543307  93          linux     none
    983f55db-00d1-4266-94d4-909f262b4acc  1           linux     lakitu, meta
    badb064f-f022-4da9-8810-aabf7bb3db44  7           linux     none
    d20f41b1-ce6b-40f3-85c4-4ada6bc95e5c  1           linux     staging
    d9424786-c778-44b4-aef3-e1c49b8e687f  0           linux     staging
    ecb9338e-fffc-43e7-bb14-35996587254f  256         linux     none
    
  4. zachgersh commented on Apr 21, 2016

    @zachgersh
    Contributor

    wanted to add - this is constantly a problem for release-engineering. We also have four nodes and instead of ending up with containers evenly balanced across them we get one node that is flooded causing us to roll all the workers. This is no fun :/

    229b2f51-7327-4e6f-b753-65c3bff002ed  0    linux  vsphere, openstack
    600d568e-feee-4656-b7a4-ff2d2c0d321d  0    linux  aws, vcloud
    b021ad27-0e49-494b-9b80-045524aba6b8  8    linux  none
    b4f24490-7de1-4622-b114-f4e549a18166  246  linux  none
    ca01d607-ada0-4193-b4af-4f3e5644a37f  1    linux  vsphere, openstack
    cdd17fb2-d1a7-41f2-b321-811a61ef54b4  0    linux  aws, vcloud
    d5ee0a7a-10bc-49af-8f3d-ac8c08c53ff5  0    linux  aws, vcloud
    dab04bc4-657c-4680-99b8-4ea6dc00406f  46   linux  none
    
  5. concourse-bot commented on May 5, 2016

    @concourse-bot

    Hello again!

    All stories related to this issue have been accepted, so I'm going to automatically close this issue.

    At the time of writing, the following stories have been accepted:

    • #113836611 containers are not being load balanced evenly
    • #117298637 Placement of long-lived resource checking containers should rebalance over time

    If you feel there is still more to be done, or if you have any questions, leave a comment and we'll reopen if necessary!

  6. added a commit that references this issue on Aug 17, 2016
  7. added a commit that references this issue on Mar 31, 2017
  8. added a commit that references this issue on Apr 10, 2017
  9. added a commit that references this issue on Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions