WebServices performance

User e34a92cce5

19-07-2010 17:53:00

Hi,


I had been using web services to run my structure searches on a collection of about 2million compounds and it was running fine. I recently imported more structures (abt 400K) using InstantJChem into the collection and the searches have been really slow. Is it due to a cache problem. I use PHP SOAP client to run web services. On the other hand, the AJAX interface seems to run  just as fast. Do you have suggestions on how to improve the speed?


I am using version 5.3.1 for both web services and InstantJChem


Thanks

ChemAxon ebbce65bcf

21-07-2010 07:17:51

Hi,


Whenever your DB changes, the cache will be updated. This happens during the first search after the change and may take some time. Are you sure, it was not only the first time which was slow? The search speed of the server should be independent from the client you use. If you get the results rapidly with the Ajax client, it means that possibly there is no problem on the server side. (Anyway, how do you know for sure it is a cache problem?)


There is only one big difference between a PHP client and an Ajax client.  The PHP code is running on the server side, so when you make a request to the PHP, it generates another request to the webservice. So two requests are made for one operation (instead of one). But this has significance only if you are "bombarding" the server with requests. I assume it is not the case.


If you experience this lag every time even after the cache update, could you tell me what kind of searches you are running, and what is your DB's old (2 million molecule) and new (2.4 million molecule) size? What structure format were you using during the import?


Thanks. Regards,


Roland

User e34a92cce5

22-07-2010 12:40:20

It was pretty slow for not just the first search,since that was the expected norm. I would say that it took a while for the PHP based web searches to speed up and I am not sure what went on. The searches now seem to run just fine. It might be that there were more users running their queries at that point that might have made it slow down; so I am not certain at this point.


The current size of the 2.4 million table is about 1603M


I'll keep an eye next time I update the tables. btw, just for information purposes, how does JChem Web services know when a table is updated? Does it just store the counts from the previous run or is there some other way?


Thanks


Renju

ChemAxon ebbce65bcf

22-07-2010 14:39:01

1600 MB is not that small database. Searches which cannot be performed without using the database, can be slow at this scale. Anyway, I would be glad if you could share us (even in email) your performance results, if possible (machine, no. concurrent users, type of searches + times).


Regarding to your question, JChem uses log tables to store the molecule changes for the cache. A new search checks these entries and updates the cache, if needed. This means that if you use beginSearch or runCompleteSearch in the WS, the cache may be updated, if there has been some change. However, this cache update cannot be seen in the result set of a previous search. So, if you had finished a search before the structure table was modified, the responses of getHitsAndData wouldn't contain the newly imported molecules after the modification.


Regards,


Roland