 |
Rethinking the Datacenter
Sponsored by HP
Today's datacenters need to increase utilization, get control over power and cooling costs, and align with business objectives. Download this eBook to learn about the challenges facing the data center in a world where digital information is growing at a torrid pace and costs are being held in check. Learn more. »
|
|
Putting the Green into IT
Sponsored by HP
Electricity use in data centers is skyrocketing, sending energy bills through the roof, creating environmental concerns and generating negative publicity. "Going Green" means looking to technologies like virtualization, energy-efficient chips and racks, and implementing policies that extend beyond the data center. Learn more. »
|
|
Managing the Modern Network
Sponsored by HP
In a global economy where information crosses the globe in an instant, and where Web-based applications power business, it's more important than ever to ensure your network is safe from threats and optimized to deliver the data your business needs. »
|
|
Evaluating Software as a Service for Your Business
Sponsored by Webroot
Is Software as a Service just hype, or is something really going on here? See if your company can benefit as SaaS tries to change the face of the enterprise.
»
|
|
Is Your Disaster Recovery Plan Good Enough?
Sponsored by HP
Preparing for a disaster is more often than not part of the storage planning process, and it is one of the most difficult tasks, since it includes local hardware and software, networking equipment, and a test plan. Learn how to get disaster recovery right. »
|
|
|
|
|
|
The Perl You Need to Know Special: Introduction to mod_perl Part 3
June 19, 2000
|
Like all gripping tales of conquering heroes and/or Godfathers, our story of
mod_perl is a trilogy. We conclude the mod_perl trilogy with some tricks and
sleight-of-hand with which you can squeeze a few extra processor cycles out
of your web server -- also known as optimizations. Specifically, we'll
look at some ways to take advantage of the mod_perl environment to better
optimize usage and, more importantly, re-usage of Perl scripts and database
requests.
|
Reuse and Recycle
If your mod_perl enabled
Apache
server only needed to execute your
Perl
scripts one time, forever, we probably wouldn't need this article.
Or mod_perl. Or the Internet, for that matter. So it's established that your
scripts need to run repeatedly, whether "repeatedly" means once
per day, once per minute, or ten times per second. Nobody likes doing the
same thing over and over, Apache included -- it's silly and inefficient to
repeat an entire task every time you need to reach a certain goal. This
brings us to the core purpose of optimization:
Suppose that you need to wash a sinkful of dirty dishes. You'll need hot
water from the tap to fill the sink and an open bottle of dish washing
detergent, preferably the kind that leaves your hands silky smooth. You
could turn on and off the tap for each dish, waiting for the water
to get hot each time, re-close and re-open the detergent bottle for each
dish, and so on. An onlooker would probably observe that you're not the
sharpest tool in the shed -- and they'd be right. But without optimizations,
this is exactly what we do with Apache everytime a Perl script is executed:
turn on and off the tap water for each dish, wait for the water to get hot,
re-open the detergent bottle, and so forth.
To get the most out of mod_perl, we need to think about how mod_perl re-uses
compiled code, and design a strategy that best balances the efficiencies of
re-using compiled code versus the costs in memory consumption. Understanding
mod_perl in this way means understanding the parent-child relationship, which
we mean in a purely server-centric way, and not at all in a Dr. Laura/John
Bradshaw/Benjamin Spock sort of way.
Contents:
Who's Your Daddy?
More Who's Your Daddy
Database Savoir Faire
Building the Optimized Beast
Conclusion and Resources
Conclusion
The Perl You Need to Know
Who's Your Daddy?
|