[Q] How can I do multithread jc_evaluate() ?

User bf3dbc99cf

24-01-2014 08:22:56

Dear ChemAxon,


I am using JChem Cartridge ver 6.1.6 on Oracle11gR2, CentOS 64bit, 6-Core CPUs, 64GB Memory.


When I insert structures into database using JCMan, I see that the cartridge uses almost 600% CPUs. (6-core)


But when I try to calculate properties of thousands compound in the database, I see the cartridge uses only 100% CPUs, 50% for Oracle and 50% for Java.


How can I make full use of the 6 CPUs?


Regards,


Chong Hak Chae,


 


 


select compound.cd_id,


     jc_evaluate( cd_structure, 'logp()' ) logp


     , jc_evaluate( cd_structure, 'logd("7.4")' ) logd


     , jc_evaluate( cd_structure, 'pka("acidic", "1")' ) pka


     , jc_evaluate( cd_structure, 'pka("basic", "1")' ) pkb


     , jc_evaluate( cd_structure, 'donorCount()' ) hbd


     , jc_evaluate( cd_structure, 'acceptorCount()' ) hba


     , jc_evaluate( cd_structure, 'psa()' ) psa


     , jc_evaluate( cd_structure, 'rotatableBondCount()' ) rotb


     , jc_evaluate( cd_structure, 'ringCount()' ) rings


     , jc_evaluate( cd_structure, 'fusedAromaticRingCount()' ) farings


     , jc_evaluate( cd_structure, 'refractivity()' ) refr


from compound


where cd_id between 1 and 100000

ChemAxon 61b4fee994

27-01-2014 12:02:26

Hi,


You can turn on parallel queries by an oracle hint:


select /*+ parallel */ cd_id...


You can also alter the table and index with parallel options:


alter index <index_name> PARALLEL;


or


alter table <table_name> PARALLEL;


The main point is that when you look at the explain plan for the query, you should see steps starting with PX (like PX COORDINATOR). This shows that Oracle does some parallel optimization.


Regards,


Tamas

User bf3dbc99cf

06-02-2014 02:21:25

Dear Tamas,


Thank you for your kind reply.


I used parallel query as you told, but the execution time show no enhancement.


The CPU usage is only 100%, 50% for oracle and 50% for java.


Regards,


Chong Hak Chae,


 


 


alter table compound parallel;


select /*+ parallel(compound,4) */ compound.cd_id,


     jc_evaluate( cd_structure, 'logp()' ) logp


     , jc_evaluate( cd_structure, 'logd("7.4")' ) logd


     , jc_evaluate( cd_structure, 'pka("acidic", "1")' ) pka


     , jc_evaluate( cd_structure, 'pka("basic", "1")' ) pkb


     , jc_evaluate( cd_structure, 'donorCount()' ) hbd


     , jc_evaluate( cd_structure, 'acceptorCount()' ) hba


     , jc_evaluate( cd_structure, 'psa()' ) psa


     , jc_evaluate( cd_structure, 'rotatableBondCount()' ) rotb


     , jc_evaluate( cd_structure, 'ringCount()' ) rings


     , jc_evaluate( cd_structure, 'fusedAromaticRingCount()' ) farings


     , jc_evaluate( cd_structure, 'refractivity()' ) refr


from compound


where cd_id between 1 and 1000;

ChemAxon 61b4fee994

06-02-2014 12:46:41

Hi,


And have you looked at the explain plan of the query? Have you seen rows like PX COORDINATOR or PX SEND or something similar in it?


Is parallel queries turned on in your database? You can check parallel Oracle parameters as system user by this query:


select * from v$parameter where name like '%parallel%';


By the way, I tried parallel and no parallel option with the JChem Server running on my laptop, and surprisingly the query not running in parallel was quicker.


Regards,


Tamas