0

I have a node.js app that uses node-java to invoke a Java class and then calls a method in that class. That Java class is a wrapper around a commercial product API. I posted most of my node.js app here:

Critique for node.js+node-java application that interfaces with a COTs product?

Meanwhile, I've deployed/installed node.js and node-java on two test systems. One (the original one) is CENTOS 7 and the newer one is CENTOS 6. The reason I did the CENTOS 7 installation first was because CENTOS 7 had the right gcc/g++ for node-java, and then after I got things working on CENTOS 7, I circled back to CENTOS 6 and figured out how to upgrade the gcc/g++.

Now, I'm running some load testing on this node.js+node-java app and the tests run fine on the CENTOS 7 target. But, on the app running on CENTOS 6, the Jmeter test runs ok ONCE, but if I try to re-run the Jmeter tests, it just runs super slowly.

If I reboot the CENTOS 6 system and run the Jmeter test against that, it again works ok the first run, but then is slow for any subsequent runs.

I don't think it actually gets any errors, but it's super slow.

The virtual machines for both the CENTOS 6 and the CENTOS 7 systems are the same, 2 processors, and 4096 MB memory.

I can't figure out what might be happening so I was hoping someone here might have some ideas?

Thanks, Jim

EDIT 1: I think that I've realized/found several things about the CENTOS 6 system:

  • That system has configuration settings that are done for an Oracle database installation. Sorry, I forgot about this before, but I got this CENTOS 6 system by cloning a BASE CENTOS 6 image that I keep around for installing test Oracle databases. I don't remember exactly what the configuration changes are, but they are the "prerequisites" that the Oracle database installer checks for, and I vaguely recall that those include a bunch of kernel parameters, so those settings may be part of the problem I'm seeing when I run my Node.js+node-java app on the CENTOS 6 system, whereas I don't see those problems when I run the same Node.js+node-java app on the CENTOS 7 system. NOTE that the CENTOS 7 system is a "vanilla" CENTOS 7 that I installed from scratch and doesn't have any tweaks other than the defaults.

  • As I said some of the CENTOS 6 Oracle Db tweaks may be causing the weird behavior I'm seeing when testing Node.js+node-java app with CENTOS 6, whereas no problem when I run the same app with CENTOS 7. Here's a behavior that I'm noticing on the CENTOS 6 system:

After I run the Jmeter test, if I kill the node.js app, I see a bunch of connections still on port 8080. These are all in TIME_WAIT state. If I wait until all those connections disappear AND THEN I start the node.js app and then run a Jmeter test, it works correctly. That was probably why, when I rebooted the CENTOS 6 system between Jmeter test runs, they worked ok.

  • So I'm now deploying a new CENTOS 6 system from the CENTOS DVD directly rather than doing a clone. I will try setup my test on that new CENTOS 6 after that and see if it behaves "normally".
Community
  • 1
  • 1
user555303
  • 1,146
  • 3
  • 20
  • 44
  • Are node versions the same on both machines? – Omar A Sep 28 '16 at 20:44
  • Any updates? What happened with the clean Centos 6? – Omar A Sep 29 '16 at 12:40
  • @omar alqady - yes, node.js was 6.6.0 on both the CENTOS 6 and the CENTO 7. The new CENTOS 6 is v6.8 installed from DVD (so it is clean 6.8), and yes, it still behaves the same as my earlier CENTOS 6. – user555303 Sep 30 '16 at 17:42
  • Since the version is the same, and the code is the same, and both were tried with clean OS installs, this just doesn't make sense at all. I even checked your code in the other thread, but there doesn't seem to anything wrong with to the best of my knowledge. I haven't worked with node-java itself before, so I don't know what another probable cause could be. You could make sure that node-java is the same version as well, as well as your jdk/jre since node-java would probably use those as well, but I can't think of anything else to be honest. – Omar A Oct 02 '16 at 16:39
  • @omar alqady - I know for sure that the JDK is the same as I deployed the JDK 1.7_0_79 x86_64 from tar.gz that I downloaded from Oracle myself. The node.js is the same in both cases also. I installed the node-java myself also, but note that the node-java build includes native gcc/g++ code being compiled from source, so, although it's a long shot, it's possible, that the native compiled code on the CENTOS 7 is "faster" than the compiled code on CENTOS 6? – user555303 Oct 04 '16 at 02:28
  • This is very strange then. Just to make sure I understand you though, is node-java installing its own version of gcc/g++, or is it just recompiling the existing version on your machine? If it's installing it's own version, it could be using the default version for the OS, which apparently is different since you had to upgrage it on Centos 6 to get it to work. – Omar A Oct 04 '16 at 13:14

0 Answers0