Hi Nikhil,
If your hardware environment is similar, the difference between Windows and Linux should actually be negligible.
Some questions that might help to track the problem down:
1. Can you reproduce this behavior on another independent Linux system? 2. What happens with a different Java version? 3. Do you store all data on a local disk (is it an HDD or SSD, same on both systems?)
Best, Christian
On Sun, Aug 9, 2020 at 10:29 AM Nikhil Sethi nsethi@opentext.com wrote:
Hi Basex Team,
We are facing a huge performance hit in linux machine while using basex, its working smoothly in windows machine
While executing any query : -> windows machine takes around 4 to 15 millisec -> On linux machine same query takes around 120 to 150 millisec
During some application operation execution we are selecting/inserting the xml nodes in different docs in basex and there are around 13000 xml nodes which needs to be selected/imported in this operation.
Linux => rhel or cents of
Based on the logs of query execution we have analysed and found : Windows worst case(15 ms) query execution time => 13000 x 15ms => 65000ms => 65 sec = around 1 min Linux average case(130 ms(120+150)/2) query execution time => 13000 x 130ms => 1690000ms => 1690 sec = around 28 min to execute same operation
we are using BaseX941.zip ZIP Package
eg queries :
for $alias in collection(mydbname)//* where (($alias/@id="4249f0807da81000a734525400c54430018") and ($alias/@deleted="false") and ($alias/object-type/@uid="com.MyObjectName")) return $alias
or
insert node <myxmlNode>…….</myxmlNode> into (for $alias in doc('MyDoc') return $alias)
I am using basex with java
code to get the result
System.setProperty("user.home", db_dir); BaseXXQDataSource ds = new BaseXXQDataSource(); ds.setProperty("serverName", "localhost"); ds.setProperty("port", "1984"); ds.setProperty("databaseName", "mydbname"); XQConnection2 connection = (XQConnection2) ds.getConnection("admin", "myDbPassword"); XQStaticContext xqsc = connection.getStaticContext(); xqsc.setScrollability(XQConstants.SCROLLTYPE_SCROLLABLE); connection.setStaticContext(xqsc); XQPreparedExpression expr = connection.prepareExpression(query); XQResultSequence result = expr.executeQuery(); XQSequence scrollableCopy = connection.createSequence(result);
getting result from the xqsequnce for 13000 queries is taking another 10 mins Node node = scrollableCopy.getNode()
we have tried to increase xms and xmx in basexserver but it didn't help, Can you please suggest any solution/configuration required for linux machine to increase the performance.
Thanks, Nikhil