Great rundown Brad

-mk 

-----Original Message-----
From: [email protected] [mailto:[email protected]] 

"It has always been my understanding that CF was better suited to fast
running processes."

In general, fast request times are desired when they are a response to a web
request.  Nobody is sitting in front of a keyboard waiting for your long
running job to complete so there's really nothing wrong with the fact that
is will run for a long time.  I've run scheduled tasks that took hours on
ColdFusion and it worked fine.  If you have a dedicated ColdFusion server
processing this job, I say do it.  If you want this process to run on your
main ColdFusion server that is also serving your web content, you have a few
questions to ask yourself.

At face value a long running process can have the following affects on the
server:
1) It uses a thread.  You only have so many of these available.  If no more
than 1 of these long running processes are gong at the same time, it will
only be taking 1 thread at any given time away from the rest of the server.

2) It can take CPU usage from your CF server.  This is largely dependent on
WHAT the process is doing.  Is most of the process CFML code execution?  If
so, it will probably take a lot of CPU load and will slow
down the other threads.   If 99% of the process is waiting on some huge
database query to run, then I would say that thread will have a very minimal
impact on the other requests.

3)  It can cause locks on CF/Web resources.  This depends on what the code
does.  There could be CFLOCKs your app may have which would affect other
requests.  If you are running ColdFusion Standard, there are semaphore locks
for things like PDF generation and SMS gateways because they are
single-threaded unless you have ColdFusion Enterprise.  A process that reads
or writes a large number of files may also bog down disk activity for the
server.  Memory consumption may also be an issue. 
Once again, this all depends on what your process is doing.

4) It can cause locks on DB resources.  If this process spends a lot time
hitting the database, it can cause a lot locks and disk I/O based on what it
is doing.  If it is reading only, this would be a very good place for a
replicated DB server.  

So I guess my answer is a big fat "it depends".  I would say there are
long-running jobs that would be perfectly safe to have on a box also serving
a web site.  That being said, I would personally feel much safer having it
run on a dedicated server.

~Brad



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329068
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to