Skip to content

Deployment status (and build status, to a smaller degree) dominates in memory usage #5504

Closed

Description

@smarterclayton

The deployment status message update is showing up in profiles of running systems with a significant amount of in memory use.

profile

----------------------------------------------------------+-------------
                                             994MB   100% |   github.com/openshift/origin/pkg/deploy/controller/deployment.(*podClientImpl).createPod
         0     0% 81.49%   994.51MB 81.53%                | github.com/openshift/origin/pkg/deploy/controller/deploymentconfig.(*DeploymentConfigController).Handle
                                             710MB 71.43% |   strings.Join
                                             284MB 28.57% |   fmt.Sprintf
----------------------------------------------------------+-------------

The status message calculation is probably too aggressive - we look to be trying to update too much status, and not doing it efficiently (calculating a message and then throwing it away for a large percentage of the time).

We need to root cause how expensive this is.

Activity

  1. smarterclayton commented on Oct 29, 2015

    @smarterclayton
    ContributorAuthor

    Showing up in the BU cluster, but could potentially be broader

  2. ironcladlou commented on Oct 29, 2015

    @ironcladlou
    Contributor

    Ouch, yeah.

  3. ironcladlou commented on Oct 29, 2015

    @ironcladlou
    Contributor

    It's also doing a lot of expensive lookups (like getting all buildconfigs across all namespaces for every image trigger in the config), and all this happens every time we handle a config.

  4. ironcladlou commented on Oct 29, 2015

    @ironcladlou
    Contributor

    I wonder if this should be using cache.Store for the things it needs to analyze and deferring string building until it knows there's something to render.

  5. smarterclayton commented on Oct 29, 2015

    @smarterclayton
    ContributorAuthor

    Also, if you update yourself, you're going to trigger an update... which
    will result in yourself getting notified.

    So first step - for both deployment (identified here) and build (@bparees)
    let's do a quick triage to verify that we only update status when we have
    to, not optimistically. If the controller decides not to take action, we
    should record it. IF the controller hits an error, we should record it.
    We shouldn't write status just because something changed.

    On Thu, Oct 29, 2015 at 4:53 PM, Dan Mace [email protected] wrote:

    I wonder if this should be using cache.Store for the things it needs to
    analyze and deferring string building until it knows there's something to
    render.

    —
    Reply to this email directly or view it on GitHub
    #5504 (comment).

  6. ironcladlou commented on Oct 29, 2015

    @ironcladlou
    Contributor

    Also, if you update yourself, you're going to trigger an update... which will result in yourself getting notified.

    Double ouch

  7. smarterclayton commented on Oct 29, 2015

    @smarterclayton
    ContributorAuthor

    Double ouch

    On Thu, Oct 29, 2015 at 5:04 PM, Dan Mace [email protected] wrote:

    Also, if you update yourself, you're going to trigger an update... which
    will result in yourself getting notified.

    Double ouch

    —
    Reply to this email directly or view it on GitHub
    #5504 (comment).

  8. ironcladlou commented on Oct 29, 2015

    @ironcladlou
    Contributor

    So first step - for both deployment (identified here) and build (@bparees) let's do a quick triage to verify that we only update status when we have to, not optimistically. If the controller decides not to take action, we should record it. IF the controller hits an error, we should record it. We shouldn't write status just because something changed.

    Just riffing at the moment:

    So, the status being reported here is based on externalities/associated resources. I think framing the update around the config updates might not be ideal. One option for a quick improvement in the short term would be to do the status updates in another controller that just periodically reconciles the config status with other resources.

  9. bparees commented on Oct 29, 2015

    @bparees
    Contributor

    I'm pretty sure (after surveying the code) builds only attempt to update the build.status.message if an error occurs during the handling process or we are explicitly changing the state (eg from running to complete)...

  10. smarterclayton commented on Oct 29, 2015

    @smarterclayton
    ContributorAuthor

    Are we setting a Reason? Or just message?

    On Oct 29, 2015, at 5:09 PM, Dan Mace [email protected] wrote:

    So first step - for both deployment (identified here) and build (@bparees
    https://github.com/bparees) let's do a quick triage to verify that we
    only update status when we have to, not optimistically. If the controller
    decides not to take action, we should record it. IF the controller hits an
    error, we should record it. We shouldn't write status just because
    something changed.

    Just riffing at the moment:

    So, the status being reported here is based on externalities/associated
    resources. I think framing the update around the config updates might not
    be ideal. One option for a quick improvement in the short term would be to
    do the status updates in another controller that just periodically
    reconciles the config status with other resources.

    —
    Reply to this email directly or view it on GitHub
    #5504 (comment).

  11. ironcladlou commented on Oct 30, 2015

    @ironcladlou
    Contributor

    Just a message.

  12. smarterclayton commented on Jan 13, 2016

    @smarterclayton
    ContributorAuthor

    What's the status of this?

  13. ironcladlou commented on Jan 13, 2016

    @ironcladlou
    Contributor

    #5530 needs resurrected if the approach is still valid (hasn't been reviewed in a long time).

  14. 0xmichalis commented on May 21, 2016

    @0xmichalis
    Contributor

    This is not an issue anymore since #4941 was reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions