Kevin Meredith
Kevin Meredith

Reputation: 41909

Improving a Web App's Performance

My web app, an exploded WAR, is hosted by Apache (static content) and Tomcat (dynamic content) via mod_jk. Optionally, there's an ActiveMQ component of this system, but it's currently not being used.

As I understand, each HTTP request will hit Apache. If it's a dynamic content request, Apache will forward the request to Tomcat via mod_jk. To fulfill this request, Tomcat will start a new thread to do the work.

I'm running the app on a 6-core, 12 GB RAM machine.

Besides using the ActiveMQ component, how can I improve my system's performance? Also, please correct me if I'm misstating how Apache and Tomcat communicate.

Upvotes: 0

Views: 101

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48057

while (unhappyWithSitePerformance) {
  executeLoadTest();
  identifyBiggestBottleneck(); // e.g. what breaks first
  fixIdentifiedBottleneck();
}

There is no blank silver bullet to provide. You should make sure your load test simulates realistic user behaviour and define the number of (virtual) users you want your server to handle within given answering time. Then tune your server until your goal is met.

Common parameters to look for are

  • memory consumption
  • CPU consumption (e.g. certain algorithms)
  • I/O saturation - e.g. communication to the database, general HTTP traffic saturating the network adapter
  • Database or backend answering time - e.g. sometimes you'll have to tune the backend, not the webserver itself.

Upvotes: 1

Related Questions