Nailgun

From DISI
Jump to navigation Jump to search
 installed Nailgun on the cluster.
I did the following in /nfs/home/stefan/NAILGUN/nailgun-master


1) Install with maven 

$ /nfs/home/stefan/NAILGUN/apache-maven-3.6.3/bin/mvn clean install

Since we have Java 1.8 on the cluster, the Build worked out.



2) This is what we've been missing so far: We need to generate a class path containing the server and the classes we want to run with nailgun:




$ export CLASSPATH="/nfs/home/stefan/NAILGUN/nailgun-master/nailgun-server/target/classes:/nfs/home/stefan/NAILGUN/nailgun-master/nailgun-examples/target/classes:/nfs/soft/jchem/jchem-19.15/lib/*"



3) Start the server:



$ java com.facebook.nailgun.NGServer & 



4) Now you can run the classes with the nailgun client




./nailgun-client/target/ng com.facebook.nailgun.examples.HelloWorld



Just as an example that this actually is faster as compared to "classic" java:



Classic Java

$ time java com.facebook.nailgun.examples.HelloWorld

Hello, world!

real	0m1.794s

user	0m0.336s

sys	0m1.414s



Nailgun

$ time ./nailgun-client/target/ng com.facebook.nailgun.examples.HelloWorld

Hello, world!

real	0m0.025s

user	0m0.001s

sys	0m0.005s



So it seems to speed up things.



As for Jchem, I don't know why it works, but it does :)



Normal execution of cxcalc

$ time cxcalc

Calculator, (C) 1998-2019 ChemAxon Ltd.


version 19.15.0

...

real	0m22.604s

user	0m28.868s


sys	0m19.380s



Normal execution with Java

$ time java chemaxon.marvin.Calculator

Calculator, (C) 1998-2019 ChemAxon Ltd.


version 19.15.0

...

real	0m19.084s

user	0m28.498s


sys	0m19.360s



First execution with nailgun

$ time ./nailgun-client/target/ng chemaxon.marvin.Calculator

Calculator, (C) 1998-2019 ChemAxon Ltd.



version 19.15.0

...

real	0m12.016s

user	0m0.000s

sys	0m0.008s



Subsequent execution with nailgun

$ time ./nailgun-client/target/ng chemaxon.marvin.Calculator

Calculator, (C) 1998-2019 ChemAxon Ltd.



version 19.15.0


...

real	0m0.014s

user	0m0.001s


sys	0m0.004s



So the speedup of opening cxcalc multiple times within the server is 1000-fold???