Hi guys,

This email is to keep you posted about the news on the development of
OrientDB.

Starting from v2.2.4 we introduced *parallel transaction*.

Before v2.2.4, transactions acquire an exclusive lock on the storage, so no
matter if you have 1 or 100 cores, the execution was serialized. Now
transactions are executed in parallel only if they involve different
clusters (files).

So, having 16 cores, you could set ALTER DATABASE MINIMUMCLUSTERS 16, so
all the classes that you create after this command will have 16 clusters
(files) per class. Now, if you have 16 threads, or 16 clients (if you are
working with remote protocol and any non Java/Scala driver) you could bind
the thread/client to a cluster id. Example:

Client 1:

BEGIN
LET v1 = CREATE VERTEX V CLUSTER v_1 SET name = 'Luca'
LET v2 = CREATE VERTEX V CLUSTER v_1 SET name = 'Austin'
CREATE EDGE e CLUSTER e_1 FROM $v1 TO $v2
COMMIT RETRY 10

Client 2:

BEGIN
LET v1 = CREATE VERTEX V CLUSTER v_2 SET name = 'Luca'
LET v2 = CREATE VERTEX V CLUSTER v_2 SET name = 'Austin'
CREATE EDGE e CLUSTER e_2 FROM $v1 TO $v2
COMMIT RETRY 10

In this case the 2 transactions go in parallel, because they work on
different clusters: _1 for the 1st client and _2 for the 2nd.

If you have experienced poor performance with transaction, it's time to sue
this powerful enhancement!


Best Regards,

Luca Garulli
Founder & CEO
OrientDB LTD <http://orientdb.com/>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to