For Programmers: Free Programming Magazines  


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.



Thanks & Regards,
Nilay Puri

---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates.
Tom Phoenix

2006-03-24, 7:00 pm

On 3/24/06, Nilay Puri <nilay_puri@yahoo.com> wrote:

> 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 1=

0 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


If all ten of them are going to end up seeing the same excel file, you
should probably generate it once (hourly or daily?) and store it in a
file, rather than regenerating it ten times.

But if it's a custom report for each, you might use the technique from
one of Randal Schwartz's columns. Although the column deals with
search results, it works just as well for what you're doing. This one
can give the users an immediate page so that they know that the excel
file is being generated, and later they can see the finished file when
it's ready.

http://www.stonehenge.com/merlyn/We...ques/col20.html

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training
Timothy Johnson

2006-03-24, 7:00 pm


One way would be to have the user's form create a text file on the
server and then have a background process do the report generation
sequentially. That might make certain users take a little longer, but
if your machine is bogged down it might make the whole process faster in
the end.

Another possibility would be to create a tab-separated .txt file. Excel
will automatically split it on the right fields and you don't have to
worry about pesky commas in your data.




-----Original Message-----
From: Nilay Puri [mailto:nilay_puri@yahoo.com]=20
Sent: Friday, March 24, 2006 2:42 AM
To: beginners@perl.org
Subject: Performance in multi user environment

Hi All,
=20
My perl script connects to database and picks up data and generates an
excel file.
=20
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
=20
What could be the possible alternate approach.
=20
Thanks in Advance.



Thanks & Regards,
Nilay Puri
=09
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC for
low, low rates.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com