aspose file tools*
The moose likes Java in General and the fly likes Ideas for improving the performance of java application which basically runs on thread. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Ideas for improving the performance of java application which basically runs on thread." Watch "Ideas for improving the performance of java application which basically runs on thread." New topic
Author

Ideas for improving the performance of java application which basically runs on thread.

muruga dhanapal
Greenhorn

Joined: Jun 02, 2010
Posts: 24
Hi All,
I need your valuable Idea and tips to improve the permformance of my application
About my application I have two input systems, from which I will be getting the request XML, I have a servlet, the incoming request hits this servlet and some basic xml validation are happening in this modoule and apart from this I have four other individual modules which runs as a Java Thread where all the business logics are done. Per day we are booking around 100 policies and our goal in future is we are going to have another 2 input systems, so totally we are going to have 4 input systems which will send request to my application simultaneousy. I have to improve the performance of the application that is currenlty If my application books 20 transaction per hour I want improve this count in future.

Note: we are not using any batch processing to get the input xml to our system, We are getting inputs by a certain web applicatin where user feeds data in the front end and that is converted as XML and this xml passes through a web service to reach our application. So I need to increase the performance of sequentially processing transactions.

Am using Jdk 1.5 version, Sybase as database, where all my 4 modules runs as java thread. Please suggest me your idea and help me to improve the performance of the application.
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2376
    
  28

Why are you running your business logic in a thread? Is there a requirement to do the processing asynchronously? or is your servlet waiting for thread to finish?

Do you have a thread per request? or are you using a thread pool?

Since you haven't told too many details about your application right now, I can give only general advise. Look at the peak resource usage of your application right now. This will tell you if you can increase the number of threads, or you need to optimize your code, or add more hardware. If you are using a database on the back end look at the resource usage on the database. Every application is either CPU bound, or memory bound or IO bound. Once you start increasing threads, and if you use CPU, or memory or IO more than 100%, you will start reducing your throughput drastically. Threads are not magical devices. They cannot create more physical resources, they can only help you use more of the resources that you have. You should always limit the number of concurrent processes to what your hardware can handle. So, what you need to do is measure the foot print of your app, and look at the limitations of your hardware. This will tell you if you can get better performance by increasing number of threads.
muruga dhanapal
Greenhorn

Joined: Jun 02, 2010
Posts: 24
Once the Xml is recived in our system, We have IBM message queues as Middleware where this Mqueue listens for the request XML. We have 4 modules in our systems and all these modules runs as thread. In every module we write some business logic and we do some valdation on the request XML. All these 4 modules have unique Mqueue listener which listens for a message. When a xml passes from 1 module to the other the status will be updated in the db. Through which we trach the state of an input.

All the modules are runnig as threads and listens for the message in queue, which is the basic purpose where we used the therad.

Please let me know if you need furhter details about my app
Emanuel Kadziela
Ranch Hand

Joined: Mar 24, 2005
Posts: 186
Does the servlet which accepts user input wait for all four modules to process the xml before responding? In other words, is this part of your application synchronous?

Are the modules sequential, or can they work in parallel? In other words, does the xml pass from module 1 to module 2, to 3, to 4, so that module 4 has to wait for the other three to do their processing?

You say all modules are running as threads. What does that mean? Does each module have its own thread pool? Does each module spin up a new thread when it receives a request? Or is the processing done in the message receiving thread?

Where are your bottlenecks? What is preventing your application from responding faster? Is it the app server (i.e. does it have enough request processing threads)? Is it the servlet? Is it one of the modules?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ideas for improving the performance of java application which basically runs on thread.