Search in the DB is slow for me. Why ?

ChemAxon 9c0afc9aaf

23-06-2004 12:32:02

[quoted from a user's e-mail]





"We had these searches executing in under a second if I remember correctly. We are using version 2.2.1 without the oracle cartridge. I remember that it was necessary to enable caching in order to get the performance to the level that we require. We think we have it enabled but are not sure. Any suggestions on where to start looking to resolve this?"

ChemAxon 9c0afc9aaf

23-06-2004 12:38:54

You can look in your code for








JChemSearch.setStructureCaching()





or you can call





JChemSearch.isStructureCaching()





to determine the status of the caching.





In the JSP example application you should look for





searcher.setStructureCaching(...);





in the file <jchem>\examples\jsp1_x\searching.jsp.





(From jchem 2.3 it will be an option in the JSP configuration file ".jchemsite".


Example: "useStructureCache=true".


See <jchem>\examples\jsp1_x\setup.html for details on JSP options)








The most likely reasons:





1: you are not using the cache (this increases mostly the screening times)


1.1: Network speed and load is also important if caching is disabled





2: You are using the cache, but it cannot fit well into the java memory, or even into your RAM.


(maybe your database got a bit bigger since last year)





2.1: Java memory:


In this case all the processor time is wasted on continuous garbage collection as the Java Virtual Machine (JVM) fight memory shortage.


Please see http://www.jchem.com/FAQ.html#outofmemory on how to increase the maximum allowed memory size with the JVM option -Xmx, and for estimated memory consumption


Please note, that the listed memory consumption estimate (260MB /1 million structures) is a outdated, probably less is enough in your version.


We will also further reduce our memory need for caching in JChem 2.3.


Also remember, that the cache stores information about ALL your structure tables that were searched at least once. (until you exit the program)








2.2: RAM: If you already use -Xmx, but the allocated size cannot fit into your physical RAM together with the OS and other programs, the system will utilize the virtual memory.


The typical symptom is heavy disk activity (swapping) even if the search is working from cache or the DB is on other machine.

ChemAxon 9c0afc9aaf

29-06-2004 15:19:30

Update:





The memory need for caching will be around 100 MBytes / 1 million average-sized structures in version 2.3.