From issues-return-189875-archive-asf-public=cust-asf.ponee.io@spark.apache.org Mon Apr 23 08:36:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B8023180634 for ; Mon, 23 Apr 2018 08:36:03 +0200 (CEST) Received: (qmail 64903 invoked by uid 500); 23 Apr 2018 06:36:02 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 64894 invoked by uid 99); 23 Apr 2018 06:36:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2018 06:36:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 43B4418048D for ; Mon, 23 Apr 2018 06:36:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id GxhSXDuj7PPJ for ; Mon, 23 Apr 2018 06:36:01 +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 4FFBE5F5B7 for ; Mon, 23 Apr 2018 06:36:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CC6C5E09A4 for ; Mon, 23 Apr 2018 06:36:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 84DCA241C6 for ; Mon, 23 Apr 2018 06:36:00 +0000 (UTC) Date: Mon, 23 Apr 2018 06:36:00 +0000 (UTC) From: "Takeshi Yamamuro (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-24030) SparkSQL percentile_approx function is too slow for over 1,060,000 records. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-24030?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D164= 47626#comment-16447626 ]=20 Takeshi Yamamuro commented on SPARK-24030: ------------------------------------------ I quickly tried this at least in the master and v2.3.0 though, I couldn't r= eproduce: {code:java} ./bin/spark-shell --master=3Dlocal[1] --conf spark.driver.memory=3D4g --con= f spark.sql.shuffle.partitions=3D1 -v scala> :paste def timer[R](f: =3D> {}): Unit =3D { val count =3D 5 val iters =3D (0 until count).map { i =3D> val t0 =3D System.nanoTime() f val t1 =3D System.nanoTime() val elapsed =3D t1 - t0 + 0.0 println(s"#$i: ${elapsed / 1000000000.0}") elapsed } println("Avg. Elapsed Time: " + ((iters.sum / count) / 1000000000.0) + "s= ") } scala> timer { spark.range(1060000).selectExpr("percentile_approx(id, 0.5)"= ).collect } #0: 4.405557999 = =20 #1: 0.40483767 #2: 0.407931124 #3: 0.424493487 #4: 0.386281957 Avg. Elapsed Time: 1.2058204474s scala> timer { spark.range(1040000).selectExpr("percentile_approx(id, 0.5)"= ).collect } #0: 4.560478621 = =20 #1: 0.387799115 #2: 0.38196225 #3: 0.377551809 #4: 0.390596532 Avg. Elapsed Time: 1.2196776654s {code} > SparkSQL percentile_approx function is too slow for over 1,060,000 record= s. > -------------------------------------------------------------------------= -- > > Key: SPARK-24030 > URL: https://issues.apache.org/jira/browse/SPARK-24030 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.2.1 > Environment: zeppline + Spark 2.2.1 on Amazon EMR and local lapto= p. > Reporter: Seok-Joon,Yun > Priority: Major > Attachments: screenshot_2018-04-20 23.15.02.png > > > I used=C2=A0percentile_approx functions for over 1,060,000 records. It is= too slow. It takes about 90 mins. So I tried for 1,040,000 records. It tak= e about 10 secs. > I tested for data reading on JDBC and parquet. It takes same time lengths= . > I wonder that function is not designed for multi worker. > I looked gangglia and spark history. It worked on one worker. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org