Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6EFF5200B40 for ; Thu, 16 Jun 2016 18:39:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6DB10160A61; Thu, 16 Jun 2016 16:39:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B6C63160A51 for ; Thu, 16 Jun 2016 18:39:06 +0200 (CEST) Received: (qmail 96992 invoked by uid 500); 16 Jun 2016 16:39:05 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 96948 invoked by uid 99); 16 Jun 2016 16:39:05 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2016 16:39:05 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 438CF2C14F9 for ; Thu, 16 Jun 2016 16:39:05 +0000 (UTC) Date: Thu, 16 Jun 2016 16:39:05 +0000 (UTC) From: "Sebastian Toader (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-17248) Reduce the idle time before first command from next stage is executed on a host MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Jun 2016 16:39:07 -0000 [ https://issues.apache.org/jira/browse/AMBARI-17248?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebastian Toader updated AMBARI-17248: -------------------------------------- Attachment: (was: AMBARI-17248.trunk.v2.patch) > Reduce the idle time before first command from next stage is executed on = a host > -------------------------------------------------------------------------= ------ > > Key: AMBARI-17248 > URL: https://issues.apache.org/jira/browse/AMBARI-17248 > Project: Ambari > Issue Type: Improvement > Components: ambari-agent, ambari-server > Reporter: Sebastian Toader > Assignee: Sebastian Toader > Fix For: 2.4.0 > > Attachments: AMBARI-17248.trunk.v3.patch > > > Commands to be executed by ambari-agents are being sent down by the serve= r in the response message to agent heartbeat messages.=20 > The server processes the received heartbeat, it checks if there are next = commands scheduled to be executed by ambari-agent and adds those to the hea= rtbeat response for the ambari-agent. > The server organises the commands that can be executed in parallel into s= tages. Ambari server ensures that only the commands of a single stage is sc= heduled to be executed by the agent and starts scheduling the commands of t= he next stage only after all commands of current stage has finished success= fully. > The processing of command status received with the heartbeat message happ= ens asynchronously to heartbeat response in HeartBeatProcessor and ActionSc= heduler creation thus when the heartbeat response is created the commands f= or the next stage are not scheduled yet. This means that the next commands = will be sent to agent only with the next heartbeat. > Agents currently sends a heartbeat to the server on command a completion = or at a timeout =3D self.netutil.HEARTBEAT_IDDLE_INTERVAL_SEC =E2=80=93 sel= f.netutil.MINIMUM_INTERVAL_BETWEEN_HEARTBEATS interval which is ~10 seconds= if there are no commands to be executed. > This means that when the server receives a heartbeat triggered by the com= pletion of the last command from the current stage the server will send the= commands for the next stage only 10 seconds later when the next heartbeat = is received. This leads to agents spending considerable amount of time idle= when there are multiple stages to be executed. > Agents should heartbeat at a higher rate while there are still pending st= ages to be executed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)