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 82F4D200C68 for ; Wed, 3 May 2017 16:46:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 818A8160BBA; Wed, 3 May 2017 14:46:48 +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 A28C3160BAA for ; Wed, 3 May 2017 16:46:47 +0200 (CEST) Received: (qmail 67967 invoked by uid 500); 3 May 2017 14:46:46 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 67957 invoked by uid 99); 3 May 2017 14:46:46 -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; Wed, 03 May 2017 14:46:46 +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 49ACF191B9F for ; Wed, 3 May 2017 14:46:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.681 X-Spam-Level: * X-Spam-Status: No, score=1.681 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_IMAGE_ONLY_32=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id EmQSoUYcSg-3 for ; Wed, 3 May 2017 14:46:45 +0000 (UTC) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5DF125F5CA for ; Wed, 3 May 2017 14:46:44 +0000 (UTC) Received: by mail-it0-f50.google.com with SMTP id c15so68788270ith.0 for ; Wed, 03 May 2017 07:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=kLV7gyf8axCb4bt99D0hEloM8h75iuTez+MupTe6xs4=; b=mrI3NM6kzTL2p1UuSpMILIqR9W9jwvGqKK+1aQ+dhpj7lutEUENZTcIeT7H/gYSzX7 Nj4MNgF5/LdzZm4Q5adM5jwB+0dcrT/Z1ulxW9VxVsBWCJoUzLNgJ3XJW8LEXz9oTxuD wbasM9dDCcLhjp30uqVqIsE+DoYEp6bMI4Ip3T3O2AzJqkKYaOJ9m4NRNHVomsm9PTao yMkcLclWFDr5EREvNGpph2dklLtLHHJGNGwt1oP8Z+YqPi7eWKUJ1UseEDU54ZD/4JfI 16A1yT5xmAGanjKToYA0VQdjnW5Bw1D74cvwe2KjugmW6XF5PUXpigJAsNGVlO73O5Px 5AXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kLV7gyf8axCb4bt99D0hEloM8h75iuTez+MupTe6xs4=; b=HLa1PWY74v4bUkytS3ArZMY6rpYwWJ1kmgxp1no7Mh3dri5/5owhYil9ShXInM8RqM Araai46fyR3TG6nPmL68QINMt5aUR3GXfPQKbumClY03mR8NR5D9yBWsmP4bOkOZhFXF SPiNTEq6qyBJx576EBSN2RxCRKr8x0nvosnrGZ9/9EJkrBxBNUVNq17fuDmPUviAkBgn qJSAm6goLkK/aHvNJmJXIxo3vsdZQlPtQNEloHKrlhyp+7lPk3Es234Xj/q7or2SU9+i hl5kGQPPji5tfoqj4zBmF5wUEDRb6BgDMTwG4AIivP+heI7oql4g3XXCVOsgW9caEI4L rv0Q== X-Gm-Message-State: AN3rC/59xkTF8Cu9w61aaZv5hlN/Qj19+trKyFSw5pLa2UKNffn3aJWl 0UC0jzKmUHCkpedzJTFRvvK0/1WS1rzT X-Received: by 10.36.238.196 with SMTP id b187mr939457iti.26.1493822803158; Wed, 03 May 2017 07:46:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.142.207 with HTTP; Wed, 3 May 2017 07:46:42 -0700 (PDT) From: Jason Brelloch Date: Wed, 3 May 2017 10:46:42 -0400 Message-ID: Subject: Tuning RocksDB To: user@flink.apache.org Content-Type: multipart/alternative; boundary=f403045c0e728a2c1d054e9fb96e archived-at: Wed, 03 May 2017 14:46:48 -0000 --f403045c0e728a2c1d054e9fb96e Content-Type: text/plain; charset=UTF-8 Hey all, I am looking for some advice on tuning rocksDB for better performance in Flink 1.2. I created a pretty simple job with a single kafka source and one flatmap function that just stores 50000 events in a single key of managed keyed state and then drops everything else, to test checkpoint performance. Using a basic FsStateBackend configured as: val backend = new FsStateBackend("file:///home/jason/flink/checkpoint") env.setStateBackend(backend) With about 30MB of state we see the checkpoints completing in 151ms. Using a RocksDBStateBackend configured as: val backend = new RocksDBStateBackend("file:///home/jason/flink/checkpoint") backend.setDbStoragePath("file:///home/jason/flink/rocksdb") backend.setPredefinedOptions(PredefinedOptions.FLASH_SSD_OPTIMIZED) env.setStateBackend(backend) Running the same test the checkpoint takes 3 minutes 42 seconds. I expect it to be slower, but that seems excessive. I am also a little confused as to when rocksDB and flink decide to write to disk, because watching the database the .sst file wasn't created until significantly after the checkpoint was completed, and the state had not changed. Is there anything I can do to increase the speed of the checkpoints, or anywhere I can look to debug the issue? (Nothing seems out of the ordinary in the flink logs or rocksDB logs) Thanks! -- *Jason Brelloch* | Product Developer 3405 Piedmont Rd. NE, Suite 325, Atlanta, GA 30305 Subscribe to the BetterCloud Monitor - Get IT delivered to your inbox --f403045c0e728a2c1d054e9fb96e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hey all,

I am looking for some advice o= n tuning rocksDB for better performance in Flink 1.2.=C2=A0 I created a pre= tty simple job with a single kafka source and one flatmap function that jus= t stores 50000 events in a single key of managed keyed state and then drops= everything else, to test checkpoint performance.=C2=A0 Using a basic FsSta= teBackend configured as:

val backend =3D new = FsStateBackend("file:///home/jason/flink/checkpoint")
e= nv.setStateBackend(backend)

With about 30MB of= state we see the checkpoints completing in 151ms.=C2=A0 Using a RocksDBSta= teBackend configured as:

val backend =3D new Rocks= DBStateBackend("file:///home/jason/flink/checkpoint")
backend.setDbStoragePath("file:///home/jason/flink/rocksdb")
backend.setPredefinedOptions(PredefinedOptions.FLASH_SSD_OPTIMIZED= )
env.setStateBackend(backend)

Running t= he same test the checkpoint takes 3 minutes 42 seconds.

I expect it to be slower, but that seems excessive.=C2=A0 I am also a= little confused as to when rocksDB and flink decide to write to disk, beca= use watching the database the .sst file wasn't created until significan= tly after the checkpoint was completed, and the state had not changed.=C2= =A0 Is there anything I can do to increase the speed of the checkpoints, or= anywhere I can look to debug the issue? =C2=A0(Nothing seems out of the or= dinary in the flink logs or rocksDB logs)

Thanks!<= /div>

--
= Jason Brelloch=C2=A0| Product Developer=
3405 Pi= edmont Rd. NE, Suite 325, Atlanta, GA 30305=C2=A0
3D""
Subscribe to the BetterCloud Mo= nitor=C2=A0- Get IT delivered to your inbox
--f403045c0e728a2c1d054e9fb96e--