26
Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt April 2010 Evaluating and Comparing the Impact of Software Faults on Web Servers

Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

Embed Size (px)

Citation preview

Page 1: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

Naaliel Mendes, João Durães, Henrique MadeiraCISUC, Department of Informatics EngineeringUniversity of Coimbra{naaliel, jduraes, henrique}@dei.uc.pt

Apr

il 20

10

Evaluating and Comparing theImpact of Software Faults on

Web Servers

Page 2: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

2Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Presentation Outline

Research Problem

Our Approach

Methodology Specification

Methodology Implementation

Case Study Perfomance and Dependability Results

Conclusions

Page 3: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

3Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Research Problem

How a web server will behave if a software fault (ex., bug) is activated in one of their hosted web applications? No impact? Crash? Unresponsive? Abnormal resource usage? No idea?

Does it matter? At this moment millions of web servers are being used,

many of them hosting web applications. Developed under time constraint, by inexperienced programmers.

What is the problem? Why should it be solved? No methodology to evaluate how web servers are affected

by software faults present in web applications.

Netcraf’s April-10 Survey: more

than 205 millions of web

sites

Netcraf’s April-10 Survey: more

than 205 millions of web

sites

Page 4: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

4Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Our Approach

Experimental method to evaluate and compare the impact of software faults on web servers (WS) Fault injection target: Web Application (App).

How do we do that? By collecting measurements on response time, response

correctness, resource use, (…) of the web server when faults are injected in one of its hosted web applications.

State of the web server after each software fault activation: Crash, Unresponsive, Wrong Results, Resource Use Penalty, No Impact.

Two phases: 1) Golden Run 2) Fault Injection Run

WSDBClien

tApp

Page 5: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

5Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Specification

Generic Aimed at addressing any type of web

servers and web applications.

Technology-independent Can be implemented by different teams

using different technologies. But you MUST monitor the web servers

properties and follow the procedures we specify.

Includes classical dependability benchmark elements Experiments rules, Workload, Faultload,

Measures, and Instrumentation Tools.

Page 6: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

6Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Specification

Target System Architecture Web Serving System

Server machine

Client machine

Windows XP Operating System

WEB SERVER(Tomcat | SJSWS | Jetty)

TPC-W Remote Browser Emulator

(activate faults)

Integrity Checker Client

Windows XP Operating System

DB2 Database

Database machine

Windows XP Operating System

TPC-W Web App

Integrity Checker Application

SW Faults in TPC-W Servlets

Page 7: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

7Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Specification

Target System Components

System Under Benchmark

(SUB)

Diagnostic System (DS)

WEB SERVER (Benchmark-target)

Workload Application

(Fault Injection Target)

Integrity Checker Application

Workload

Management System (MS)

Workload Client

Integrity Checker Client

Page 8: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

8Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Specification

Experiment Rules Phase 1.

Golden run. It is used to determine the baseline performance of the system under benchmark (without software faults).

Executed three times and the result is the average of the three executions

Phase 2. Execution of the workload in the presence of

faults to evaluate the dependability properties of the benchmark target.

The number of executions depends on the number of faults

Page 9: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

9Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Specification

Workload Web application that simulates the

activities of a business oriented transactional web server.

Internet commerce application environment. Multiple concurrent on-line browser sessions. Involving both static and dynamic content. Access and update patterns to a database.

Faultload Set of software faults that represents

realistic bugs found in applications. We can find in literature some field studies on

the representativeness of software faults (e.g., [Durães, 2006]).

Page 10: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

10Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Specification

Measures Client-side perspective:

Response Time, Response Correctness, Throughput. Server-side perspective:

Web Server Execution Duration, Web Server Crash (System Process), Log File Size (Number of Exceptions), Processor Use.

Failure Modes State of the web server:

Crash, Unresponsive, Resource Use Penalty, Wrong Results, and No Impact.

Mapping Measures with Failure Modes How do I know that the web server crashed?

Page 11: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

11Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Implementation

Diagnostic Approach Integrity Checker (IC) verify the performance

and error propagation Failure Mode: Web Server Unresponsive, Wrong

Results. How do we verify error propagation?

IC is free of software faults and provides excepted responses.

Client knows the expected result of a request (e.g., Spain => Europe)

Web Server

Web App

IC Response Validator

Integrity Checker

Web App Client

Validator knows the IC expected response

Validator knows the IC expected response

Page 12: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

12Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Implementation

Diagnostic Approach Web Server Processor Monitor observe the

status of the web server process, checking if it is running or not.

Failure Mode: Web Server Crash. Resource Consumption Monitor observe log

file size, number of exceptions, processor use (PerfMon).

Failure Mode: Resource Use Penalty. Data Analyzer. Summarize the data from

different systems source (output files with different formats).

Page 13: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

13Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Implementation

Workload We used a Java implementation of the TPC-W

Benchmark (http://www.tpc.org/tpcw/) TPC’s benchmarks “delivers trusted results to the

industry” Easy to install and run, easy to inject software faults

(in the servlet code). Used in other research works. What is TPC-W?

Ecommerce workload that simulates the activities of a retail store web site.

Emulated users can browse and order books from the website.

Simulates the same HTTP network traffic as would be seen by a real customer using a browser.

10 users were emulated, multiple requests to the web server.

Only one instance of the TPC-W application.

Page 14: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

14Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Implementation

Faultload To select which software faults to include in our

faultload, we used a field study on software fault targeting web applications [Fonseca, 2008].

Each fault is emulated where it could realistically exist in the source code.

The faults were injected manually. There is no software fault injection tool targeting the

bytecode of Java Applications. Two of the most representative faults types were

injected in different points of the web-application source-code.

MIFS (Missing IF Construct plus Statements). WVAV (Wrong Value Assigned to a Variable).

250 software faults (125 of each type) were injected.

Page 15: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

15Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Implementation

Fault Injection 5-Step-Approach1. Analysis of the source-code to find out a

fault injection point.2. Injection of the software fault (MIFS,

WVAV).3. Compilation of the faulty source-code.4. Copying of the faulty web application to a

specific directory.5. Returning the source-code to the original

state (free of fault) and repeat these steps.

Page 16: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

16Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Implementation

Examples of Fault Injection TPCW_Database.java (Class used by TPCW

servlets) MIFS (Missing IF Construct Plus Statement)

WVAV (Wrong Value Assigned to a Variable)

Public class TPCW_Database { (...) public static syncnrozied Connection getConnection() { (...) if (maxConn == 0 || checkout < maxConn) { con = getNewConnection(); totalConnection++; } } (...)}

Public class TPCW_Database { (...) private static final String jdbcPath = “jdbc:db2:tpcw” private static final String jdbcPath = “jdbc:db2:tpcwXXXXXX” (...)}

Page 17: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

17Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Methodology Implementation

Management System Brief summarization of its execution flow:

Starts after the initialization of the operating system Executes preliminary operations to ensure a fresh

fault injection run start. Copy the faulty web application to the web server

directory that will be used in the next fault injection run

Clean-up temporary directory. Starts monitoring tools, the web server (which hosts

the faulty web application), and the client applications (TPCW Client and Integrity Checker Client).

Executes post conditions operations. Normalize, organize, and analyze the output files

generated during the fault injection run Ends by rebooting the operating system

Page 18: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

18Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Case Study: Experimental Setup

Web Servers Apache Tomcat 6.0 Sun Java System 7.0 (SJSWS) Jetty Web Server 6.2.1

Workload TPC-W Web Application

IBM DB2 Database

Operating system Windows XP

Hardware Platform: Server-side: P4 3.0 GHz, 1.46Gb RAM, 80Gb

of HD

Hardware platform and systems surrounding the BT were the same across

all experiments

Hardware platform and systems surrounding the BT were the same across

all experiments

Server machine

Client machine

TPC-W Web App

Windows XP Operating System

WEB SERVER(Tomcat | SJSWS | Jetty)

Integrity Checker Application

TPC-W Remote Browser Emulator

(activate faults)

Integrity Checker Client

Windows XP Operating System

SW Faults in TPC-W Servlets

DB2 Database

Page 19: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

19Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Case Study: Performance Results

Response Time (AVG) & Throughput (Res/sec)

Why did response time go down?The fault activation forced a premature termination of the workload application, reducing the number of requests sent to the web server

component.

Why did response time go down?The fault activation forced a premature termination of the workload application, reducing the number of requests sent to the web server

component.

Page 20: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

20Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Case Study: Dependability Results

Data Integrity No integrity data errors registered by our

Integrity Checker Application. Web server provided expected responses for the

requests targeting the application free of fault (Integrity Checker).

Availability (%)T % S % J %

MIFS (125) 2 1.60% 0.00% 1 0.80%

WVAV (125) 1 0.80% 2 1.60% 0.00%

Web Server Unresponsive

The high number of exceptions thrown by the web app.

consumed all resources of the web server, making it to be

unresponsive.

The high number of exceptions thrown by the web app.

consumed all resources of the web server, making it to be

unresponsive.

Page 21: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

21Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Case Study: Resource Use Results

Disk Use Comparison (%) Percentual Distribution of Log File Size

Log File Size TOMCAT SJSWS JETTY < 1 MB 96.40% 75.20% 73.60%

1MB < 10 MB 1.60% 22.40% 6.80% 10MB < 40 MB 0.40% 1.20% 18.00% 40MB < 80MB 0.40% 1.20% 1.20%

>= 80MB 1.20% 0.00% 0.40%

1

WVAV1

WVAV1 MIFS

2 WVAV ( 95, 100, 146 MB)

1 MIFS2 WVAV ( 95, 100, 146 MB)

Log File Size (Worst Case)

5 min = + 146 MB1 hour = + 1.71 GB

1 day = + 41 GB

Log File Size (Worst Case)

5 min = + 146 MB1 hour = + 1.71 GB

1 day = + 41 GB

1 MIFS2 WVAV

( 50, 67, 50 MB)

1 MIFS2 WVAV

( 50, 67, 50 MB)

1 MIFS2 WVAV 1 MIFS

2 WVAV

1 WVAV

(95 MB)

1 WVAV

(95 MB)

Page 22: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

22Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Case Study: Resource Use Results

Processor Use Comparison (%)

TOMCAT SJSWS JETTY

Fault Types AVG CPU

MAX CPU

AVG CPU

MAX CPU

AVG CPU

MAX CPU

BASELINE 20.36 39.17 19.03 43.36 0.03 0.06 MIFS 18.79 49.62 19.29 52.27 0.29 17.14 WVAV 16.35 52.06 17.85 39.32 0.79 20.65

1 MIFS

1 MIFS

1 WVAV

1 WVAV

1 MIFS

1 MIFS

Web Servers have different behavior to use the processor resource.

These results were collected using the same instrumentation tools.

Web Servers have different behavior to use the processor resource.

These results were collected using the same instrumentation tools.

Page 23: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

23Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Case Study: Failure Mode Results

Which is the most robust of the web servers we evaluated?

Page 24: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

24Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Conclusions

Lessons learnt Software faults present in web applications affect

the performance and the dependability of web servers in a different way across web servers.

In some cases the unavailability rate was around 2%. The TPC-W application tolerated many software

faults. However, in some cases, it generated a large number of

exceptions that contributed to make the web server unresponsive.

The manual injection of the software faults makes hard, but not impossible, the reproduction of our injection campaign.

We believe that the information and references we provided can guide anyone interested in reproducing our experimental setup.

Page 25: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

25Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Conclusions

Future Work Addition of new types of software faults in

our faultload. Conduction of new case studies to

demonstrate the portability and scalability of our approach in other environments.

Advance this work and propose a dependability benchmark for web servers considering the impact of software faults in hosted applications as the main benchmark measure.

Page 26: Naaliel Mendes, João Durães, Henrique Madeira CISUC, Department of Informatics Engineering University of Coimbra {naaliel, jduraes, henrique}@dei.uc.pt

26Systems and Software Engineering Group Presentation (SSE) – Coimbra, Portugal – April 22, 2010Naaliel Mendes

Thank you!

Increase the impact and visibility of your research with

AMBER Raw Data Repository

www.amber-project.eu/repository

Visit the web site!