Return-Path: X-Original-To: apmail-spark-dev-archive@minotaur.apache.org Delivered-To: apmail-spark-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E6CC18BAB for ; Sun, 7 Feb 2016 02:27:48 +0000 (UTC) Received: (qmail 74380 invoked by uid 500); 7 Feb 2016 02:27:41 -0000 Delivered-To: apmail-spark-dev-archive@spark.apache.org Received: (qmail 74277 invoked by uid 500); 7 Feb 2016 02:27:41 -0000 Mailing-List: contact dev-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@spark.apache.org Received: (qmail 74266 invoked by uid 99); 7 Feb 2016 02:27:41 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2016 02:27:41 +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 E9154C137E for ; Sun, 7 Feb 2016 02:27:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id VVZ0gcjqNkF6 for ; Sun, 7 Feb 2016 02:27:40 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id B51EA43F46 for ; Sun, 7 Feb 2016 02:27:39 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id l143so77959750lfe.2 for ; Sat, 06 Feb 2016 18:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4ijzsJWU/wzk5L2hIpffGvp5hsrSUdOYUBt0Xr/D+oE=; b=B5lk1WNpYzC0QuXE2VJ+ZIRUu9VPExoorKY1tVNwkc1rJUf8gQYnl6S5PL3KbtTX3g OjcbSVBsO+unq4eF68HcwTGEvMywLi+Xp3fYHOo/EyiI5lTMLY7bl/f32sY9TVVkOxaK 69SNKaXwXORMz+tH81v/hmmn4mmchkYbru3pgxa0UHR6Oujxgm/G7A//oFovCal6+gTl awYYQIZxjp6b8cwbw1tJfwbBVNmUrFir68zvMuqw+s8j52Wpu6uZbsbHp51KoICSQUQ5 qIX5iCnud9kasoHWYc+OVkNXNx6cVyu2qMb6ILVRWQCmjA8k4cwC9NoiTZ9NRiW2hXmB ZnwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=4ijzsJWU/wzk5L2hIpffGvp5hsrSUdOYUBt0Xr/D+oE=; b=T+h8aGXsthIq0uOfK7mHNkOYzFglPZ7fbns2UaixwGktza01x5qfnrX5hhHIMpQtPo qGPw117pq10SJa8K9vJ+Q6rmt5uuILMKree78gQjLjHrCSTDccx+SsqoTV5L/l7BymkX AZnPQ837EFM46DqlzyvXkynwscr2IDkWY2e8/CEVUNEKZjOzgAFO4HCp8bOeC1BC12C/ xyy0dOe4m+AaSpsHVk8qtt2fJweaddp/uxlmekIfWLWUywGDw0OZhtd4/zCmhHHlBsnh cT0Q27WuNKNwdd7B08squXn7dFTJU/+yiHD5/0n5SMsPrM0koYOFcxcqFvTQATxfDAJY 5MYA== X-Gm-Message-State: AG10YOTz6BbVjapo4FCTEniCrJFOPipEjirXxuN+TTKhIAwNmGtgZ27pRmGGyYGWztPye/PQYAO7HL3g6cVFMA== MIME-Version: 1.0 X-Received: by 10.25.88.9 with SMTP id m9mr3474087lfb.137.1454812058721; Sat, 06 Feb 2016 18:27:38 -0800 (PST) Received: by 10.25.208.211 with HTTP; Sat, 6 Feb 2016 18:27:38 -0800 (PST) Date: Sat, 6 Feb 2016 18:27:38 -0800 Message-ID: Subject: pyspark worker concurrency From: Renyi Xiong To: dev@spark.apache.org Content-Type: multipart/alternative; boundary=001a114178e0f9a781052b24d3d1 --001a114178e0f9a781052b24d3d1 Content-Type: text/plain; charset=UTF-8 Hi, is it a good idea to have 2 threads in pyspark worker? - main thread responsible for receive and send data over socket while the other thread is calling user functions to process data? since CPU is idle (?) during network I/O, this should improve concurrency quite a bit. can expert answer the question? what are the pros and cons here? thanks, Renyi. --001a114178e0f9a781052b24d3d1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

is it a good idea to hav= e 2 threads in pyspark worker? - =C2=A0main thread responsible for receive = and send data over socket while the other thread is calling user functions = to process data?

since=C2=A0CPU is idle (?) during= network I/O, this should improve concurrency quite a bit.

can expert answer the question? what are the pros and cons here?

thanks,
Renyi.

<= br>
--001a114178e0f9a781052b24d3d1--