One time about the difference between an ASP variable and a pair-like shutdown and not close test
Source: Internet
Author: User
For an ASP program, the variables used are global variables, as well as some established objects. Good ASP programmers have the habit of releasing them, but releasing and not releasing
How much difference does it have between them? So today it was specially tested.
Test content: The global variable of the test has one, the object is the connection object that uses the connection SQL.
First Test: End program execution without releasing global variables.
Second Test: Releases global variables and ends program execution.
Pre-Test Preparation: Wait for the server to rest for 5 minutes before running the test to ensure the content and CPU have stabilized.
Test hardware and Software: the server for the usual PIII550, memory 256M. Fitted with win2000+iis5.0+sql2000
Client one for Win2000, using IE5.5, open a browse window
Another client is win98,ie5.0, opening two browsing Windows
Total Test Number: Three client cumulative execution to 20000 stop.
First Test report (not released):
Memory footprint at start: 146464K
Memory footprint After starting a client: 146996K CPU resource Occupancy 31-32%
Start two client memory footprint: 147316K CPU Resource Footprint 49-52%
The following memory changes to-> 147304K-> 147328
Start three client memory footprint: 147868K CPU Resource Footprint 59-69%
The following memory changes to-> 147868K-> 147864K-> 147856K-> 147724K-> 147828K
-> 147860K-> 147868K-> 148084K-> 148076K-> 148088K
-> 148040K-> 147940K
Memory footprint at end: 147940K
Memory release after three clients stop a request:
147940K-> 148000K-> 147988K-> 146472K-> 146448K-> 146452K
Second Test report (release):
Memory footprint at start: 146652K
Memory footprint After starting a client: 146996K CPU resource Occupancy 35-38%
Start two client memory footprint: 147700K CPU Resource Footprint 55-62%
Start three client memory footprint: 148252K CPU Resource Footprint 53-71%
The following memory changes to-> 148248K-> 148060K
....
-> 148080K-> 148076K
Memory footprint at end: 147940K
Memory release after three clients stop a request:
148076K-> 147956K-> ...-> 146452
Here are two tests that stabilize the memory difference at the end of the client:
First time: 146464-146716 = 252K
Second time: 146652-146452 = -200k
The first time to consume the memory about 252K, the best server seems to be no longer released
The second time is very strange, to the last memory but save 200K, I do not know why.
Here are two of memory usage when you start and end a test:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service