Home > Archive > PERL Beginners > March 2006 > Performance in multi user environment.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Performance in multi user environment.
|
|
| Nilay Puri 2006-03-24, 7:57 am |
| Hi All,
My perl script connects to database and picks up data and generates an
excel file.
This script is triggered from front end. In multi user environment if 10
users simultaneously starts using the perl script the performance goes
down as 10 perl script are executed at back end which takes up CPU time
What could be the possible alternate approach.
Thanks in Advance.
| |
| Mr. Shawn H. Corey 2006-03-24, 7:57 am |
| Nilay Puri, Noida wrote:
> Hi All,
>
>
>
> My perl script connects to database and picks up data and generates an
> excel file.
>
>
>
> This script is triggered from front end. In multi user environment if 10
> users simultaneously starts using the perl script the performance goes
> down as 10 perl script are executed at back end which takes up CPU time
>
>
>
> What could be the possible alternate approach.
>
>
>
> Thanks in Advance.
>
>
I think if you analyze the situation you will find the bottleneck is in
the database, not Perl. Run a test and use `top -s 1 -u` to see which
process takes the most time. See `man top` for details.
--
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them,
we learn by doing them."
Aristotle
"The man who sets out to carry a cat by its tail learns something that
will always be useful and which will never grow dim or doubtful."
Mark Twain
"Believe in the Divine, but paddle away from the rocks."
Hindu Proverb
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
| |
| Mr. Shawn H. Corey 2006-03-24, 7:00 pm |
| Brian McKee wrote:
> au contraire - If he is using the Spreadsheet::WriteExcel I'm sure it
> buries his server -
> it hits mine hard with just one user.
>
> I don't have a solution, just a comment that it's a real problem.
> I don't suppose you could pre-generate some of the requests?
> like during off-hours or something?
>
> Brian
Oops, that dratted reply bug has hit again!
\ /
o
-( )-
-( )-
-( )-
(_)
I don't use Spreadsheet::WriteExcel but if it's so slow here's an idea.
If the output involves only data, that is, no formulas or macros, then
you could output it in Comma-Separated-Values format (CSV) and load it
into your spreadsheet that way. There are a number of modules on CPAN
<http://cpan.org/> that can do this.
But then again, I still would do a test on the server just to make sure
it is not the cause of the problem.
--
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them,
we learn by doing them."
Aristotle
"The man who sets out to carry a cat by its tail learns something that
will always be useful and which will never grow dim or doubtful."
Mark Twain
"Believe in the Divine, but paddle away from the rocks."
Hindu Proverb
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
|
|
|
|
|