1 Discussion of multithreading on Win32 mod_perl



Similar documents
LOAD BALANCING TECHNIQUES FOR RELEASE 11i AND RELEASE 12 E-BUSINESS ENVIRONMENTS

Exploiting Remote Memory Operations to Design Efficient Reconfiguration for Shared Data-Centers over InfiniBand

An Implementation Of Multiprocessor Linux

VMWARE WHITE PAPER 1

CHAPTER 1 INTRODUCTION

Exploring Oracle E-Business Suite Load Balancing Options. Venkat Perumal IT Convergence

Distribution One Server Requirements

Oracle9i Application Server: Options for Running Active Server Pages. An Oracle White Paper July 2001

SCALABILITY AND AVAILABILITY

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Multi-core Programming System Overview

White Paper Perceived Performance Tuning a system for what really matters

MAGENTO HOSTING Progressive Server Performance Improvements

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

Web Server Software Architectures

The course will be run on a Linux platform, but it is suitable for all UNIX based deployments.

Accelerating Rails with

S y s t e m A r c h i t e c t u r e

Intel DPDK Boosts Server Appliance Performance White Paper

The Benefits of Verio Virtual Private Servers (VPS) Verio Virtual Private Server (VPS) CONTENTS


CHAPTER 4 PERFORMANCE ANALYSIS OF CDN IN ACADEMICS

There are a number of factors that increase the risk of performance problems in complex computer and software systems, such as e-commerce systems.

E) Modeling Insights: Patterns and Anti-patterns

Proactive, Resource-Aware, Tunable Real-time Fault-tolerant Middleware

Optimizing TYPO3 performance

WEBLOGIC ADMINISTRATION

Painless Web Proxying with Apache mod_proxy

Whitepaper: performance of SqlBulkCopy

The objective of WebSphere MQ clustering is to make this system as easy to administer and scale as the Single Queue Manager solution.

Optimizing Performance. Training Division New Delhi

ELEC 377. Operating Systems. Week 1 Class 3

Delivering Quality in Software Performance and Scalability Testing

Legal Notices Introduction... 3

CHAPTER 3 PROBLEM STATEMENT AND RESEARCH METHODOLOGY

Performance Prediction, Sizing and Capacity Planning for Distributed E-Commerce Applications

Course 55144B: SQL Server 2014 Performance Tuning and Optimization

Where IT perceptions are reality. Test Report. OCe14000 Performance. Featuring Emulex OCe14102 Network Adapters Emulex XE100 Offload Engine

Tushar Joshi Turtle Networks Ltd

CentOS Linux 5.2 and Apache 2.2 vs. Microsoft Windows Web Server 2008 and IIS 7.0 when Serving Static and PHP Content

Validating Java for Safety-Critical Applications

Capacity Planning Process Estimating the load Initial configuration

Performance Optimization For Operational Risk Management Application On Azure Platform

Virtualization in Linux

How to Configure an Initial Installation of the VMware ESXi Hypervisor

Front-End Performance Testing and Optimization

Load Balancing Oracle Web Applications. An Oracle White Paper November 2004

Muse Server Sizing. 18 June Document Version Muse

"Charting the Course... MOC AC SQL Server 2014 Performance Tuning and Optimization. Course Summary

HOSTING PYTHON WEB APPLICATIONS. Graham Dumpleton PyCon Australia Sydney 2011

Performance Evaluation of Shared Hosting Security Methods

Windows Server Performance Monitoring

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

SQL Server Performance Tuning for DBAs

Apache Tomcat. Load-balancing and Clustering. Mark Thomas, 20 November Pivotal Software, Inc. All rights reserved.

WebGUI Load Balancing

How To Install Linux Titan

4D WebSTAR 5.1: Performance Advantages

Why Threads Are A Bad Idea (for most purposes)

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

Blackboard Learn TM, Release 9 Technology Architecture. John Fontaine

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Implementing a Well- Performing and Reliable Portal

9 Tried and Tested Tips to Increase the Power of your Magento Store

Gofer. A scalable stateless proxy for DBI

1 How to Monitor Performance

bla bla OPEN-XCHANGE Open-Xchange Hardware Needs

Performance Testing. Configuration Parameters for Performance Testing

Building Reliable, Scalable AR System Solutions. High-Availability. White Paper

Development and Evaluation of an Experimental Javabased

Real-Time Analysis of CDN in an Academic Institute: A Simulation Study

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Operating System: Scheduling

Web Performance, Inc. Testing Services Sample Performance Analysis

Oracle9i Release 2 Database Architecture on Windows. An Oracle Technical White Paper April 2003

Operating System Tutorial

Web Hosting for Fame and Fortune. A Guide to using Apache as your web-server solution

CHAPTER 15: Operating Systems: An Overview

NEFSIS DEDICATED SERVER

IBM Software Group. Lotus Domino 6.5 Server Enablement

Intrusion Detection Architecture Utilizing Graphics Processors

Agility Database Scalability Testing

Control 2004, University of Bath, UK, September 2004

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest

JBoss Seam Performance and Scalability on Dell PowerEdge 1855 Blade Servers

Principles and characteristics of distributed systems and environments

LISTSERV in a High-Availability Environment DRAFT Revised

Installation and Deployment

Remote Support. User Guide 7.23

Overview: Load Balancing with the MNLB Feature Set for LocalDirector

The International Journal Of Science & Technoledge (ISSN X)

Transcription:

Discussion of multithreading on Win32 mod_perl 1xx 1 Discussion of multithreading on Win32 mod_perl 1xx 1 Discussion of multithreading on Win32 mod_perl 1xx 1

11 Description 11 Description This document discusses the multithreading limitations of mod_perl-1xx on Win32 12 The problem On Win32, mod_perl is effectively single threaded What this means is that a single instance of the interpreter is created, and this is then protected by a server-wide lock that prevents more than one thread from using the interpreter at any one time The fact that this will prevent parallel processing of requests, including static requests, can have serious implications for production servers that often must handle concurrent or long-running requests This situation changes with Apache/mod_perl 20, which is based on a multi-process/multi-thread approach using a native Win32 threads implementation See the mod_perl 2 overview for more details, and the discussion of modperl-2 in Win32 on getting modperl-2 for Win32 in particular 13 Does it really matter? How serious is this? For some people and application classes it may be a non-problem, assuming the static material issue is handled differently Low traffic and single user development sites will likely be unaffected (though the lattest are likely to experience some surprises when moving to an environment where requests are no longer serialized and concurrency kicks in) If your application is CPU bound, and all requests take roughly the same time to complete, then having more processing threads than processors (CPUs) will actually slow things down, because of the context switching overhead Note that, even in this case, the current state of mod_perl will bar owners of multiprocessor Win32 machines from gaining any load balancing advantage from their superior hardware On the other hand, applications dealing with a large service times spread - say ranging from fractions of a second to a minute and above - stand to lose a great deal of responsiveness from being single threaded The reason is that short requests that happen to be queueued after long ones will be delayed for the entire duration of the "jobs" that precede them in the queue; with multitasking they would get a chance to complete much earlier 14 Workarounds If you need multithreading on Win32, either because your application has long running requests, or because you can afford multiprocessor hardware, and assuming you cannot switch operating systems, you may want to consider a few workarounds and/or alternatives - which do not require waiting for 20 You may be able to make Win32 multithreading a non-issue by tuning or rearranging your application and your architecture (useful tips on both counts can be found elsewhere in this document) You may be able to significantly reduce your worst-case timing problems or you may find that you can move the webserver 2

Discussion of multithreading on Win32 mod_perl 1xx 15 See Also to a more mod_perl friendly operating system by using a multi-tier scheme If your application needs the full power of the Apache modules (often the case for people running outside Apache::Registry) you may want to consider a multi-server load balancing setup which uses mod_rewrite (or a similar URL partitioning scheme) to spread requests to several web servers, listening on different ports The mod_proxy dual server setup, discussed in the "Strategy" section, is also a possibility, although people who have tried it have reported problems with Win32 mod_proxy If you code to Apache::Registry (writing CGI compliant code) and can characterize the time demanded by a request from its URL, you can use a rewrite-based load balancing with a single server, by sending short requests to mod_perl while routing longer ones to the pure CGI environment - on the basis that startup, compilation and init times will matter less in this case If none of the above works for you, then you will have to turn to some non mod_perl alternatives: this, however, implies giving up on most of the flexibility of the Apache modules For CGI compliant scripts, two possible (portable) alternatives which are supported in an Apache/perl environment are straight CGI and FastCGI In theory a CGI application that runs under mod_perl should have very few or no problems to run under straight CGI (though its performance may be unacceptable) A FastCGI port should also be relatively painless However, as always, your mileage may vary If you do not mind replacing Apache with IIS/PWS, you may want to experiment with ActiveState s value added PerlEx extension, which speeds up CGI scripts much in a way similar to what FastCGI does PerlEx is transparently supported by CGIpm, so users of this package should be more or less covered (A IIS-FastCGI accelerator is, regrettably, no longer available) 15 See Also The mod_perl documentation and http://httpdapacheorg/, especially the discussion of Apache-2 and modperl-2 Help is also available through the archives of and subscribing to the mod_perl mailing list 16 Maintainers Maintainer is the person(s) you should contact with updates, corrections and patches Randy Kobes <randy@theoryx5uwinnipegca> 17 Authors Randy Kobes <randy@theoryx5uwinnipegca> Only the major authors are listed above For contributors see the Changes file 3

Table of Contents: 1 1 Discussion of multithreading on Win32 mod_perl 1xx 2 11 Description 12 The problem 2 2 13 Does it really matter? 2 14 Workarounds 3 15 See Also 3 16 Maintainers 3 17 Authors i Table of Contents: Discussion of multithreading on Win32 mod_perl 1xx