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 0D0DD200C88 for ; Fri, 2 Jun 2017 20:54:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0AB48160BD2; Fri, 2 Jun 2017 18:54:28 +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 4F870160BBA for ; Fri, 2 Jun 2017 20:54:27 +0200 (CEST) Received: (qmail 48878 invoked by uid 500); 2 Jun 2017 18:54:26 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 48867 invoked by uid 99); 2 Jun 2017 18:54:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2017 18:54:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id CF884CD5D6; Fri, 2 Jun 2017 18:54:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id RbsdaPO2cKqW; Fri, 2 Jun 2017 18:54:24 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 96EE05F36F; Fri, 2 Jun 2017 18:54:23 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F0389E01D9; Fri, 2 Jun 2017 18:54:22 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id DDCD9C402E0; Fri, 2 Jun 2017 18:54:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4386118059195973308==" MIME-Version: 1.0 Subject: Re: Review Request 59699: Improve task history pruning by batch deleting tasks From: Zameer Manji To: David McLaughlin , Stephan Erb , Zameer Manji , Santhosh Kumar Cc: Aurora , Kai Huang Date: Fri, 02 Jun 2017 18:54:22 -0000 Message-ID: <20170602185422.16397.66234@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Zameer Manji X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/59699/ X-Sender: Zameer Manji X-ReviewBoard-ShipIt: 1 References: <20170602000146.34605.10866@reviews-vm2.apache.org> In-Reply-To: <20170602000146.34605.10866@reviews-vm2.apache.org> X-ReviewBoard-ShipIt-Only: 1 Reply-To: Zameer Manji X-ReviewRequest-Repository: aurora archived-at: Fri, 02 Jun 2017 18:54:28 -0000 --===============4386118059195973308== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59699/#review176827 ----------------------------------------------------------- Ship it! Ship It! - Zameer Manji On June 1, 2017, 5:01 p.m., Kai Huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59699/ > ----------------------------------------------------------- > > (Updated June 1, 2017, 5:01 p.m.) > > > Review request for Aurora, David McLaughlin, Santhosh Kumar, Stephan Erb, and Zameer Manji. > > > Bugs: AURORA-1929 > https://issues.apache.org/jira/browse/AURORA-1929 > > > Repository: aurora > > > Description > ------- > > Improve task history pruning by batch deleting tasks. > > The `'aurora_admin prune_tasks'` endpoint seems to be very slow when the cluster has a large number of inactive tasks. > > This CR batches all removeTasks operations and execute them all at once to avoid additional cost of coalescing. The fix will also benefit implicit task history pruning since it has similar underlying implementation. See https://issues.apache.org/jira/browse/AURORA-1929 for more information and details. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java 73878210f9028901fda3b08e66c6a63c24260d35 > > > Diff: https://reviews.apache.org/r/59699/diff/5/ > > > Testing > ------- > > __unit_tests:__ > > ./build-support/jenkins/build.sh > > No unit tests were created for this patch since it does not add new functionalities or alter the interface, but improves the efficiency of the existing code. > > __e2e tests:__ > > Attached was a screenshot of the task history pruning benchmark obtained from a scale test in Twitter's test cluster. > > - Before applying this patch, the task history pruning takes ~30 minutes on 130K tasks. > > - After applying the patch, the pruning takes ~1 minute. > > > File Attachments > ---------------- > > task_history_pruning_benchmark.png > https://reviews.apache.org/media/uploaded/files/2017/06/01/74eb5104-d338-4530-abd2-b82fbdc6bf84__task_history_pruning_benchmark.png > > > Thanks, > > Kai Huang > > --===============4386118059195973308==--