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 5D6DB200C5D for ; Fri, 7 Apr 2017 18:43:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5BE5E160B97; Fri, 7 Apr 2017 16:43:56 +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 30BE4160B84 for ; Fri, 7 Apr 2017 18:43:55 +0200 (CEST) Received: (qmail 90742 invoked by uid 500); 7 Apr 2017 16:43:54 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 90728 invoked by uid 99); 7 Apr 2017 16:43:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2017 16:43:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B283E1A0C86 for ; Fri, 7 Apr 2017 16:43:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 5.174 X-Spam-Level: ***** X-Spam-Status: No, score=5.174 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HTML_MESSAGE=2, MANY_SPAN_IN_TEXT=1, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 9JPTBSW2UI50 for ; Fri, 7 Apr 2017 16:43:51 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C75B15F4AC for ; Fri, 7 Apr 2017 16:43:50 +0000 (UTC) Received: from static.162.255.23.37.macminivault.com (unknown [162.255.23.37]) by mbob.nabble.com (Postfix) with ESMTP id 8E0EC40B5195 for ; Fri, 7 Apr 2017 09:43:39 -0700 (PDT) Date: Fri, 7 Apr 2017 09:43:50 -0700 (MST) From: waterg To: user@ignite.apache.org Message-ID: In-Reply-To: References: <1491354593843-11729.post@n6.nabble.com> <1491414340455-11763.post@n6.nabble.com> Subject: Re: Disable WriteBehind MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18183_1722761287.1491583430305" archived-at: Fri, 07 Apr 2017 16:43:56 -0000 ------=_Part_18183_1722761287.1491583430305 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The entry point looks like this try(Ignite ignite = Ignition.start(getConfigFile())) { IgniteTransactions txs = ignite.transactions(); IgniteCache stagingCache = ignite.getOrCreateCache("stagingCache"); IgniteCache targetCache = ignite.getOrCreateCache("targetCache"); //Sequence number for guid IgniteAtomicSequence guidSeq = getGuidSeq(ignite, targetCache); applicationService service = new applicationService(targetCache, guidSeq); //load staging loadStaging(stagingCache); //process staging data SqlQuery sqlStg = new SqlQuery<>(StagingRec.class, getStagingSql()); try (QueryCursor> cursor = stagingCache.query(sqlStg)) { for (Cache.Entry e : cursor) { Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ); service.processStaging(e); // stagingCache.remove(e.getKey()); //remove entry from staging tx.commit(); } } }catch (Exception e) { e.printStackTrace(); } In service.processStaging, the logic looks like this: if (condition1) { targetCache.put(key, value); } else if (condition2) { targetCache.remove(key, value); targetCache.put(key2, value2); } Do you see anything that might be causing the issue? On Fri, Apr 7, 2017 at 2:26 AM, Nikolai Tikhonov-2 [via Apache Ignite Users] wrote: > Could you share code snippet which your benchmarked? > > On Fri, Apr 7, 2017 at 6:03 AM, waterg <[hidden email] > > wrote: > >> I have two caches. The application takes the first cache as input and >> output value to the second cache. >> >> The first cache has readThrough only. >> >> Part of the configurations for second caches are below: >> >> >> >> >> >> >> >> >> >> >> There are also two indexes on this cache. >> >> The other case is to set writeThrough and writeBehindEnabled to false. I >> didn't change other settings. >> Is there anything else that might be relevant to this case? >> >> Best, >> >> >> On Thu, Apr 6, 2017 at 10:33 AM, Nikolai Tikhonov-2 [via Apache Ignite >> Users] <[hidden email] >> > wrote: >> >>> It's strange. Could you share your configuration for both case? Also >>> could you describe more your case? >>> >>> On Wed, Apr 5, 2017 at 8:45 PM, waterg <[hidden email] >>> > wrote: >>> >>>> Thank you for the reply. >>>> Yes, I disabled both write through and write behind. >>>> We're trying evaluate the application's performance on ignite and by >>>> taking >>>> the persistent store out of equation, we thought the performance shall >>>> improve, but on the contrary we saw performance dropped over 30%. What >>>> would >>>> explain this kind of behavior? >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://apache-ignite-users.705 >>>> 18.x6.nabble.com/Disable-WriteBehind-tp11729p11763.html >>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >>>> >>> >>> >>> >>> ------------------------------ >>> If you reply to this email, your message will be added to the discussion >>> below: >>> http://apache-ignite-users.70518.x6.nabble.com/Disable-Write >>> Behind-tp11729p11789.html >>> To unsubscribe from Disable WriteBehind, click here. >>> NAML >>> >>> >> >> >> ------------------------------ >> View this message in context: Re: Disable WriteBehind >> >> >> Sent from the Apache Ignite Users mailing list archive >> at Nabble.com. >> > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://apache-ignite-users.70518.x6.nabble.com/Disable- > WriteBehind-tp11729p11799.html > To unsubscribe from Disable WriteBehind, click here > > . > NAML > > -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-WriteBehind-tp11729p11827.html Sent from the Apache Ignite Users mailing list archive at Nabble.com. ------=_Part_18183_1722761287.1491583430305 Content-Type: text/html; charset=UTF8 Content-Transfer-Encoding: quoted-printable

The entry point looks like this

   try(Ignite ignite =3D Ignition.start(getConfigFile())) {

Ignit= eTransactions txs =3D ignite.transactions();
= IgniteCache<String, StagingRec> stagingCache = =3D ignite.getOrCreateCache("sta= gingCache");
IgniteCache<Strin= g, TargeRec> targetCache = =3D ignite.getOrCreateCache("tar= getCache");
//Sequence number for guid
IgniteAtomicSequence guidSeq =3D getG= uidSeq(ignite, targetCache);
applicationService service =3D new applicationService(targetCache, guidSeq);
//load staging
loadStaging(stagingCache)<= span style=3D"color:rgb(204,120,50)">;

//process staging data
SqlQuery<Str= ing,stagingRec> sqlStg =3D new SqlQuery<>(StagingRec.cl= ass, getStagingSql());
try (QueryCurso= r<Cache.Entry<String, StagingRec>> curs= or =3D stagingCache.query(sqlStg)) {

for (Cache.Entry<String, = StagingRec> e : cursor) {
Transaction tx = =3D txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)= ;
service.processStaging(e);
// stagingCache= .remove(e.getKey()); //remove entry from staging
tx.commit();
= }
}
}catch (Exception e) {
e.printStackTra= ce();
}
In service.processStaging, the = logic looks like this:

if (condition1) {
=C2=A0 =C2=A0 =C2=A0 targetCache.put(key, value);
} else i= f (condition2) {
=C2=A0 =C2=A0 =C2=A0 targetCache.remove(key, val= ue);
=C2=A0 =C2=A0 =C2=A0 targetCache.put(key2, value2);
}

Do you see anything that might be causing the = issue?

On Fri, Apr 7, 2017 at 2:26 AM, Nikolai Tikhonov-2 [via Apache Ignite User= s] <[hidden ema= il]> wrote:
=09
Could you share code snippet which your benchmarked?

On Fri, Apr 7, 2017 at 6:03 AM, waterg <[hidden email]><= /span> wrote:
I have two caches. = The application takes the first cache as input and output value to the seco= nd cache.

The first cache has readThrough only.

Part of the configurations for second caches are bel= ow:
<!-- Enable readThrough-->
<property name=3D"r= eadThrough" value=3D"true"/>
<property name=3D<= /span>"writeThrough" value=3D"true"/>
<property name=3D"writeBehindEnabled" value=3D"true"/>
<property name=3D"writeBehindFlushSize" value=3D"499&quo= t;/>
<property name=3D"Write= BehindFlushFrequency" value=3D"0"/>
<property name=3D"writeBehindFl= ushThreadCount" val= ue=3D"1"/>
<property na= me=3D"writeBehindBatchSiz= e" value=3D"500"/>
There are also two indexes o= n this cache.

The other case is to set writeThroug= h and writeBehindEnabled to false. I didn't change other settings.
Is there anything else that might be relevant to this case?

Best,


On Thu, Apr 6,= 2017 at 10:33 AM, Nikolai Tikhonov-2 [via Apache Ignite Users] <[hidde= n email]> wrote:
=09
It's strange. Could you share your configuration fo= r both case? Also could you describe more your case?

On Wed, = Apr 5, 2017 at 8:45 PM, waterg <[hidden email]> wrote:
<= /span>
Thank you for the reply.
Yes, I disabled both write through and write behind.
We're trying evaluate the application's performance on ignite and b= y taking
the persistent store out of equation, we thought the performance shall
improve, but on the contrary we saw performance dropped over 30%. What woul= d
explain this kind of behavior?



--
View this message in context: http://apache-ignite-users.70518.x6.na= bble.com/Disable-WriteBehind-tp11729p11763.html
Sent from the Apache Ignite Users mailing list archive at Nab= ble.com.

=09 =09 =09 =09
=09
=09
=09
=09=09
If you reply to this email, your mess= age will be added to the discussion below:
=09=09
http://apache-ignite-users.70518.x6.nabble.com/Disable-W= riteBehind-tp11729p11789.html =09
=09
=09=09 =09=09To unsubscribe from Disable WriteBehind, click here.
=09=09NAML =09

=09 =09 =09

View this message in context: Re: Disable WriteBehind

Sent from the Apache Ignite Users mai= ling list archive at Nabble.com.

=09 =09 =09 =09
=09
=09
=09
=09=09
If you reply to this email, your mess= age will be added to the discussion below:
=09=09
http://apache-ignite-users.70518.x6.nabble.com/Disable-<= wbr>WriteBehind-tp11729p11799.html =09
=09
=09=09 =09=09To unsubscribe from Disable WriteBehind, click here.
=09=09NAML =09

=09 =09 =09

View this message in context: Re: Disable WriteBehin= d
Sent from the A= pache Ignite Users mailing list archive at Nabble.com.
------=_Part_18183_1722761287.1491583430305--