Hi Lev,
Could you please answer my question or refer me to somebody who could
answer it.
The Sequoia mailing list is always the best place to ask questions. I
don't answer questions that are directed only to me else it does not
benefit the entire community. I reply to the list (but I removed the IP
@ and login/password info).
I have tried to benchmark sequoia 2.10 and found that it was very slow.
I went across the mailing lists and it seemed to me that nobody has
complained about it.
So I think that there is something wrong with my configuration.
I have two controllers on two different Unix machines.
The first controller have two backends: one is Oracle db on Unix and
another is Postgres db Linux.
The second controller have also two backends: both are Oracle db's on Unix
and running on the same machine as the first Oracle backend.
I am running my test program on PC.
I have set all the log properties to INFO on both controllers.
The test is :
Class.forName("org.continuent.sequoia.driver.Driver");
// Class.forName("oracle.jdbc.driver.OracleDriver");
// Class.forName("org.postgresql.Driver");
con =
DriverManager.getConnection("jdbc:sequoia://xxxx/mydevDB?user=user&password");
// con =
DriverManager.getConnection("jdbc:oracle:thin:@xxxx:ccdev","xxx","");
// con =
DriverManager.getConnection("jdbc:postgresql://xxxx/testpg","xxx","");
con.setAutoCommit(true);
String sql1 = "insert into doc_dsply ( DOC_ID, ID, POST_DATE, PROJ_ID,
TITLE, TYPE) values (11, ";
String sql2 = ", to_timestamp('25-Sep-06','dd-mon-yy'), 'SOLNBR_22',
'60--CONNECTOR,PLUG,FIBE', 'Synopsis')";
long start = System.currentTimeMillis();
int maxCount = 100;
int iid = 800000000;
for (int i = 0; i < maxCount;i++) {
iid++;
String id = "" + iid;
String sql = sql1 + id + sql2;
st = con.createStatement();
st.executeUpdate(sql);
st.close();
}
long end = System.currentTimeMillis();
System.out.println("Elapsed Time=" + (end - start));
} catch(Exception e) {
e.printStackTrace();
} finally {
try {con.close();} catch (Exception e) {}
}
}
Result:
For the sequoia test Elapsed Time is around 20599 ms.
For the Oracle test Elapsed Time is around 1492 ms.
For the Postgres test Elapsed Time is around 911 ms.
I expected some overhead but I think that 20 times is too much.
Would you please advise me where I should look at to improve the
performance.
I would be glad to provide any additional information that you feel can
help you to answer my question.
This is a classical behavior. Your application is single threaded so
there is certainly no parallelism to gain here.
Note that you should really use a PreparedStatement rather than a
Statement in your application even though that should not significantly
impact performance.
I would propose:
String sql = "insert into doc_dsply ( DOC_ID, ID, POST_DATE, PROJ_ID,
TITLE, TYPE) values (11, ?, to_timestamp('25-Sep-06','dd-mon-yy'), 'SOLNBR_22',
'60--CONNECTOR,PLUG,FIBE', 'Synopsis')";
pstmt = con.prepareStatement(sql);
for (....) {
pstmt.setInt(1, iid++);
pstmt.executeUpdate();
}
pstmt.close();
On the performance side, you should check what kind of waitForCompletion
policy you have set. If you set it to 'all' you will have to wait for
all nodes in the system to complete before the client gets the result.
Setting it to 'first' should significantly improve performance.
Another bottleneck you may have on writes in the group communication.
Appia proved to be a better performer than JGroups so you might want to
try it to reduce the latency you experience on writes.
There might be additional elements in your configuration file that can
alter performance but we would need to have a closer look at it. Note
that Continuent provides consulting and tuning services for the open
source as well.
Thanks for your interest in Sequoia,
Emmanuel
--
Emmanuel Cecchet
Chief Architect, Continuent
Blog: http://emanux.blogspot.com/
Open source: http://www.continuent.org
Corporate: http://www.continuent.com
Skype: emmanuel_cecchet
Cell: +33 687 342 685
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia