0

Issue at hand:

I have a java application which is taking twice as long to run on DEV and QA Servers than on my local machine. When running the job on Dev and QA I’m getting times around 1:45 – 2:30 (hh:MM) compared to my local which is getting about 0:45 – 1:10. I’m trying to determine what could be causing slow performance of a java application on servers.

What I have looked into so far none providing an answer:

  1. Testing with same maxheap size
  2. Observing stress on cpu. Dev is idle about 75% of the time when running the batch application, so I don’t think this is an issue.
  3. Observing ram on Dev. Dev has more than enough memory to provide the JVM the specified maxHeap (128mb). If I understand correctly the available memory of the machine doesn’t matter as long as the MaxHeap size can be provided by the machine correct?
  4. Ensuring the version of java isn’t causing the issue.
  5. Set logging level same: “INFO”
  6. Processor: servers has 2.67GHz processor my local only has 2.19GHz

Additional Information.

  • Server OS: Linux
  • Local Computer OS: Windows
  • Single threaded Java application.
  • Application is reading and writing to text files and also has calls to a database(hibernate c3p0). These are my most/only expensive operations

I’ve scoured dozens of sites to determine a root cause but I haven’t been able to nail down what is causing the issue any help will be much appreciated.

4
  • 1
    Does "75% idle" mean one core running at 100% and three others idle, or does it really mean that the test load is consuming only 25% of the CPU resources available to it? Commented Nov 5, 2015 at 23:03
  • If the test load is really using only a fraction of the maximum CPU it potentially could use, then it is probably being slowed down by I/O. Commented Nov 5, 2015 at 23:05
  • @JohnBollinger the latter "load is consuming only 25% of the CPU resources available to it?" This is a shared server so my application plus whoever else is on the server combined is only using 25%. not sure if it matters but my application is reading and writing to text files and also has calls to a database. These are my most expensive operations Commented Nov 5, 2015 at 23:10
  • different models of CPU have different performance even if they run at the same GHz. I suggest you look at the actual CPU models. Commented Nov 5, 2015 at 23:20

2 Answers 2

2

Application is reading and writing to text files and also has calls to a database(hibernate c3p0). These are my most/only expensive operations

Most likely your server has slower access to the database it is using. e.g. if you were to run the database on the same machine it can be a lot faster than across a network. I would look at the time it takes to perform some simple hibernate operations locally and on your server. If performance is a concern I suggest looking at removing hibernate or even your database and your program can run 10x - 100x faster.

Sign up to request clarification or add additional context in comments.

1 Comment

Or if the text files it is reading and writing are on a network filesystem, then that could make a significant difference, too. Especially if they are local when the application runs on the OP's own machine.
0

I’m trying to determine what could be causing slow performance of a java application on servers

The Server I was testing on happened to be in the DMZ (outside the network). While the database and my local computer (when working in the office) are inside the network. This was the case I failed to evaluate.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.