Java and Oracle

pts.
Tags:
Database
DB2
Oracle
SQL
hi Sir, I have an application web based. using Oracle backend and Java front end. App server is in weblogic and Solaris os and two cpu with 8 applications. DB server is oracle 8.1.7 on Solaris This application is getting slow when number of threads are more ( like many users login and related activities) . I found out that during the peak time the garbage collector is also not running properly. I want to know how can we change the GC algorithm ( like concurrent GC / parallel GC etc ) Where do we give the settings of JVM ? How to enable the parallel GC ? How to set the heap size ?

Answer Wiki

Thanks. We'll let you know when a new response is added.

I assume from your question, that you’re not using Java within Oracle. You’re “just” using JDBC to access Oracle.

In case of performance problems, it important that you identify the wait causes. Is it the DB that’s busy, or your frontend application that’s slowing things down – or a combination. Reasons for performance problems are plentitude – without knowing excatly where to look, you just left to guess work and probably will never find the right solution.

In general, if an application gets slow under load, it’s archtectural. Table design wrong, or your SQLs aren’t build right. If you’re faced with a climbing memory consumption that won’t go down, it looks like you’re not freeing data from the heap. Remember to close connections, cursors etc. to free up used resources.

Your Java VM is controlled via parameters to the “java” executable on your platform. -mX and -mS can help. However, I’ve never seen them cause performance problems – I’ve raised them from their defaults when our applications run out of space and we get memory errors specifically.

Having a garbage collector doesn’t mean you can ignore cleanup in your code. Depending on your JVM version there are options to control the garbage collector.

However, before you fully target that – make sure the garbage collector is the reason your application is working slow. Maybe you’re selecting 1000s and 1000s of records back to your client only to show 10 rows, and then dismissing the rest? That wourld certainly keep the garbage collector busy cleaning up all the time. It would be better only to transfer the 10 needed rows – it’s faster and doesn’t waste memory. In other words, if the garbage collector is spending a lot of time, find out why.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Shajie
    Dear bit4man , Yes am using JDBC. Thank you for your reply. It is a very valuable thing for me. Thanks again friend. I'll look on to the things you mentioned. Thank you and Regards shaji
    0 pointsBadges:
    report
  • Shajie
    [...] Address: http://itknowledgeexchange.techtarget.com/itanswers/java-and-oracle/ (0) Comments Read [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following