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 71E94200CD7 for ; Tue, 18 Jul 2017 02:46:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 703D01661B3; Tue, 18 Jul 2017 00:46:46 +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 900831661AD for ; Tue, 18 Jul 2017 02:46:45 +0200 (CEST) Received: (qmail 60812 invoked by uid 500); 18 Jul 2017 00:46:44 -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 60796 invoked by uid 99); 18 Jul 2017 00:46:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2017 00:46:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 871C11A043C; Tue, 18 Jul 2017 00:46:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.451 X-Spam-Level: **** X-Spam-Status: No, score=4.451 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id juqNNj3EjD0W; Tue, 18 Jul 2017 00:46:41 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DFDF85F3BC; Tue, 18 Jul 2017 00:46:40 +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 7C272E07EA; Tue, 18 Jul 2017 00:46:40 +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 0DF09C40485; Tue, 18 Jul 2017 00:46:39 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0729598195799383343==" MIME-Version: 1.0 Subject: Re: Review Request 60376: Observer task page to load consumption info from history From: Santhosh Kumar Shanmugham To: Santhosh Kumar Shanmugham , David McLaughlin , Joshua Cohen , Jordan Ly Cc: Aurora , Reza Motamedi Date: Tue, 18 Jul 2017 00:46:39 -0000 Message-ID: <20170718004639.1522.23419@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Santhosh Kumar Shanmugham X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/60376/ X-Sender: Santhosh Kumar Shanmugham References: <20170629183258.64391.68944@reviews-vm2.apache.org> In-Reply-To: <20170629183258.64391.68944@reviews-vm2.apache.org> Reply-To: Santhosh Kumar Shanmugham X-ReviewRequest-Repository: aurora archived-at: Tue, 18 Jul 2017 00:46:46 -0000 --===============0729598195799383343== 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/60376/#review180775 ----------------------------------------------------------- LGTM. Some minor comments. src/main/python/apache/thermos/monitoring/resource.py Line 54 (original), 53-60 (patched) Can you add some docstrings to these classes to explain what they will contain? Particularly the difference between the `AggregateResourceResult` and `(Proc|Full)ResourceResult`. src/main/python/apache/thermos/monitoring/resource.py Line 61 (original), 67 (patched) Update docstring. src/main/python/apache/thermos/monitoring/resource.py Line 68 (original), 74 (patched) Update docstring. src/main/python/apache/thermos/monitoring/resource.py Lines 88 (patched) snake-case the field names. src/main/python/apache/thermos/monitoring/resource.py Lines 175-179 (patched) Can we use `sum` and `zip` to sum the tuples column-wise? src/test/python/apache/thermos/monitoring/test_resource.py Lines 104-105 (patched) Feed some random values. src/test/python/apache/thermos/monitoring/test_resource.py Lines 113 (patched) Assert disk_usage. - Santhosh Kumar Shanmugham On June 29, 2017, 11:32 a.m., Reza Motamedi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60376/ > ----------------------------------------------------------- > > (Updated June 29, 2017, 11:32 a.m.) > > > Review request for Aurora, David McLaughlin, Joshua Cohen, Jordan Ly, and Santhosh Kumar Shanmugham. > > > Repository: aurora > > > Description > ------- > > # Observer task page to load consumption info from history > > Resource consumptions of Thermos Processes are periodically calculated by TaskResourceMonitor threads (one thread per Thermos task). This information is used to display a (semi) fresh state of the tasks running on a host in the Observer host page, aka landing page. An aggregate history of the consumptions is kept at the task level, although TaskResourceMonitor needs to first collect the resource at the Process level and then aggregate them. > > On the other hand, when an Observer _task page_ is visited, the resources consumption of Thermos Processes within that task are calculated again and displayed without being aggregated. This can become very slow since time to complete resource calculation is affected by the load on the host. > > By applying this patch we take advantage of the periodic work and fulfill information resource requested in Observer task page from already collected resource consumptions. > > > Diffs > ----- > > src/main/python/apache/thermos/monitoring/resource.py 434666696e600a0e6c19edd986c86575539976f2 > src/test/python/apache/aurora/executor/common/test_resource_manager.py a898e4d81d34d1e30e39db1be1a66bc9e0ab1a35 > src/test/python/apache/thermos/monitoring/test_resource.py d794a998f1d9fc52ba260cd31ac444aee7f8ed28 > > > Diff: https://reviews.apache.org/r/60376/diff/3/ > > > Testing > ------- > > I stress tested this patch on a host that had a slow Observer page. Interestingly, I did not need to do much to make the Observer slow. There are a few points to be made clear first. > - We at Twitter limit the resources allocated to the Observer using `systemd`. The observer is allowed to use only 20% of a CPU core. The attached screen shots are from such a setup. > - Having assigned 20% of a cpu core to Observer, starting only 8 `task`s, each with 3 `process`es is enough to make the Observer slow; 11secs to load `task page`. > > > File Attachments > ---------------- > > without the patch -- Screen Shot 2017-06-22 at 1.11.12 PM.png > https://reviews.apache.org/media/uploaded/files/2017/06/22/03968028-a2f5-4a99-ba57-b7a41c471436__without_the_patch_--_Screen_Shot_2017-06-22_at_1.11.12_PM.png > with the patch -- Screen Shot 2017-06-22 at 1.07.41 PM.png > https://reviews.apache.org/media/uploaded/files/2017/06/22/5962c018-27d3-4463-a277-f6ad48b7f2d7__with_the_patch_--_Screen_Shot_2017-06-22_at_1.07.41_PM.png > > > Thanks, > > Reza Motamedi > > --===============0729598195799383343==--