Skip to Main Content

Breadcrumb

Warning

Before you submit your comment...

Remember - this is about feedback to the original question. AskTOM is about building a strong Oracle community, not stealing time away from others needing assistance by sneaking in a brand new question under the guise of "Comment".

If your comment requires a response that might include a query, please supply very simple CREATE TABLE and INSERT statements. Nice simple scripts so we can replicate your issue simply.

Remember to take a look at Legal Notices and Terms of Use before supplying a comment...

Don't forget, your comments are public. If you want to send a comment to just the AskTOM team, please use the feedback option

Comment

Highlight any SQL, PL/SQL, or fixed-width text and click the <code> button
 (will never be published or used to spam you)

Question and Answer

Tom Kyte

Thanks for the question, mo.

Asked: December 01, 2002 - 11:25 am UTC

Last updated: March 23, 2011 - 3:34 pm UTC

Version: 8.1.7

Viewed 1000+ times

You Asked

Tom:

1. If you have a web application that is performing well when accessed by one borwser, how would you do testing in a real production mode with thousands of users using it?

2. If it slows down sometimes, how would you know if it is from the Network, Netscape, application, or server box? It seems Netscape 4.7 is slower than IE 6.0?

3. What is your criteria on when to use MTS (Shared server configuration). Is it when you have more than 1000 users? It seems in your book you always recommend to use dedicated server mode.

4. Since the client here is the application server, is it when everytime a user uses it using the browser, the app server creating a connection to the database even though it is the same userid/password?
How is the connection (server process) get closed or deleted? is it when the user closes his browser? would the app server(mod_plsql) have a maximum number of browser requests or database connections it can handle.

Thank you,

and Tom said...

1) I have a custom "grab" and "hurl" program that flings URLs at the web server (grab works like a proxy server, records a session, hurl -- well, you can imagine by the name what it does).

You could either build your own infrastructure or buy one -- like mecury loadrunner. there are other public domain web "flingers" out there as well you can research (on your own)

2) netscape 4.7 has issues with tables in tables in tables in tables. Netscape 4.7 is older then dirt. Netscape 6 and 7 are faster then IE in my experience and Mozilla is better then the lot (I love that I never see ads anymore, never have annoying pop-ups, no more animated silly gifs -- all thanks to mozilla. My favorite feature "block images from this server" -- ads begone!)

read
</code> http://docs.oracle.com/cd/A97329_03/core.902/a95102/toc.htm

instruementing your code helps.  For example, if you see a URL on asktom with NO in it, change it to YES and see what happens.  Goto the asktom home page, click on the first article there.  You'll see timings down the side of the page -- very very helpful (mandatory in fact) for finding out what part of a page is causing a slowdown (if the PAGE is the bottleneck)

auditing helps -- eg: all of my pages on asktom are measured and every request is an audit trail entry in a nice little log.  I can tell you anything I need - how many hits (page views - minus images and such), hits/second, hits/whatever, how many distinct users, how many sessions, and most importantly perhaps -- how long each and every page took to generate in the database.  I can tell you for example that in the last couple of hours (this was a holiday weekend) that:

I had 4,277 pages views.
from 584 ip addresses
representing 694 users (firewalls/nat make some users look the "same")
they hit an average of 6-7pages
they hit 21 distinct page types
the longest it took to generate a page was 6.71 seconds (that was me, running this report)
the fastest was 0.11
the average was in the 0.27 range

Now, say asktom was having a performance issue, I can tell you from that simple report that:

a) it wasn't the database, the pages were returning from the db as fast as expected.

b) if it WAS the database (say the max response time was thru the roof or the average krept up to 1 second or something), I have a detailed log of how long each page was taking -- I could ISOLATE quickly the page in question and then I could drill down on that with the NO-YES parameter to see if it was a specific query on that page.


This all assumes you thought about these things <b>before you set down to develop your application of course!!!</b>  Designing for performance and tuning is something that you need to build into the code from day one (read chapter 10 of my book "Expert one on one Oracle" for more details on this philosophy.

there are those that will say "but tom, that stuff you have in your pages -- the NO/YES trick, that is overhead".  Yes, you know what -- they are right.  But there are two types of overhead in this world -- the type you don't need and can get rid of and the type that if you don't have, you are totally lost.  Guess which category I put this stuff into!

Now, if you add into this mix the Web Cache
http://docs.oracle.com/cd/A97329_03/caching.htm

you can start looking at network response times and bottlenecks as well - how long the database takes to generate a page is one thing, how long the app server is taking to dish it out is another -- and how long the end user is taking to get the pages -- these are things a man in the middle like the web cache can help you with (and it'll cache things to boot).


3) It seems in my book -- in the architecture chapter -- I outlined when to use MTS.  When you physically cannot run dedicated server anymore because you are out of resources.  Plain and simple.  You use MTS when you need to get the N'th user logged into the database and performance goes down the tubes due to too many OS processes from dedicated server (or when that nth user fails cause you've exceeded some OS limit).

Re-read the architecture write up I have on that.  There is even a little "graph" for that -- when you hit the point of dimishing marginal returns.

it may be 100 users
it may be 1000 users
it may be 5000 users
it may be 423 users

In short, it is not a function of users.

4) quote

"Since the client here is the application server, is it when everytime a user 
uses it using the browser, the app server creating a connection to the database 
even though it is the same userid/password?"

response "parse error -- I don't understand"

I think you are asking about connection pooling at the app server level.
see
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:6273432647961 <code>

Mod_plsql will reuse a connection -- so, if a connection already exists in the pool maintained at the app server, no new connection. mod_plsql might have to create a new connection if none exist.

connection pooling is available for pretty much every language out there that you can use in the middle tier. with plsql it "just happens", with java you use a jdbc connection pool.





Rating

  (65 ratings)

Is this answer out of date? If it is, please let us know via a Comment