Solved

ASP program degrade on more load issue

Posted on 2002-07-11
5
162 Views
Last Modified: 2012-05-04
We are doing a new version of an ASP program.
The old one works fine when loaded with more than 300
hundred users.. However, we can't seem to find what
is the problem with the new version with similar load..
It slows down such that its unusable.

The old version just uses ASP and basic functions while
the new one uses ASP with VBScript classes.

When stress testing, the old version CPU goes up but
request wait time goes up and down.. while in the
new one, CPU goes up more - nearly max up and wait time
goes up and stays constant.

Any idea what we can check into?
0
Comment
Question by:ykf2000
5 Comments
 
LVL 20

Accepted Solution

by:
jitganguly earned 67 total points
Comment Utility
Check
1. Database connections e.g. Make sure you close them
rs.close
set rs=nothing
conn.close
set conn=nothing

2. Close the instances of user defided DLL's and classes

3. Do not keep connections open. The best way is to open the connection, get the data, close the connection.

4. Try to filter records from backend e.g. use where cluase instead recordsert filters

5. Check your database table indexes

6. Close the instances of the classes when they are no longer needed.

7. For code table lookups, use joins to get the value. Do not go to backend to get his first name/last name from employee # etc.

8.If the session times out, force them to log back. Put this kind of code on top of each page
If seession("islogin")="" then
response.redirect "default.asp"
end if

These are certain guidelines. Unless we see the specific code, its hard to tell you
0
 
LVL 29

Assisted Solution

by:Göran Andersson
Göran Andersson earned 67 total points
Comment Utility
First of all: moving to object oriented code is a step in the right direction. Object orientation is the best thing that happened to programming since Pascal.

Sadly enough, the support for OOP in VBscript (or VB either for that matter) is not very extensive. And object orientation in script languages means more overhead than in a compiled language. But still, it's a great step forward.

Because of the overhead, you have to be careful when implementing OOP in a script language. What normally goes for object orientation, is not always true when it's done in a script language.

For an example, properties are good, but unless you actually do something when setting or getting a property, a simple public variable is faster.

Don't use too many objects. For an example, instead of creating one object for each record in a recordset, just have one object where you can choose what record you want to read.

Do you have code for some small class of yours, that we could have a look at? It's hard to imagine everything that you may have come up with...
0
 

Assisted Solution

by:bfoust
bfoust earned 66 total points
Comment Utility
Here are some tips that i've used with success

+ use the ENABLESESSIONSTATE = False directive if your page does not require session management.

+ use the GetRows method of the recordset object to get your data into an array.  Close the DB connection immediately after.

+ Are you useing the Microsoft Web Site Stress Test tool?  If so, be sceptical of the results.  I've had times where the testing was dead on and other times where the testing absolutely KILLED the webserver but when set live, the site was fast as hell under the same load.

+ Its usually better to pass variables into your object through methods rather than using properties.  For example
myObject.MyProperty = "blue"
myOjbect.RenderColor

could be

myObject.RenderColor "blue" instead.  Thats just my opinion though, no hard facts really to support it.

** please provide code so we can better help you **
0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split Points - bfoust / GreenGhost /  jitganguly
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now