From user-return-18719-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Apr 2 13:58:59 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5AE7F180627 for ; Mon, 2 Apr 2018 13:58:57 +0200 (CEST) Received: (qmail 51578 invoked by uid 500); 2 Apr 2018 11:58:51 -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 51568 invoked by uid 99); 2 Apr 2018 11:58:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2018 11:58:51 +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 7E45CC1A44 for ; Mon, 2 Apr 2018 11:58:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.08 X-Spam-Level: **** X-Spam-Status: No, score=4.08 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, KAM_LINEPADDING=1.2, KAM_SHORT=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jFWIzjwt6dKN for ; Mon, 2 Apr 2018 11:58:46 +0000 (UTC) Received: from mail-vk0-f67.google.com (mail-vk0-f67.google.com [209.85.213.67]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 84CA45F19A for ; Mon, 2 Apr 2018 11:58:46 +0000 (UTC) Received: by mail-vk0-f67.google.com with SMTP id n64so4879966vkf.12 for ; Mon, 02 Apr 2018 04:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=DtGt2OY1dNgVwhEK2eRr4glGlEWFbPO8j0Zpb8h9IM0=; b=H8zflyyyq4gSH7Es+Sq3ClrW0S5p6XwG0K55qi5iNTv52JoGspIAkVcWdv5P+uWjax UyX32yVEfWlQcwwQnvPB6Uty374VMd2xcxifr+4KtS8UGWSkBqyVKRKpZKGka0vt1rEb kq0CiHHR08mE88I7e218IlES0WDVLQH9vVb397nP6YGRbKxdaG3lfvuAvWyJw/JTNrd4 7Am9pblWi+mMPS8kX2FR4W3jphYdP3bTZRix/xsSUzAdJzYvagOgeod+F5nT6JZEG6uL 6WqTaS3nMo06vZROZFEBnBjDO6rtgv4jaErmHZxPz7+EkWxrTB4x71LGORgjwoQvMncf 6rrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=DtGt2OY1dNgVwhEK2eRr4glGlEWFbPO8j0Zpb8h9IM0=; b=BnXm0XSCgX4nqEiC+d9jjeW/9ZofHATG3gPrRbhf/ib36YYv837wNtep8p+RaDBpUh PhBnGyHAdnCNxyCaesubdfynhlanR8XSNbynvYxm4Te8IrqO1aX0+o9iZl4s+wRTUlXR p0tvEGhTFJ+o0Do/e+XmGvd76B50/9WtOuoAbpf5D7kDDq+Ak7Tws6/Ey3b6DIbhqkS8 cG+cS7lEjJKkVR//gTH/LLr9aAd/oGz/fbfwc7X4Phpix0Pmv1Nf1VjDA+aAVcQsLxSo DYtq0nXFEphOomo+zmTNjn0u9UrrycSHCf5jRhYItCPj7don7obbLQsPTnbd/8uPITUQ OnuQ== X-Gm-Message-State: ALQs6tDC0Aq1GwHWU6GRaCdFpF7MKt2p0kTUT+T+ZgJK8qbpj/UvYwYf TXHsWFIHtDys7ajGfAHyk869guuzognamyC3xGA= X-Google-Smtp-Source: AIpwx48MQX/obSPytfbQ8s2wRPM9ySvzD/zMIRT4D/emxPYiLqZQT2kidlnryHgDx38VDj04o/+SuRhg9Fe17VySKUM= X-Received: by 10.31.164.2 with SMTP id n2mr4182503vke.176.1522670325821; Mon, 02 Apr 2018 04:58:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.49.9 with HTTP; Mon, 2 Apr 2018 04:58:45 -0700 (PDT) In-Reply-To: <834ba019ec6d42739652a179f5e5e17d@EXMB02.ITRI.DS> References: <834ba019ec6d42739652a179f5e5e17d@EXMB02.ITRI.DS> From: Andrey Mashenkov Date: Mon, 2 Apr 2018 14:58:45 +0300 Message-ID: Subject: Re: Performance of Ignite integrating with PostgreSQL To: user@ignite.apache.org Content-Type: multipart/alternative; boundary="001a114166f0e183ba0568dc4fa8" --001a114166f0e183ba0568dc4fa8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, 1. Have you tried to test your disk write speed? it is possible it was formatted with no align respect. 2. Have you tried to check if there is any Postgres issues? E.g. via querying postgres directly. Do you see higher disk pressure? 3. Is it possible you generate data too slowly? Have you tries to run a multi-threaded test? On Tue, Mar 27, 2018 at 12:44 PM, wrote: > Hi Vinokurov, > > > > I tried to run your code for 30 minutes monitored by =E2=80=9Catop=E2=80= =9D. > > And the average write speed is about 2151.55 KB per second. > > Though the performance is better. > > But there is still a gap with your testing result. > > Is there anything I can improve? > > Thanks. > > > > There is my hardware specifications. > > CPU: > > Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz > > 4 cores > > Memory: > > 16 GB > > > > Atop observations: > > disk busy read/s KB/read writ/s KB/writ avque avserv > _dsk_ > > sda 89% 29.7 14.8 116.3 18.5 13.1 6.13 ms > > > > > > Print out parts of time per putAll: > > 221ms > > 23ms > > 22ms > > 60ms > > 56ms > > 71ms > > 140ms > > 105ms > > 117ms > > 69ms > > 91ms > > 89ms > > 32ms > > 271ms > > 24ms > > 23ms > > 55ms > > 90ms > > 69ms > > 1987ms > > 337ms > > 316ms > > 322ms > > 339ms > > 101ms > > 170ms > > 22ms > > 41ms > > 43ms > > 110ms > > 668ms > > 29ms > > 27ms > > 28ms > > 24ms > > 22ms > > > > > > *From:* Pavel Vinokurov [mailto:vinokurov.pasha@gmail.com > ] > *Sent:* Thursday, March 22, 2018 11:07 PM > *To:* user@ignite.apache.org > *Subject:* Re: Performance of Ignite integrating with PostgreSQL > > > > In your example you add the same key/values into cache, so it's just > overwrites entries and persists only 100 entries. > > Please look at the project https://bitbucket.org/vinokurov-pavel/ignite- > postgres . I have ~70-100 Mb/s on my SSD. > > > > 2018-03-22 11:55 GMT+03:00 : > > Hi Vinokurov, > > > > I changed my code > > >> IgniteCache igniteCache =3D ignite.getOrCreateCache("t= estCache > "); > > To > > IgniteCache igniteCache =3D ignite.cache("testCache"); > > And update to 2.4.0 version. > > > > But the writing speed is still about 100 KB per second. > > > > > > Below is jdbc connection initialization: > > @Autowired > > public NamedParameterJdbcTemplate jdbcTemplate; > > @Override > > public void start() throws IgniteException { > > ConfigurableApplicationContext context =3D new ClassPathXmlApplicationCon= text > ("postgres-context.xml"); > > this.jdbcTemplate =3D context.getBean(NamedParameterJdbcTemplate.class); > > } > > > > > > The PostgreSQL configuration, =E2=80=9Cpostgres-context.xml=E2=80=9D : > > > > > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" > > xmlns:context=3D"http://www.springframework.org/schema/context" > > xsi:schemaLocation=3D" > > http://www.springframework.org/schema/beans > > http://www.springframework.org/schema/beans/spring-beans.xsd > > http://www.springframework.org/schema/context > > http://www.springframework.org/schema/context/spring-context.xsd"> > > > > > > > > > > DriverManagerDataSource"> > > > > > > > > > > > > > class=3D"org.springframework.jdbc.core.namedparam. > NamedParameterJdbcTemplate"> > > > > > > > > > > > > > > Thanks. > > > > > > *From:* Vinokurov Pavel [mailto:vinokurov.pasha@gmail.com] > *Sent:* Thursday, March 22, 2018 1:50 PM > > > *To:* user@ignite.apache.org > *Subject:* Re: Performance of Ignite integrating with PostgreSQL > > > > Also it makes sense to use new 2.4 version. > > > > 2018-03-22 8:37 GMT+03:00 Vinokurov Pavel : > > >> IgniteCache igniteCache =3D ignite.getOrCreateCache("t= estCache > "); > > please, change to ignite.cache("testCache") to be sure the we use > configuration from the file. > > > > 2018-03-22 8:19 GMT+03:00 Vinokurov Pavel : > > You already showed the cache configuration, but could you show jdbc > connection initialization > > > > 2018-03-22 7:59 GMT+03:00 Vinokurov Pavel : > > Hi, > > > > Could you please show the "PATH/example-cache.xml" file. > > > > 2018-03-21 9:40 GMT+03:00 : > > Hi Vinokurov, > > > > Thanks for your reply. > > I try to write batches by 100 entries. > > And I got a worse result. > > The writing speed is down to 12.09 KB per second. > > Below is my code which I try to use putAll and writeAll to rewrite. > > Did I make some mistakes? > > > > > > > > Main function: > > Ignite ignite =3D Ignition.start("PATH/example-cache.xml"); > > IgniteCache igniteCache =3D ignite.getOrCreateCac= he("testCache > "); > > for(int i =3D 0; i < 100; i++) > > { > > parameterMap.put(Integer.toString(i), "writeAll_val"); > > } > > > > while(true) > > { > > igniteCache.putAll(parameterMap); > > } > > > > > > Write all to PostgreSQL through JDBC: > > @Override > > public void writeAll(Collection String>> entries) throws CacheWriterException { > > Iterator> it =3D > entries.iterator(); > > Map parameterMap =3D new HashMap<>(); > > int count =3D 1; > > while (it.hasNext()) { > > Cache.Entry entry =3D it.next(); > > String valCount =3D "val"; > > valCount +=3D Integer.toString(count); > > parameterMap.put(valCount, entry.getValue()); > > count++; > > it.remove(); > > } > > > > String sqlString =3D "INSERT INTO test_writeall(val) VALUES " > > + "(:val1),(:val2),(:val3),(: > val4),(:val5),(:val6),(:val7),(:val8),(:val9),(:val10)," > > + "(:val11),(:val12),(:val13),(: > val14),(:val15),(:val16),(:val17),(:val18),(:val19),(:val20)," > > + "(:val21),(:val22),(:val23),(: > val24),(:val25),(:val26),(:val27),(:val28),(:val29),(:val30)," > > + "(:val31),(:val32),(:val33),(: > val34),(:val35),(:val36),(:val37),(:val38),(:val39),(:val40)," > > + "(:val41),(:val42),(:val43),(: > val44),(:val45),(:val46),(:val47),(:val48),(:val49),(:val50)," > > + "(:val51),(:val52),(:val53),(: > val54),(:val55),(:val56),(:val57),(:val58),(:val59),(:val60)," > > + "(:val61),(:val62),(:val63),(: > val64),(:val65),(:val66),(:val67),(:val68),(:val69),(:val70)," > > + "(:val71),(:val72),(:val73),(: > val74),(:val75),(:val76),(:val77),(:val78),(:val79),(:val80)," > > + "(:val81),(:val82),(:val83),(: > val84),(:val85),(:val86),(:val87),(:val88),(:val89),(:val90)," > > + "(:val91),(:val92),(:val93),(: > val94),(:val95),(:val96),(:val97),(:val98),(:val99),(:val100);"; > > > > jdbcTemplate.update(sqlString, parameterMap); > > } > > > > > > > > *From:* Vinokurov Pavel [mailto:vinokurov.pasha@gmail.com] > *Sent:* Wednesday, March 14, 2018 5:42 PM > *To:* user@ignite.apache.org > *Subject:* Re: Performance of Ignite integrating with PostgreSQL > > > > Hi, > > > > You could try to use igniteCache.putAll for write batches by 1000 > entries. > > Use following script in PostgresDBStore#writeAll method to put data into > the database: > > String sqlString =3D "INSERT INTO test(val) VALUES (:val1)(:val2)(:val3);= "; > > > > > > 2018-03-14 11:58 GMT+03:00 : > > Hi, > > I try to use Ignite to integrate with PostgreSQL. > > And I use =E2=80=9Catop=E2=80=9D to monitor the data write to PostgreSQL. > > Then observed that the writing speed is 1 MB per second. > > This performance is not really good. Below is my configuration and code. > Please help me to improve it. > > Thanks. > > > > There is my cache configuration: > > configuration.CacheConfiguration"> > > "testCache"/> > > value=3D"PARTITIONED"/> > > value=3D" ATOMIC"/> > > value=3D"PRIMARY"/> > > > > value=3D"true"/> > > value=3D"true"/> > > > > value=3D"64"/> > > value=3D"131072" /> > > value=3D"131072" /> > > > > > > > > configuration.FactoryBuilder$SingletonFactory"> > > > > PostgresDBStore"> > > > > > > > > > > > > > > > > > java.lang.String > > > java.lang.String > > > > > > > > > > > > Main function: > > Ignite ignite =3D Ignition.start("PATH/example-cache.xml"); > > IgniteCache igniteCache =3D ignite.getOrCreateCac= he("testCache > "); > > int seqint =3D 0; > > while(true) > > { > > igniteCache.put(Integer.toString(seqint), > "valueString"); > > seqint++; > > } > > > > > > Write behind to PostgreSQL through JDBC: > > @Override > > public void write(Cache.Entry entry) > throws CacheWriterException { > > Map parameterMap =3D new HashMap<>(); > > parameterMap.put(=E2=80=9Cval=E2=80=9D, entry.getValue()); > > String sqlString =3D "INSERT INTO test(val) VALUES (:val);"; > > jdbcTemplate.update(sqlString, parameterMap); > > } > > > > > > -- > =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5=B7=A5= =E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D=9E=E6= =8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B=E5=8B= =BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4=BB=B6= =E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD=A4=E4= =BF=A1=E4=BB=B6=E3=80=82 This email may contain > confidential information. Please do not use or disclose it in any way and > delete it if you are not the intended recipient. > > > > > > -- > > Regards > > Pavel Vinokurov > > > > -- > =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5=B7=A5= =E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D=9E=E6= =8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B=E5=8B= =BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4=BB=B6= =E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD=A4=E4= =BF=A1=E4=BB=B6=E3=80=82 This email may contain > confidential information. Please do not use or disclose it in any way and > delete it if you are not the intended recipient. > > > > > > -- > > Regards > > Pavel Vinokurov > > > > > > -- > > Regards > > Pavel Vinokurov > > > > > > -- > > Regards > > Pavel Vinokurov > > > > > > -- > > Regards > > Pavel Vinokurov > > > > -- > =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5=B7=A5= =E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D=9E=E6= =8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B=E5=8B= =BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4=BB=B6= =E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD=A4=E4= =BF=A1=E4=BB=B6=E3=80=82 This email may contain > confidential information. Please do not use or disclose it in any way and > delete it if you are not the intended recipient. > > > > > > -- > > Regards > > Pavel Vinokurov > > > > -- > =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5=B7=A5= =E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D=9E=E6= =8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B=E5=8B= =BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4=BB=B6= =E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD=A4=E4= =BF=A1=E4=BB=B6=E3=80=82 This email may contain > confidential information. Please do not use or disclose it in any way and > delete it if you are not the intended recipient. > > > -- > =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5=B7=A5= =E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D=9E=E6= =8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B=E5=8B= =BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4=BB=B6= =E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD=A4=E4= =BF=A1=E4=BB=B6=E3=80=82 This email may contain > confidential information. Please do not use or disclose it in any way and > delete it if you are not the intended recipient. > --=20 Best regards, Andrey V. Mashenkov --001a114166f0e183ba0568dc4fa8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

1. Have you tried to test you= r disk write speed? it is possible it was formatted with no align respect.<= div>2. Have you tried to check if there is any Postgres issues? E.g. via qu= erying postgres directly. Do you see higher disk pressure?
3. Is = it possible you generate data too slowly? Have you tries to run a multi-thr= eaded test?



On Tue, Mar 27, 2018 at 12:44 PM, <itriA40453@itri.org.tw> wrote:

Hi Vinokurov,

= =C2=A0

I tried= to run your code for 30 minutes monitored by =E2=80=9Catop=E2=80=9D.

And the= average write speed is about 2151.55 KB per second.

Though = the performance is better.

But the= re is still a gap with your testing result.

Is ther= e anything I can improve?

Thanks.=

= =C2=A0

There i= s my hardware specifications.

CPU:=

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 4 cores

Memory:=

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 16 GB

= =C2=A0

Atop ob= servations:

disk=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 busy=C2=A0=C2=A0 = read/s KB/read=C2=A0 writ/s=C2=A0=C2=A0 KB/writ=C2=A0 avque=C2=A0 avserv=C2= =A0=C2=A0=C2=A0=C2=A0 _dsk_

sda=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 89%=C2=A0= =C2=A0=C2=A0 29.7=C2=A0=C2=A0=C2=A0 14.8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 116.= 3=C2=A0=C2=A0=C2=A0 18.5=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 13.1=C2=A0=C2=A0 6.1= 3 ms

= =C2=A0

= =C2=A0

Print o= ut parts of time per putAll:

221ms

23ms=

22ms=

60ms=

56ms=

71ms=

140ms

105ms

117ms

69ms=

91ms=

89ms=

32ms=

271ms

24ms=

23ms=

55ms=

90ms=

69ms=

1987ms<= u>

337ms

316ms

322ms

339ms

101ms

170ms

22ms=

41ms=

43ms=

110ms

668ms

29ms=

27ms=

28ms=

24ms=

22ms=

=C2=A0

=C2=A0

From: Pavel Vinokurov [mailto:vinokurov.pasha@gmail.com]

Sent: Thursday, March 22, 2018 11:07 PM
To: user= @ignite.apache.org
Subject: Re: Performance of Ignite integrating with PostgreSQL

=C2=A0

In your example you add the sam= e key/values into cache, so it's just overwrites entries and persists o= nly 100 entries.

Please look at the proje= ct https://bitbucket.org/vinokurov-pa= vel/ignite-postgres . I have ~70-100 Mb/s on my SSD.=

=C2=A0

2018-03-22 11:55 GMT+03:00 <= itriA40453@itri= .org.tw>:

Hi Vinokurov,

=C2=A0<= /span>

I chang= ed my code

>>= IgniteCache<String, String> igniteCache =3D ignite.getOrCreateCache(= "testCache ");

To

IgniteC= ache<String, String> igniteCache =3D ignite.cache("testCache");<= /span>

And upd= ate to 2.4.0 version.

=C2=A0<= /span>

But the= writing speed is still about 100 KB per second.

=C2=A0<= /span>

=C2=A0<= /span>

Below i= s jdbc connection initialization:=

@Autowi= red

public = NamedParameterJdbcTemplate jdbcTemplate;=

@Overri= de

public = void start() throws IgniteException {=

ConfigurableApplicationContext= context =3D new ClassPathXmlApplicationContext("postgres-context= .xml");

this.jdbcTemplate =3D context.= getBean(NamedParameterJdbcTemplate.class);

}

=C2=A0<= /span>

=C2=A0<= /span>

The Pos= tgreSQL configuration, =E2=80=9Cpostgres-context.xml=E2= =80=9D :

<?xm= l version=3D"1.0" encoding=3D"UTF-8"?>

<bea= ns xmlns=3D"http://www.springframework.org/schema/beans"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xmlns:xsi=3D"<= span style=3D"font-size:10.0pt;font-family:"Verdana",sans-serif;b= ackground:white">http://www.w3.org/2001/XMLSchema-instance<= /span>"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xmlns:context=3D"http://www.springframework.org/schema/co= ntext"<= /span>

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xsi:schemaLocation=3D"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http://www.springframework.org/schema/beans

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http://www.sp= ringframework.org/schema/beans/spring-beans.xsd=

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http://www.springframework.<= wbr>org/schema/context

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http://ww= w.springframework.org/schema/context/spring-context.xsd">

=C2=A0<= /span>

=C2=A0= =C2=A0=C2=A0 <context:component-scan base-package=3D"com.blu.imdg.<= wbr>jdbc"/>

=C2=A0= =C2=A0=C2=A0 <context:property-placeholder location=3D"classpath:jd= bc.properties"/>

=C2=A0<= /span>

=C2=A0= =C2=A0=C2=A0 <bean id=3D"dataSource" class=3D"org.springf= ramework.jdbc.datasource.DriverManagerDataSource">=

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <property name=3D"driverClassN= ame" value=3D"${jdbc.driver}"/>

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <property name=3D"url" va= lue=3D"${jdbc.url}"/>

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <property name=3D"username&quo= t; value=3D"${jdbc.username}"/>=

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <property name=3D"password&quo= t; value=3D"${jdbc.password}"/>=

=C2=A0= =C2=A0=C2=A0 </bean>=

=C2=A0= =C2=A0=C2=A0 <bean id=3D"jdbcTemplate"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 class=3D"org.springfr= amework.jdbc.core.namedparam.NamedParameterJdbcTemplate">=

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <constructor-arg ref=3D"dataSo= urce"/>

=C2=A0= =C2=A0=C2=A0 </bean>=

</be= ans>

=C2=A0<= /span>

=C2=A0<= /span>

=C2=A0<= /span>

Thanks.=

=C2=A0

=C2=A0

From: = Vinokurov Pavel [mailto:vinokurov.pasha@gmail.com]
Sent: Thursday, March 22, 2018 1:50 PM


To: user= @ignite.apache.org
Subject: Re: Performance of Ignite integrating with PostgreSQL

=C2=A0

Also it makes sense to use new = 2.4 version.

=C2=A0

2018-03-22 8:37 GMT+03:00 Vinok= urov Pavel <vinokurov.pasha@gmail.com>:

>>= IgniteCache<String, String> igniteCache =3D ignite.getOrCreateCache(= "testCache ");

please, = change to=C2=A0=C2=A0ignite.cache("testCache") to be sure the we = use configuration from the file.

=C2=A0

2018-03-22 8:19 GMT+03:00 Vinok= urov Pavel <vinokurov.pasha@gmail.com>:

You already showed the cache co= nfiguration, but could you show jdbc connection initialization

=C2=A0

2018-03-22 7:59 GMT+03:00 Vinok= urov Pavel <vinokurov.pasha@gmail.com>:

Hi,

=C2=A0

Could you please show the "= ;PATH/example-cache.xml&= quot; file.

=C2=A0

2018-03-21 9:40 GMT+03:00 <<= a href=3D"mailto:itriA40453@itri.org.tw" target=3D"_blank">itriA40453@itri.= org.tw>:

Hi Vinokurov,

=C2=A0<= /span>

Thanks = for your reply.

I try t= o write batches by 100 entries.

And I g= ot a worse result.

The writing speed is down to 12.09 KB per second.<= u>

Below is= my code which I try to use putAll and writeAll to = rewrite.

Did I ma= ke some mistakes?

=C2=A0<= /span>

=C2=A0<= /span>

=C2=A0<= /span>

Main fun= ction:

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Ignite ignite =3D Ignition.start("= ;PATH/example-cache.xml");<= /u>

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 IgniteCache<String, String> igni= teCache =3D ignite.getOrCreateCache("testCache ");

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for(int i =3D 0; i < 100; i++)

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 parameterMap.= put(Integer.toString(i), "writeAll_val");

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }

=C2=A0

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while(true)

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 igniteCa= che.putAll(parameterMap);

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }

=C2=A0

=C2=A0

Write al= l to PostgreSQL through JDBC:

@Overrid= e

public v= oid writeAll(Collection<Cache.Entry<? extends String, ? extends String>> entries) throws CacheWriterException {

Iterator<Cache.Entry<? ex= tends String, ? extends String>> it =3D entries.iterator();

Map<String, Object> param= eterMap =3D new HashMap<>();

int count =3D 1;

while (it.hasNext()) {

Cache.Entry<? extends String= , ? extends String> entry =3D it.next();<= /u>

String valCount =3D "val&q= uot;;

valCount +=3D Integer.toString(= count);

parameterMap.put(valCount, entr= y.getValue());

count++;

it.remove();

}

=C2=A0

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 String sqlString =3D "INSERT INTO= test_writeall(val) VALUES "=

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val1),(:val2),(:val3),(:val4),(:val= 5),(:val6),(:val7),(:val8),(:val9),(:val10),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val11),(:val12),(:val13),(:val14),(= :val15),(:val16),(:val17),(:val18),(:val19),(:val20),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val21),(:val22),(:val23),(:val24),(= :val25),(:val26),(:val27),(:val28),(:val29),(:val30),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val31),(:val32),(:val33),(:val34),(= :val35),(:val36),(:val37),(:val38),(:val39),(:val40),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val41),(:val42),(:val43),(:val44),(= :val45),(:val46),(:val47),(:val48),(:val49),(:val50),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val51),(:val52),(:val53),(:val54),(= :val55),(:val56),(:val57),(:val58),(:val59),(:val60),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val61),(:val62),(:val63),(:val64),(= :val65),(:val66),(:val67),(:val68),(:val69),(:val70),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val71),(:val72),(:val73),(:val74),(= :val75),(:val76),(:val77),(:val78),(:val79),(:val80),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val81),(:val82),(:val83),(:val84),(= :val85),(:val86),(:val87),(:val88),(:val89),(:val90),"

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 + "(:val91),(:val92),(:val93),(:val94),(= :val95),(:val96),(:val97),(:val98),(:val99),(:val100);";

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0jdbcTemplate.update(sqlStrin= g, parameterMap);

}=

=C2=A0

=C2=A0

=C2=A0

From: = Vinokurov Pavel [mailto:vinokurov.pasha@gmail.com]
Sent: Wednesday, March 14, 2018 5:42 PM
To:
user@ignite.apache.org
Subject: Re: Performance of Ignite integrating with PostgreSQL

=C2=A0

Hi,

=C2=A0

You could try to=C2=A0use=C2=A0= igniteCache.putAll=C2=A0= for write batches by 1000 entries.=C2=A0

Use foll= owing script in=C2=A0PostgresDBStore#writeAll method to put data into the database:

String s= qlString =3D "INSERT INTO test(val) VALUES (:val1)(:val2)(:val3);"= ;;

=C2=A0

=C2=A0

2018-03-14 11:58 GMT+03:00 <= itriA40453@itri= .org.tw>:

Hi,

I try t= o use Ignite to integrate with PostgreSQL.

And I u= se =E2=80=9Catop=E2=80=9D to monitor the data write to PostgreSQL.

Then obs= erved that the writing speed is 1 MB per second.

This per= formance is not really good. Below is my configuration and code. Please help me to improve it.

Thanks.

=C2=A0

There is my cache configuration:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <bean= class=3D"org.apache.ignite.configuration.CacheConfiguration= ">

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 <property name=3D"name" value= =3D "testCache"/>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 <property name=3D"cacheMode" va= lue=3D"PARTITIONED"/>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 <property name=3D"atomicityMode"= ; value=3D" ATOMIC"/>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 <property name=3D"atomicWriteOrderMo= de" value=3D"PRIMARY"/>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 =C2=A0<property name=3D"readThrough" value=3D"t= rue"/>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0<property name=3D"= writeThrough" value=3D"true"/>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0<property name=3D= "writeBehindEnabled" value=3D"true"/><= /span>

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0<property n= ame=3D"writeBehindFlushThreadCount" value=3D"64"/&= gt;

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0<property name=3D= "writeBehindBatchSize" value=3D"131072" />=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0<property name=3D= "writeBehindFlushSize" value=3D"131072" />=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0<property n= ame=3D"offHeapMaxMemory" value=3D"0" />

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0<property name=3D"cacheStoreFa= ctory">

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <bean class=3D"javax.cache.c= onfiguration.FactoryBuilder$SingletonFactory">

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0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C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 Ignite ignite =3D Ignition.start("PATH/example-cache= .xml");

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 IgniteCache<String, String> igniteCache =3D ignite.getOr= CreateCache("testCache ");

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 int seqint =3D 0;

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 while(true)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 {

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 igniteCache.put(Integer.toString(seqint), &qu= ot;valueString");

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 seqint++;

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 }

=C2=A0

=C2=A0

Write behind to PostgreSQL thro= ugh JDBC:

@Override<= /p>

public void write(Cache.Entry&l= t;? extends String, ? extends String> entry) throws CacheWriterException= {

Map<String, Object> parameterMap =3D new HashMap= <>();

parameterMap.put(=E2=80=9C= val=E2=80=9D, entry.getValue());<= /span>

String sqlString =3D "INSERT INTO test(val) VALUE= S (:val);";

jdbcTemplate.update(sqlString, parameterMap);

}

=C2=A0



--
=E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5= =B7=A5=E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8= =AB=8B=E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF= =A1=E4=BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80= =E6=AD=A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may co= ntain confidential information. Please do not use or disclose it in any way= and delete it if you are not the intended recipient.



=C2=A0

--

Regards

Pavel Vinokurov



--
=E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5= =B7=A5=E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8= =AB=8B=E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF= =A1=E4=BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80= =E6=AD=A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may co= ntain confidential information. Please do not use or disclose it in any way= and delete it if you are not the intended recipient.



=C2=A0

--

Regards

Pavel Vinokurov



=C2=A0

--

Regards

Pavel Vinokurov



=C2=A0

--

Regards

Pavel Vinokurov



=C2=A0

--

Regards

Pavel Vinokurov



--
=E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5= =B7=A5=E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8= =AB=8B=E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF= =A1=E4=BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80= =E6=AD=A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may co= ntain confidential information. Please do not use or disclose it in any way= and delete it if you are not the intended recipient.



=C2=A0

--

Regards

Pavel Vinokurov



--
=E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5= =B7=A5=E7=A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8= =AB=8B=E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF= =A1=E4=BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80= =E6=AD=A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may co= ntain confidential information. Please do not use or disclose it in any way= and delete it if you are not the intended recipient.



--
=E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E5=B7=A5=E7= =A0=94=E9=99=A2=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D=9E=E6=8C= =87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B=E5= =8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4=BB= =B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD=A4= =E4=BF=A1=E4=BB=B6=E3=80=82 This email may contain confidential information= . Please do not use or disclose it in any way and delete it if you are not = the intended recipient.



--
Best regards,
Andrey V. Mashenkov
--001a114166f0e183ba0568dc4fa8--