JChem base concurrency performance

User 6baabcf48d

29-11-2016 15:14:39

Hello,


 


I'm currently analyzing JChem base performance under a concurrent scenario by constructing a web service according to the developer guides.


 


My single test request is a substructure search which takes 2 seconds to return.


 


Firstly, I repeat the request 10 times consecutively, each request returns in about 2 seconds as expected


 


Secondly, I tried to send 10 requests simultaneously, then I noticed the first request returns in about 2 seconds, second request returns in about 4 seconds, and so on, the last request returned took about 20 seconds.


 


It looks like the requests were handled one by one even if they arrived at the same time, is that the normal behavior as expected ? What can I do to improve the concurrency performance ?


 


Thanks,


William

ChemAxon a9ded07333

30-11-2016 13:12:28

Hi William,


Shortly: you cannot run parallel searches using the same JChemSearch instance.


You may instantiate several JChemSearches in your web service for different queries. You may also use our JChem webservice, that caches the requests and answers, so when you send the same query, the answers - starting from second - will be served from the web service cache.


Best regards,
Tamás

User 6baabcf48d

30-11-2016 13:38:34

Hello, Tamas,


 


I'm not using the same JChemSearch instance for multiple requests. For each request, I instantiated a new JChemSearch Object to handle the operation. And even with different JChemSearch instances, the requests still seems handled consecutively, not parallel.


 


Regards,


William

ChemAxon a9ded07333

01-12-2016 08:57:43

 


Hi William,


Is it possible that the different JChemSearch instances run in different JVMs? When JChemSearch starts a search, it first loads into cache a huge amount of data. This cache is available for other JChemSearch instances that are started within the same JVM, but if a JChemSearch instance starts in another JVM it also has to load the cache first.


If you start them in the same JVM, could you send your code for further examination?


Best regards,
Tamás