wood burning stoves 2.0*
The moose likes Performance and the fly likes App slow executing jobs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Performance
Bookmark "App slow executing jobs" Watch "App slow executing jobs" New topic
Author

App slow executing jobs

Robert Siqueira
Ranch Hand

Joined: Jan 21, 2008
Posts: 37
Hi !
I have an application which read a database and write files. Current I have at least 64.000 records in the table.

I decided to use a queue to process this records and write the file. The problem is that the process have been using just 50% of my CPU and this process is very slow. Sometimes I get a "Connection closed" from hibernate.

Basically, the process in MDB executes queries and do updates, and after, write the file.

What I should do to start a tunning in this process, in order to process faster ? increase MDB threads ?

Thanks,

Regards,

Robert
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8914
    
    8

Robert Siqueira wrote: the process have been using just 50% of my CPU and this process is very slow.


What this usually means is that your process has one CPU (or core) locked up on a 2-CPU machine. Check whatever process monitor your OS has. It may be possible to create multiple threads for processing to spread the CPU load around. You'll have to figure out how to get them to collaborate writing a single file, of course.
You'll want to check and see if you have free memory too, as running out of memory will cause the OS to start swapping memory to disk which makes more work for the CPU.
Do you have the database on the same machine? That's a bad idea as your app and the database will be competing for the same resources.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
GeeCON Prague 2014
 
subject: App slow executing jobs