orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Replication of documents is slower than insertion of documents.

Open rinkymangal2010 opened this issue 11 years ago • 12 comments

Hi,

We adapted yscb for orient DB 2.0.3 and executed some performance test against a cluster of three nodes (node1, node2 and node3).

We had asynchronous mode of replication enabled during performance run.

We executed performance test pointing to node1 via YCSB.

With this performance run, we have following observations:

  1. The rate of documents insertion is ~2500 document/second.
  2. But the rate of replication to node2 and node3 is just ~300 documents/second.

We studied code base of orient DB and found that replication is done through a single thread.

We made some code changes to achieve multi-threaded replication. With multi-threaded replication, we could see rate of replication increased (upto ~1200 documents/second)

Can we have multi-threaded asynchronous replication?

Or Is there any hurdle in multi threading of asynchronous replication?

Please guide us on this.

Regards, Rinky Mangal

rinkymangal2010 avatar Mar 18 '15 13:03 rinkymangal2010

I suggest you on using 2.0.5 (or even 2.0.6-SNAPSHOT), not for performance improvement but for some fixes on distributed. In yscb benchmark, are you using Document API? Are there any transactions?

About MT replication could you share your code? The best way is forking OrientDB and publishing it on github under your account.

lvca avatar Mar 19 '15 09:03 lvca

Thanks Luca!

We shall use 2.0.5 for further tests.

In yscb benchmark, we are using document API. No there is no transaction in YCSB.

About MT replication, we shall soon share code changes.

In addition, we have adapted YCSB to allow testing of orient DB cluster. We shall soon share YCSB changes as well to get your opinion.

mushkoor avatar Mar 19 '15 11:03 mushkoor

Cool!

lvca avatar Mar 19 '15 11:03 lvca

Here are the changes for multi-threaded asynchronous replication:

https://github.com/rinkymangal2010/orientdb/commit/cb50ab7da24997e010c25b63644b47232f532323

Please take a look and let us know if they look fine.

rinkymangal2010 avatar Mar 20 '15 12:03 rinkymangal2010

@lvca did you get a chance to take a look at code changes?

mushkoor avatar Mar 24 '15 08:03 mushkoor

Commented inlined

lvca avatar Mar 24 '15 18:03 lvca

Any update on this?

Ashendra avatar Mar 26 '16 20:03 Ashendra

In last develop branch we improved replication a lot. Performance with 2 nodes are 3x, 4x with 3 nodes and even more with more nodes. We'll publish develop branch as 2.2.0-beta2 or 2.2.0-rc1 in the next week.

lvca avatar Mar 26 '16 23:03 lvca

Thanks. Will there be any improvement if I change executor service pool size in hazelcast.xml.

Ashendra avatar Mar 27 '16 20:03 Ashendra

No, we use queues, not executors, so you will have not any improvement.

lvca avatar Mar 27 '16 23:03 lvca

Hey guys, did you try v2.2? It's 3x-10x faster with 3 nodes and even more with more nodes.

lvca avatar May 22 '16 11:05 lvca

We resolved all the performance issues with v2.2 by achieving also a 10x in comparison to v2.1. Closing this issue.

lvca avatar Jul 01 '16 22:07 lvca