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 6E736200C86 for ; Wed, 31 May 2017 11:29:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6D081160BDB; Wed, 31 May 2017 09:29:50 +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 B4420160BBA for ; Wed, 31 May 2017 11:29:49 +0200 (CEST) Received: (qmail 173 invoked by uid 500); 31 May 2017 09:29:49 -0000 Mailing-List: contact dev-help@tephra.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tephra.incubator.apache.org Delivered-To: mailing list dev@tephra.incubator.apache.org Received: (qmail 149 invoked by uid 99); 31 May 2017 09:29:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2017 09:29:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DB8BBC28E3 for ; Wed, 31 May 2017 09:29:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.397 X-Spam-Level: X-Spam-Status: No, score=-2.397 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id OaCkLelvcz0m for ; Wed, 31 May 2017 09:29:47 +0000 (UTC) Received: from mail-pg0-f43.google.com (mail-pg0-f43.google.com [74.125.83.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C73BA5F295 for ; Wed, 31 May 2017 09:29:46 +0000 (UTC) Received: by mail-pg0-f43.google.com with SMTP id x64so5415266pgd.3 for ; Wed, 31 May 2017 02:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=V6Mzu/4CnFd6K3KK+msVxH4XXFNJwnyPwyvvywT5Gh0=; b=pjKfkP28sYzzuHVZaja/7Y6H/17Mp/7ShwMvpPdyP1VjyDUWhk0crUrlXC3srH+Zbq vSPwPkRYs6OYoJN8+4Czq3M3V4Fkmc5RSkpeOYSfEuaNW/bNe9IaaUC5WgF7d0frmgx1 ufqfDTOq92Q99ywuXDqezSkSK+hojalmhOrQK4rcvfSPe7NIa8gTpGgYwrn7mgElKg3W AaNsHXDg9BX3HZNVMa6tacthBYTDn5QORPQbKK+WgZl5wY6xSmw/Sd/5zuuau4HPQA2C J0EJ4jAxCBB3B/g6XUfFduUW3Mw9tfhTsLgSKbe5yEh+LTH3TZIDHKWBdeyOsGCQWTdq ewvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=V6Mzu/4CnFd6K3KK+msVxH4XXFNJwnyPwyvvywT5Gh0=; b=Y8RiVTgV2swFctlDyrUxDTWAM8zjK8/QjNx6/uLsg9lidrvCmsYE90GfigvueMk1Rh r8L/DmbzQ2/VJ+dzKDqWeLM4z2CuuOhN0GjMQCgbVDg/8YoO3rQaNrJl1bl9zpfgf1xb 5DsCGAq5aBPJz/5nIA3j4lFCVYHN3dJc1Xcc0VXflZZo+wwJjK8cCTUUghTTViJSDI+h dxItbQugMdHmL4v04gZbuM2GWDIn1UUeYO/3pLH9307xoR7nOmzsOre7H98wyPPuuFMv Os8vOCoemcuaTxVveDp63fC6f2pEtj34816UDyUxeVwGmr4Rg8i8mB8XB4Y6PW2dNqub m3Gg== X-Gm-Message-State: AODbwcA/YwV0GJ2zoaAE1TgreQ0uc2ZyvlAIeM8cpQ76Ej5EO4R1DY9A X3ulaRu4AmIx3Yq0ChQ= X-Received: by 10.98.60.8 with SMTP id j8mr28341896pfa.72.1496222979719; Wed, 31 May 2017 02:29:39 -0700 (PDT) Received: from ?IPv6:2602:302:d1c8:e590:54ac:321a:a461:34b8? ([2602:302:d1c8:e590:54ac:321a:a461:34b8]) by smtp.gmail.com with ESMTPSA id h15sm28024390pfk.120.2017.05.31.02.29.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 02:29:37 -0700 (PDT) From: Terence Yim Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: TransactionCodec poor performance Date: Wed, 31 May 2017 02:29:36 -0700 References: To: dev@tephra.incubator.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) archived-at: Wed, 31 May 2017 09:29:50 -0000 Hi Micael, Do you know if the invalid tx list inside the Transaction object is = large? Terence > On May 31, 2017, at 1:49 AM, Micael Capit=C3=A3o = wrote: >=20 > Hi all, >=20 > I've been testing Tephra 0.11.0 for a project that may need = transactions on top of HBase and I find it's performance, for instance, = for a bulk load, very poor. Let's not discuss why am I doing a bulk load = with transactions. >=20 > In my use case I am generating batches of ~10000 elements and = inserting them with the *put(List puts)* method. There is no = concurrent writers or readers. > If I do the put without transactions it takes ~0.5s. If I use the = *TransactionAwareHTable* it takes ~12s. > I've tracked down the performance killer to be the = *addToOperation(OperationWithAttributes op, Transaction tx)*, more = specifically the *txCodec.encode(tx)*. >=20 > I've created a TransactionAwareHTableFix with the = *addToOperation(txPut, tx)* commented, and used it in my code, and each = batch started to take ~0.5s. >=20 > I've noticed that inside the *TransactionCodec* you were instantiating = a new TSerializer and TDeserializer on each call to encode/decode. I = tried instantiating the ser/deser on the constructor but even that way = each of my batches would take the same ~12s. >=20 > Further investigation has shown me that the Transaction instance, = after being encoded by the TransactionCodec, has 104171 bytes of length. = So in my 10000 elements batch, ~970MB is metadata. Is that supposed to = happen? >=20 >=20 > Regards, >=20 > Micael Capit=C3=A3o