Return-Path: X-Original-To: apmail-spark-user-archive@minotaur.apache.org Delivered-To: apmail-spark-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F56B17A5F for ; Wed, 1 Oct 2014 18:40:07 +0000 (UTC) Received: (qmail 14216 invoked by uid 500); 1 Oct 2014 18:40:05 -0000 Delivered-To: apmail-spark-user-archive@spark.apache.org Received: (qmail 14146 invoked by uid 500); 1 Oct 2014 18:40:05 -0000 Mailing-List: contact user-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@spark.apache.org Received: (qmail 14135 invoked by uid 99); 1 Oct 2014 18:40:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 18:40:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garjones@socialmetrix.com designates 209.85.192.54 as permitted sender) Received: from [209.85.192.54] (HELO mail-qg0-f54.google.com) (209.85.192.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 18:39:39 +0000 Received: by mail-qg0-f54.google.com with SMTP id z107so764941qgd.27 for ; Wed, 01 Oct 2014 11:39:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:message-id:mime-version :subject:date:references:to:in-reply-to; bh=dh+J4ahuciP2NKKGFAuM6RtNwoq+5omEljO0T4ezw/Q=; b=H0LK3J9xaeSn/0Akhq5fEuLLV7sY9TE4oXhndnMSzwkEwCRKkWxVhuuiPLP6YrYJhE Yi5cnFSWPz05mgyETPxjd8o1jJMnSN3i8BbyGstjPh+F5j1GeYP5oN3l3O5FB5+qu2Yf uKDYYBA6j4jwyS0IdxOLyl0JApR5K80KLhwn/NM6V7TGjJp/5ATjw2tgYbTNWdujBDMS oKFpCeHOgG2fKfeDA+ChfXC3iZSTF9Toc38iKvdLKUAGd/G0k1Q+oyaNoLjxNLnnbN6q r2v1XmuMqPHnw6PglEcAx7Pp5EVYc19Dx2UGaBNfNFAa9BW/hywjjqb2085GlZ2sEND9 P8/A== X-Gm-Message-State: ALoCoQkR87ciHZAqI0PvMMrqU2g1FB3X6qz3s5oPa8Lb798jzgl+35RopIBbY9xUOT1FcC/Y5eZk X-Received: by 10.224.20.66 with SMTP id e2mr78037485qab.25.1412188777636; Wed, 01 Oct 2014 11:39:37 -0700 (PDT) Received: from [192.168.10.77] ([181.164.100.211]) by mx.google.com with ESMTPSA id p5sm1311961qah.3.2014.10.01.11.39.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 Oct 2014 11:39:36 -0700 (PDT) From: Gustavo Arjones Content-Type: multipart/alternative; boundary="Apple-Mail=_81228049-48CE-49DF-BB08-E53952E7C982" Message-Id: <3C6DF517-8A77-474C-AF73-EA402DF12730@socialmetrix.com> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Poor performance writing to S3 Date: Wed, 1 Oct 2014 15:39:32 -0300 References: To: "user@spark.apache.org" In-Reply-To: X-Mailer: Apple Mail (2.1878.6) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_81228049-48CE-49DF-BB08-E53952E7C982 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hi, I found the answer to my problem, and just writing to keep it as KB. Turns out the problem wasn=92t related to S3 performance, it was due my = SOURCE was not fast enough, due the lazy nature of Spark what I saw on = the dashboard was saveAsTextFile at FacebookProcessor.scala:46 instead = of the load method() When I ran count() on my dataset before trying to save it to S3 I could = figure out the input bottleneck. - gustavo On Sep 30, 2014, at 10:03 PM, Gustavo Arjones = wrote: > Hi, > I=92m trying to save about a million of lines containing statistics = data, something like: >=20 > 233815212529_10152316612422530 233815212529_10152316612422530 = 1328569332 1404691200 1404691200 1402316275 46 = 0 0 7 0 0 0 > 233815212529_10152316612422530 233815212529_10152316612422530 = 1328569332 1404694800 1404694800 1402316275 46 = 0 0 7 0 0 0 > 233815212529_10152316612422530 233815212529_10152316612422530 = 1328569332 1404698400 1404698400 1402316275 46 = 0 0 7 0 0 0 > 233815212529_10152316612422530 233815212529_10152316612422530 = 1328569332 1404702000 1404702000 1402316275 46 = 0 0 7 0 0 0 >=20 > Using the standard saveAsTextFile with an optional codec (GzipCodec) >=20 > postsStats.saveAsTextFile(s"s3n://smx-spark/...../raw_data", = classOf[GzipCodec]) >=20 > The resulting task is taking really long, i.e.: 3 hours to save 2Gb of = data. I found some references and blog posts about to increase RDD = partition to improve processing when READING from source. >=20 > The oposite operation would improve WRITE operation, I mean, if a = reduce the partitioning level can I avoid small file problem? > Is it possible that GzipCodec affecting parallelism level and reducing = the overall performance? >=20 > I have 4 nodes m1.xlarge (1 master + 3 workers) on EC2 - standalone = mode launched using spark-ec2script with version Spark 1.1.0 >=20 > Thanks a lot! > - gustavo --Apple-Mail=_81228049-48CE-49DF-BB08-E53952E7C982 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Hi,
I found the answer to my problem, and just = writing to keep it as KB.

Turns out the problem wasn=92t related to = S3 performance, it was due my SOURCE was not fast enough, due the lazy = nature of Spark what I saw on the dashboard was saveAsTextFile at = FacebookProcessor.scala:46 instead of the load method()

When I ran count() on my dataset before = trying to save it to S3 I could figure out the input = bottleneck.

-= gustavo


On Sep 30, 2014, at 10:03 PM, Gustavo Arjones <garjones@socialmetrix.com>= ; wrote:

Hi,
I=92m trying to save about a million of = lines containing statistics data, something = like:

233815212529_10152316612422530 =  233815212529_10152316612422530  1328569332     =  1404691200      1404691200     =  1402316275      46      0   =     0       7       0   =     0       0
233815212529_10152316612422530 =  233815212529_10152316612422530  1328569332     =  1404694800      1404694800     =  1402316275      46      0   =     0       7       0   =     0       0
233815212529_10152316612422530 =  233815212529_10152316612422530  1328569332     =  1404698400      1404698400     =  1402316275      46      0   =     0       7       0   =     0       0
233815212529_10152316612422530 =  233815212529_10152316612422530  1328569332     =  1404702000      1404702000     =  1402316275      46      0   =     0       7       0   =     0       = 0

Using the standard saveAsTextFile with an optional codec = (GzipCodec)

    postsStats.saveAsTextFile(s"s3n://smx-spark/...../raw_data= ", classOf[GzipCodec])

The resulting task is taking = really long, i.e.: 3 hours to save 2Gb of data. I found some references = and blog posts about to increase RDD partition to improve processing = when READING from source.

The oposite operation = would improve WRITE operation, I mean, if a reduce the partitioning = level can I avoid small file problem?
Is it = possible that GzipCodec affecting parallelism level and reducing the = overall performance?

I have 4 nodes = m1.xlarge (1 master + 3 workers) on EC2 - standalone mode = launched using spark-ec2script with version Spark = 1.1.0

Thanks a lot!
- = gustavo

= --Apple-Mail=_81228049-48CE-49DF-BB08-E53952E7C982--