Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

IIS 4.0 performance with PerlIS.dll

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  IIS6 web site dosn't start afert Exchange Install..  
Author Message
bj_newsgroups

External


Since: Aug 28, 2003
Posts: 12



(Msg. 1) Posted: Thu Aug 28, 2003 4:05 pm
Post subject: IIS 4.0 performance with PerlIS.dll
Archived from groups: microsoft>public>inetserver>iis (more info?)

Loads Perl56.dll
I am running a script that used the
File::Temp package.
To created the filename.
the script can be called many time in one second.
the last example it got called 8 times, but only 6 files appeared.

is there a performance issue I need to address with the perl.dll
or is it the loading of the \perl\lib\auto\fcntl\FCNTL.DLL

I notice I got loaded twice and different times.
the last time there was a collision and the Inetinfo.exe has to relocate.
Could this operation delay the system enough to cause this problem?

Let me know what other info you need to help.

 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
tdevere

External


Since: Aug 29, 2003
Posts: 449



(Msg. 2) Posted: Fri Aug 29, 2003 5:27 am
Post subject: RE: IIS 4.0 performance with PerlIS.dll [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello BJ,

Not aware of any specific problem... what do you mean that there was a
collision and inetinfo.exe has to relocate? did it crash?

I would check with perl to find out if there's a known performance issue or
for that matter any known issues about perl specific dll's...

Thank you,

Tony DeVere [MSFT]
Microsoft IIS
Newsgroup Support
tdevere.TakeThisOut@online.microsoft.com

"Please do not send email directly to this alias. This is our online
account name for newsgroup participation only."

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
bj_newsgroups

External


Since: Aug 28, 2003
Posts: 12



(Msg. 3) Posted: Fri Aug 29, 2003 5:27 am
Post subject: Re: IIS 4.0 performance with PerlIS.dll [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Tony that is a statement in the Win Debug.
I assume it is the memory manger re-arranging modules and when it goes to
load a new module, it has to clear memory of other modules.. or something
like that. anyway the memory management takes time, can could cause a delay
in the new module executing.
Also when I look at the Time in the IIS log it went form 80 to 760 when I
started using the File::Temp package.
since I only need the Random string generator, I have pulled the _replaceXX
routine out and have strip it down to one line.
It is taking me awhile since I am learning perl to understand what the code
is doing.

LOL.

"[Tony Devere]" <tdevere.RemoveThis@online.microsoft.com> wrote in message
news:09rheUdbDHA.2220@cpmsftngxa06.phx.gbl...
 > Hello BJ,
 >
 > Not aware of any specific problem... what do you mean that there was a
 > collision and inetinfo.exe has to relocate? did it crash?
 >
 > I would check with perl to find out if there's a known performance issue
or
 > for that matter any known issues about perl specific dll's...
 >
 > Thank you,
 >
 > Tony DeVere [MSFT]
 > Microsoft IIS
 > Newsgroup Support
 > tdevere.RemoveThis@online.microsoft.com
 >
 > "Please do not send email directly to this alias. This is our online
 > account name for newsgroup participation only."
 >
 > This posting is provided "AS IS" with no warranties, and confers no
rights.
 > You assume all risk for your use. © 2001 Microsoft Corporation. All rights
 > reserved.
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
bj_newsgroups

External


Since: Aug 28, 2003
Posts: 12



(Msg. 4) Posted: Fri Aug 29, 2003 10:09 am
Post subject: Re: IIS 4.0 performance with PerlIS.dll [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have posted in the alt.perl group as well.
if you look at the code I have a 510 error if the open does not happen.
in the IIS logs I only show 200 (ok)
however I show 8 posts in the IIS logs and only 6 files on the drive.

So I figure that the post never gets to the CGI script.This to me is an IIS
problem. I need to know how to trouble shoot it.

here is the code. No I don't expect anyone to debug code for me. Just
figure out why I don't get the code to run from IIS.

#!/usr/local/bin/perl
#
#
# we want to take the complete text and save to a file.
# working script in place on 7/26/03.
require 5.005;
use strict;


if ($ENV{'REQUEST_METHOD'} ne "POST")
{
print "Status: 501 Not Implemented-Expecting a POST\n";
print "\n";
exit(-1);
}
#at least a post
#Now get the the XML data.


&handleOrder();

print "Status: 200 OK\n";
print "\n";
exit(0);

sub handleOrder
{
# now write to file
my $query_string; #= $ENV{'QUERY_STRING'};
read(STDIN,$query_string,$ENV{'CONTENT_LENGTH'});

# array of char that can replace the X
my @CHARS = (qw/ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 _
/);

my $file = 'cgiorders/yahoo_order_XXXXXXXXXXXX';
$file =~ s/X(?=X*\z)/$CHARS[ int( rand( $#CHARS ) ) ]/ge;


if ( !open(RAW,"> $file.txt") )
{
print "Status: 510 opening $file \n";
print "\n";
exit(-1);
}
print RAW "$query_string";
close(RAW)
}


"BJ Freeman" <bj_newsgroups.DeleteThis@free-man.net> wrote in message
news:uicZI$ZbDHA.1872@TK2MSFTNGP12.phx.gbl...
 > Loads Perl56.dll
 > I am running a script that used the
 > File::Temp package.
 > To created the filename.
 > the script can be called many time in one second.
 > the last example it got called 8 times, but only 6 files appeared.
 >
 > is there a performance issue I need to address with the perl.dll
 > or is it the loading of the \perl\lib\auto\fcntl\FCNTL.DLL
 >
 > I notice I got loaded twice and different times.
 > the last time there was a collision and the Inetinfo.exe has to relocate.
 > Could this operation delay the system enough to cause this problem?
 >
 > Let me know what other info you need to help.
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
bj_newsgroups

External


Since: Aug 28, 2003
Posts: 12



(Msg. 5) Posted: Fri Aug 29, 2003 10:46 am
Post subject: Re: IIS 4.0 performance with PerlIS.dll [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

This is more thinking out loud, so to speak.

each instance of PerlIS is run as an individual thread?
I was told that is no limit to number of thread. is this correct?
so each post to the CGI starts a new thread.
each thread access the CGI script.
Each script generates a random file string.
if a script try's to open a file name exactly like a previous thread then I
should get a 510 error. Yet I see, in the IIS logs only 200 (ok)
What happens if two scripts are timed to open the file, with the same file
name exactly at the same time, to the microsecond?






"BJ Freeman" <bj_newsgroups.DeleteThis@free-man.net> wrote in message
news:uicZI$ZbDHA.1872@TK2MSFTNGP12.phx.gbl...
 > Loads Perl56.dll
 > I am running a script that used the
 > File::Temp package.
 > To created the filename.
 > the script can be called many time in one second.
 > the last example it got called 8 times, but only 6 files appeared.
 >
 > is there a performance issue I need to address with the perl.dll
 > or is it the loading of the \perl\lib\auto\fcntl\FCNTL.DLL
 >
 > I notice I got loaded twice and different times.
 > the last time there was a collision and the Inetinfo.exe has to relocate.
 > Could this operation delay the system enough to cause this problem?
 >
 > Let me know what other info you need to help.
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
tdevere

External


Since: Aug 29, 2003
Posts: 449



(Msg. 6) Posted: Sun Aug 31, 2003 6:41 pm
Post subject: Re: IIS 4.0 performance with PerlIS.dll [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello BJ,


Please understand, I do not understand Perl Script - I cannot read your
code.

Moving past that, I think you are mistaking a scripting problem for a
problem executing script.

HTTP 200 Ok simply means that the request was executed. IIS isn't
responsible for making sure that the script however performs it's duty -
only that it was executed.

Whenever you execute a perl cgi script, IIS spawns a new thread to handel
that code. There is not an unlimited thread count - it all depends on your
machine resources available. Check out:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechn
ol/windowsserver2003/proddocs/standard/ref_reg_globalentries.asp

MaxPoolThreads
Registry Path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters
Data Type: REG_DWORD
Default value: 4
Range: 0 - 4,294,967,295 (unlimited)
Specifies the number of pool threads to create per processor. Pool threads
watch for the network for requests and process incoming requests. The
MaxPoolThreads count does not include threads that are consumed by ISAPI
applications. By default, only four CGI applets can run concurrently. If
you run more than four CGI applications, you should increase this value in
order to increase the throughput. Optionally, you could set the
UsePoolThreadForCGI value to FALSE (0), but this is somewhat dangerous
because it can significantly decrease performance during high usage of CGI
applications. Generally, you should not create more than 20 threads per
processor.


I would suggest the following course of action:

Break your code down into smaller segments. Test each part individually.
Use a debugger or debug print type statements to go over each line of code.
Your problem is not IIS - it is the way your script is working. I
understand that you have error handling in place that supposed to catch a
problem - but that doesn't mean that IIS is at fault. It's much more likely
that your code isn't catching the correct problem.



Thank you,

Tony DeVere [MSFT]
Microsoft IIS
Newsgroup Support
tdevere.RemoveThis@online.microsoft.com

"Please do not send email directly to this alias. This is our online
account name for newsgroup participation only."

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.
 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
bj_newsgroups

External


Since: Aug 28, 2003
Posts: 12



(Msg. 7) Posted: Sun Aug 31, 2003 6:41 pm
Post subject: Re: IIS 4.0 performance with PerlIS.dll [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Tony:
Thanks for the reply.
You are correct, it is not IIS fault. The script was creating duplicate
Filename so files got written over.

BTW am using IIS 4.0
However I do want some clarification:
I was told that Perl.exe could only have 4 instances
I was told there is no limit (reasonable limit) on Perlis.dll.
I don't have the key in my (nt 4.0 sp6a) registry, If I put it in will it
have an effect?
The link was to IIS 6.0
About all IIS 4.0 does is run one page that accepts a post and accesses an
SQL DB for real-time inventory, which takes 4287 to execute, and the
script the write the post information to file.
is it on a 1.2 gig CPU with 750mb of ram. The CPU rest at about 11%. it
spikes to 45% when process the web posts.
the Server has only Wins and DNS tasks besides the IIS.

currently we are up to 15 posts in one sec.
from the time column of the IIS log it looks like the max execute time is
6279
I am not sure what units that time frame is in. Assuming ms then that is
6.279 seconds.
so if I was getting 15 post per second. in 7 seconds I would have 105
process running. before the first one finished.

I eventually expect 1200 persecond.

I am open to any suggestions on how to increase the performance of IIS so it
can handle this processing task.

Yes eventually I will have more than one webserver dedicated to these two
processes. I just need to know how much one will handle so when we get near
the max point to can new servers.





"[Tony Devere]" <tdevere.RemoveThis@online.microsoft.com> wrote in message
news:nWvZiZ9bDHA.1320@cpmsftngxa06.phx.gbl...
 > Hello BJ,
 >
 >
 > Please understand, I do not understand Perl Script - I cannot read your
 > code.
 >
 > Moving past that, I think you are mistaking a scripting problem for a
 > problem executing script.
 >
 > HTTP 200 Ok simply means that the request was executed. IIS isn't
 > responsible for making sure that the script however performs it's duty -
 > only that it was executed.
 >
 > Whenever you execute a perl cgi script, IIS spawns a new thread to handel
 > that code. There is not an unlimited thread count - it all depends on your
 > machine resources available. Check out:
 >
<a style='text-decoration: underline;' href="http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechn" target="_blank">http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechn</a>
 > ol/windowsserver2003/proddocs/standard/ref_reg_globalentries.asp
 >
 > MaxPoolThreads
 > Registry Path:
 > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters
 > Data Type: REG_DWORD
 > Default value: 4
 > Range: 0 - 4,294,967,295 (unlimited)
 > Specifies the number of pool threads to create per processor. Pool threads
 > watch for the network for requests and process incoming requests. The
 > MaxPoolThreads count does not include threads that are consumed by ISAPI
 > applications. By default, only four CGI applets can run concurrently. If
 > you run more than four CGI applications, you should increase this value in
 > order to increase the throughput. Optionally, you could set the
 > UsePoolThreadForCGI value to FALSE (0), but this is somewhat dangerous
 > because it can significantly decrease performance during high usage of CGI
 > applications. Generally, you should not create more than 20 threads per
 > processor.
 >
 >
 > I would suggest the following course of action:
 >
 > Break your code down into smaller segments. Test each part individually.
 > Use a debugger or debug print type statements to go over each line of
code.
 > Your problem is not IIS - it is the way your script is working. I
 > understand that you have error handling in place that supposed to catch a
 > problem - but that doesn't mean that IIS is at fault. It's much more
likely
 > that your code isn't catching the correct problem.
 >
 >
 >
 > Thank you,
 >
 > Tony DeVere [MSFT]
 > Microsoft IIS
 > Newsgroup Support
 > tdevere.RemoveThis@online.microsoft.com
 >
 > "Please do not send email directly to this alias. This is our online
 > account name for newsgroup participation only."
 >
 > This posting is provided "AS IS" with no warranties, and confers no
rights.
 > You assume all risk for your use. © 2001 Microsoft Corporation. All rights
 > reserved.
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
bj_newsgroups

External


Since: Aug 28, 2003
Posts: 12



(Msg. 8) Posted: Mon Sep 01, 2003 2:18 pm
Post subject: Re: IIS 4.0 performance with PerlIS.dll [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

as a follow-up.
rewrote the code so it executes in 30-80 (from the IIS logs)
I have had up to 8 processes in one second.
So my only concern at this point is where the cut off point will be
The processor does not spike about 25%
memory usage is 49mb for the whole system.
so as long as the thread manager does not have problems I am hoping to have
up to 300 perlIS.dll processes running in one second.


"BJ Freeman" <bj_newsgroups RemoveThis @free-man.net> wrote in message
news:uicZI$ZbDHA.1872@TK2MSFTNGP12.phx.gbl...
 > Loads Perl56.dll
 > I am running a script that used the
 > File::Temp package.
 > To created the filename.
 > the script can be called many time in one second.
 > the last example it got called 8 times, but only 6 files appeared.
 >
 > is there a performance issue I need to address with the perl.dll
 > or is it the loading of the \perl\lib\auto\fcntl\FCNTL.DLL
 >
 > I notice I got loaded twice and different times.
 > the last time there was a collision and the Inetinfo.exe has to relocate.
 > Could this operation delay the system enough to cause this problem?
 >
 > Let me know what other info you need to help.
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS 4.0 performance with PerlIS.dll 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]