You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rickynauvaldy <ri...@sci.ui.ac.id> on 2017/08/30 05:00:40 UTC

Transaction Speed

Hello, what are some options to increase the transaction speed?
(CacheAtomicityMode = TRANSACTIONAL).

Thanks,
Ricky



-----
-- Ricky
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Transaction Speed

Posted by Andrey Mashenkov <an...@gmail.com>.
Ricky,

Does you mean you try to update same two entries in all 50_000 transactions?
Is it possible to collocate this entries?


On Thu, Aug 31, 2017 at 5:56 AM, rnauv <ri...@sci.ui.ac.id> wrote:

> I want to make 2 clients concurrently calculate some values from a cache
> that
> read from a database, and store the result in the database. I can't use
> atomic cacheAtomicityMode as there is no lock so that the calculation might
> get an old value. I also need a backup to avoid lost cache when a node
> fail.
> Let's say I run 2 servers, and 2 clients. Right now, I'm able to do 50_000
> transactions for two rows in 70 seconds (around 1400 TPS). If it's
> possible,
> I want to increase the TPS.
>
> My initial configuration is like this:
> Server configuration:
> 1. CacheAtomicityMode = transactional
> 2. Read Through, Write Through, and Write Behind = true
> 3. Cache Mode = partitioned
> 4. Backup = 1
> 5. Query entities for my table
> 6. cacheStoreFactory for my CacheStore
> 7. DiscoverySPI which I set to my localhost
>
> Client configuration have the same configuration as the server excluding
> ReadThrough, WriteThrough, WriteBehind, QueryEntities, and
> CacheStoreFactory.
>
> The Transaction Concurrency is pessimistic while transaction isolation is
> repeatable_read.
> I didn't set Write synchronization mode (which by default will be
> PRIMARY_SYNC).
>
> The transaction procedure is similar with the one in Ignite Documentation
> [1].
>
> Any suggestions?
>
> Thanks,
> Ricky
>
> [1] https://apacheignite.readme.io/docs/transactions
>
>
>
> -----
> -- Ricky
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Re: Transaction Speed

Posted by rnauv <ri...@sci.ui.ac.id>.
I want to make 2 clients concurrently calculate some values from a cache that
read from a database, and store the result in the database. I can't use
atomic cacheAtomicityMode as there is no lock so that the calculation might
get an old value. I also need a backup to avoid lost cache when a node fail.
Let's say I run 2 servers, and 2 clients. Right now, I'm able to do 50_000
transactions for two rows in 70 seconds (around 1400 TPS). If it's possible,
I want to increase the TPS.

My initial configuration is like this:
Server configuration:
1. CacheAtomicityMode = transactional
2. Read Through, Write Through, and Write Behind = true
3. Cache Mode = partitioned
4. Backup = 1
5. Query entities for my table
6. cacheStoreFactory for my CacheStore
7. DiscoverySPI which I set to my localhost

Client configuration have the same configuration as the server excluding
ReadThrough, WriteThrough, WriteBehind, QueryEntities, and
CacheStoreFactory.

The Transaction Concurrency is pessimistic while transaction isolation is
repeatable_read.
I didn't set Write synchronization mode (which by default will be
PRIMARY_SYNC). 

The transaction procedure is similar with the one in Ignite Documentation
[1].

Any suggestions?

Thanks,
Ricky

[1] https://apacheignite.readme.io/docs/transactions



-----
-- Ricky
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Transaction Speed

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Ricky,

If there was an option out of box that just can increase transaction speed,
I bet it would be on by default.
Unfrotunately, there is no magic and, possibily, you can get a speed up
with lower failover consistency guarantees.

For example, you may want to set writeSyncronizationOrder to PRIMARY_SYNC
or turn on write behind for CacheStore.

Would you please clarify the use case and share a config, so may be someone
will have insight and help you with this?

On Wed, Aug 30, 2017 at 8:00 AM, rickynauvaldy <ri...@sci.ui.ac.id>
wrote:

> Hello, what are some options to increase the transaction speed?
> (CacheAtomicityMode = TRANSACTIONAL).
>
> Thanks,
> Ricky
>
>
>
> -----
> -- Ricky
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov