Thread: Preformance problem after user inactivity


Permlink Replies: 8 - Pages: 1 - Last Post: Apr 14, 2008 8:39 AM Last Post By: mobra
user628512

Posts: 4
Registered: 04/01/08
Preformance problem after user inactivity
Posted: Apr 1, 2008 4:55 AM
Click to report abuse...   Click to reply to this thread Reply
Hello,

I wonder if anyone has similar problem to this and possibly the solution:
We have apex 3.0.1 installed on database 11g on windows 2003 server and running it in embedded pl/sql.
Application has some simple pages with few fields to enter and a button to submit the data.
As long as the user is working everything seems fine, response after clicking submit button is less then 5 sec. But when the user stops working for 15 min or a bit more and then clicks submit button everything stops responding for annoying amount of time(can take few minutes). Data is processed after that and the user can continue working normally until it takes a 15 min pause again. This does not happen on specific page, but randomly on all pages.

Anyone any clue?

Thanks Andrej
jkallman

Posts: 2,942
Registered: 01/10/01
Re: Preformance problem after user inactivity
Posted: Apr 1, 2008 9:33 AM   in response to: user628512 in response to: user628512
Click to report abuse...   Click to reply to this thread Reply
Andrej,

Is the database being used for other purposes (beyond this APEX application) during that 15-minute interval?

My gut instinct says this is a memory problem - either your shared_pool is too small and it's swapping like crazy, or your OS is swapping virtual memory like crazy. Can you prove or disprove this?

Joel
user628512

Posts: 4
Registered: 04/01/08
Re: Preformance problem after user inactivity
Posted: Apr 3, 2008 1:06 AM   in response to: jkallman in response to: jkallman
Click to report abuse...   Click to reply to this thread Reply
Hi,

Database is used only for apex.
You were right about shared_pool. I corrected the settings to:
4 GB RAM is on server.
I set 2,5 GB max memory for database
and used Automatic memory management
Server never uses more than 20 % of CPU.
There is also no swapping of virtual memory.

Then I tested again.
new results:
If user is constantly using application everything works perfect.
If it waits for half an hour response time varies from 5 to 30 sec.
Works much better but response time of more than 5-10 sec is not acceptable.

I used debug and checked logs for timings.
Header is always shown immediately, then delay(from 1-2 sec normal to 5-30 sec) and after that the page is shown.
Timings show that all pages are rendered in less than a second. Max time for generating a page shows 1,7 sec in log tables.

I wonder now, why is the delay so long if page is always generated very fast.

Is there anything else I could check?
Would it help any if I install OHS?

Andrej
jkallman

Posts: 2,942
Registered: 01/10/01
Re: Preformance problem after user inactivity
Posted: Apr 3, 2008 3:38 AM   in response to: user628512 in response to: user628512
Click to report abuse...   Click to reply to this thread Reply
Hi Andrej,

What are the values of the following database initialization parameters:

SHARED_SERVERS
MAX_SHARED_SERVERS

Joel
user628512

Posts: 4
Registered: 04/01/08
Re: Preformance problem after user inactivity
Posted: Apr 3, 2008 6:11 AM   in response to: jkallman in response to: jkallman
Click to report abuse...   Click to reply to this thread Reply
Hi Joel,

SHARED_SERVERS = 1
MAX_SHARED_SERVERS is blank

Andrej

jkallman

Posts: 2,942
Registered: 01/10/01
Re: Preformance problem after user inactivity
Posted: Apr 3, 2008 6:22 AM   in response to: user628512 in response to: user628512
Click to report abuse...   Click to reply to this thread Reply
Hi Andrej,

Try setting SHARED_SERVERS to 5 and trying again. This is something that could be tuned based upon the load of your system.

The XDB HTTP protocol server is built on top of MTS (which uses a pool of shared sessions). A single page view from a single user may make multiple, concurrent requests for resources (images, CSS files, etc.). As your system becomes idle, the number of database sessions in the pool will drop to the minimum specified by SHARED_SERVERS. There is some startup cost to adding these to the pool.

Joel
dccase

Posts: 1,050
Registered: 11/01/98
Re: Preformance problem after user inactivity
Posted: Apr 3, 2008 6:30 AM   in response to: user628512 in response to: user628512
Click to report abuse...   Click to reply to this thread Reply
Windows likes to swap things out of memory, including Oracle's SGA.
I have seen that kind of situation with my XE server.

I found it helped to set the Lock_SGA parameter to TRUE.

Here's some info from the XE forum:
http://forums.oracle.com/forums/message.jspa?messageID=1199443#1199443

Note that this probably shouldn't be done on a Linux server.
user628512

Posts: 4
Registered: 04/01/08
Re: Preformance problem after user inactivity
Posted: Apr 14, 2008 4:00 AM   in response to: dccase in response to: dccase
Click to report abuse...   Click to reply to this thread Reply
Hi,

Thanks for your answers.
After some testing there were no improvement.
So i installed OHS. And things got better.
Time to generate page is longer, but under 5 sec. Most important the delays were gone.

Andrej

mobra

Posts: 46
Registered: 06/02/06
Re: Preformance problem after user inactivity
Posted: Apr 14, 2008 8:39 AM   in response to: user628512 in response to: user628512
Click to report abuse...   Click to reply to this thread Reply
Your situation seems to be very similar to what we experienced with the Embedded PL/SQL Gateway. However, for us, increasing the shared_servers parameter (as already suggested in this thread) fixed the problem.

I blogged about it here:

http://ora-00001.blogspot.com/2008/04/adventures-with-apex-part-one-boosting.html

- Morten
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums