Transcript
Page 1: Full Paper Software Aging and Rejuvenation

Rejuvenation – A technique to slow down Software Aging

Authored byUrvesh Chaudhery

Associate Prof., DAVIM, [email protected]

Abstract

A proactive technique called “software rejuvenation” has been proposed as a way to counteract software aging. It involves occasionally terminating the software application, cleaning its internal state and/or its environment, and then restarting it. Due to the costs incurred by software rejuvenation, an important question is when to schedule this action. While periodic rejuvenation at constant time intervals is straightforward to implement, it may not yield the best results. Software rejuvenation should therefore be planned & initiated in the face of the actual system behavior. This requires the measurement, analysis, and prediction of system resource usage. In this paper we have focused on the self-healing scheme which is meant to disrupt the running service for a minimal amount of time, achieving zero downtime in most cases. We present an approach for software rejuvenation based on automated self-healing techniques that can be easily applied to off-the-shelf Application Servers. Software aging and transient failures are detected through continuous monitoring of system data and performability metrics of the application server. If some anomalous behavior is identified, the system triggers an automatic rejuvenation action. For this we have also explained the usage of virtualization to optimize the self-recovery actions along with simple self healing examples.

Keywords: Software rejuvenation, software aging, virtualization, self-healing.

1.0 INTRODUCTION

The normal stages of software life begin with its initialization and the start of its processing. It works flawlessly for a long time. While it is working it is slowly degrading. Little pieces of unused memory are reserved for uses that never occur; bits of information are saved even though they won’t be used again, etc. Eventually a software fault will activate. Perhaps it runs out of memory or some other resource, or gets confused by the existence of unused data. When this occurs, an error is likely to happen which might be followed by some type of failure. Many studies reported that system suffered from outages more due to software faults than hardware faults and named this phenomenon as “software aging”, The phenomenon of “software aging,” is the one in which the state of the software or its environment degrades with time.. The primary causes of this degradation are the exhaustion of operating system resources, data corruption, and numerical error accumulation. Eventually, this may lead to performance degradation of the software or crash/ hang failure or both. Some common causes of “software aging” are memory bloating and leaking, unreleased file locks, data corruption, storage space

Page 2: Full Paper Software Aging and Rejuvenation

fragmentation, and accumulation of round-off errors. Since aging leads to transient failures in software systems, environment diversity, a software fault tolerance technique that is based on changing the operating environment, can be employed proactively to prevent degradation or crashes. This involves occasionally stopping the running software, “cleaning” its internal state or its environment, and restarting it, such a technique known as “software rejuvenation”. The term was proposed by Huang et al. This counteracts the aging phenomenon in a proactive manner by removing the accumulated error conditions and freeing up operating system resources. Garbage collection, flushing operating system kernel tables and reinitializing internal data structures are some actions by which the internal state or the environment of the software can be cleaned.

Software’s never deteriote, the software appears to age due to the degradation of the operating environment (for example, gradual depletion of resources). Likewise, “software rejuvenation” actually refers to rejuvenation of the environment in which the software is executing not the re-manufacturing of the software’s. Software rejuvenation is a periodic, pre-emptive restart of a running system to prevent future failures. It is one aspect of a self-healing system. Interesting and new problems to study rejuvenation of large scale systems are:

What is a state in a large-scale system for rejuvenation analysis? Here, all the states which can lead to failure are considered.

Failure symptoms are at a system/ network (macro) level but rejuvenation actions are at a component (micro) level; we study the relation between the two.

What are the models and analytical methods for rejuvenation in large-scale systems

How does one do rejuvenation in a large system through gradual load shedding What is a safe (clean internal) state to take back up of the data in the system? How does the technology become common practice

2.0 Why Systems fail?

A fault in an algorithm’s implementation can lead to an erroneous computation for specific values of a program variable, a case of fault activation causing an error. The software can use this incorrect result internally for further calculations, in which case the error propagation leads to additional errors. A failure occurs only when the system uses one of these incorrect calculations in a way that influences perceivable system behaviour, or when error propagation causes a failure occurrence. Based on the relationships between faults, errors, and failures, we can offer two explanations as to why software may behave differently under apparently identical conditions. First, if there’s a long delay between the fault activation and the final failure occurrence—for example, traversing several different error states in the error propagation—then it’s difficult to identify the user actions that actually activated the fault and caused the failure. Simply repeating the steps carried out a short time before the failure occurrence might not lead to its reproduction.3.0 Self Healing in Software’s ( Rejuvenation)

Page 3: Full Paper Software Aging and Rejuvenation

Systems that have the ability to manage themselves and dynamically adapt to change in accordance with policies and objectives are termed as autonomic computing systems. This system enables computers to identify and correct problems often before they are noticed by the user. Autonomic systems have the capability to self-configure, self-optimize, self- protect, as well as self-healing. Systems that have these characteristics are termed as self-managing systems. Autonomic pervasive computing, maintains characteristics from both autonomic computing and pervasive computing environment. Like pervasive computing, devices running in this area should be context and situation aware and these devices form an ad-hoc ephemeral network. These devices are also expected to have the ability to self-optimize,

Figure 1

Self-healing describes devices or systems that have the ability to perceive those are not operating correctly and, without human intervention, make the necessary adjustments to restore them to normal operation. A system that continues its operation even in presence of faults is termed as a fault tolerant system. The concept of self-healing goes beyond fault tolerance since it also provides the device with the capability of recovering from fault by itself or with the assistance of other devices present in the network. Fig. 1 depicts the scope of self-healing autonomic pervasive computing.

4.0 Characteristics of Self-healing Model

A self-healing model targeted for autonomic pervasive computing should have the following attributes:

Page 4: Full Paper Software Aging and Rejuvenation

1. Less Infrastructure. Extensive infrastructure support is not required. The main requirements are a powerful servers, proxies, etc. If the focus is on truly pervasive environments then the model should work independently without any external support as in this environment infrastructure support is not always available.2. Lightweight. The model should be lightweight in terms of executable file size.3. Non-degradable performance. The model should not put much overhead on the performance of the device.4. Energy efficient. Self-healing models should be energy efficient. It should not require much battery power for computation or communication purposes.5. Transparent. The main idea behind designing autonomic systems is transparency. Every self-healing model should have some level of transparency. However, it should also inform the user about critical system information.6. Secure. Self-healing systems require information distribution and backup to recover from faults. The information distribution and storage should be highly secure to maintain user privacy and security.

An effective self-healing service should address the following challenges: No regular functionality of the network will be hampered due to any fault of any

device. All significant information of the faulty device should be preserved in secure

fashion. The device will be facilitated to heal its fault by itself or at best with the

assistance of other devices of that network. After reviving, the faulty device should be able to regain its previous states in

such a way that it should feel there was no fault.

To address the above challenges in an opposite manner, the self-healing system has following steps:

A. Fault detectionB. Fault notificationC. Faulty device isolationD. Fault healing

Fig. 2 shows the architecture of self-healing service. The fault-detection and fault-notification unit is used by each device running on the server. The fault detection unit may be utilized by both the healing manager and the device itself. But the other three units (faulty device isolation, alteration, information distribution) should be handled by the healing manager.

Page 5: Full Paper Software Aging and Rejuvenation

Figure 2: Architecture of Self Healing Service

4.1 FAULT DETECTION

Fault can be classified from different perspectives:

1. Hardware Fault - This fault is mainly caused by physical constraints of the devices running in autonomic pervasive computing environment. Hardware faults considered here are given below.

a. Low battery power: Battery is the main power source for mobile devices. This fault occurs due to insufficient battery power.b. Limited signal strength: Wireless communication is one of the main communication medium for mobile devices. While the signal strength is low, in most cases, the mobile devices are not able to communicate with each other and the entire network starts malfunctioning.c. Insufficient disk space: Sometimes mobile devices fail to work properly due to insufficient disk space. We are considering this fault as a hardware fault.d. Byzantine fault: These faults encompass those faults that are commonly known as \crash failures" and \send and omission failures." A system may respond in an unpredictable way, if there is any Byzantine fault.

2. Software Fault -It includes the following faults.

a. Application fault: Application fault occurs due to problem in any kind of software application that is running in the mobile devices in autonomic pervasive computing environment.b. Middleware Fault: Middleware is the software layer between the operating system and the applications. It plays a very important role in autonomic pervasive computing

Page 6: Full Paper Software Aging and Rejuvenation

environment. Any fault that occurs due to problem in middleware is called middleware fault.c. OS fault: There are some faults that occur in OS level. These faults are named as OS fault.

3. Prioritized Fault - According to priority, we have classified faults into the following categories:

a. Low priority faultb. Medium priority faultc. High priority faultThe healing manager has a queue for different kind of faults reported by different devices. The priority has been assigned to help the healing manager. High priority faults should be handled first, then medium priority faults, and finally low priority faults.

4. Communication FaultAll types of fault related to wireless communication belong to this category. Network failure is one kind of communication fault.

High-quality fault detection, the first step of a self-healing process, not only prevents loss of resources but also lessens healing time. To ensure supreme quality, our proposed Self-healing approach periodically monitors as well as Self-healing for Autonomic Pervasive Computing 9 assembles the status of all of the running applications, memory, power, communication signal etc. Drastic changes in those values will generate faults. By using the rate of change of these over time, it tries to figure out the existence as well as the cause of a fault.

4.2. FAULT NOTIFICATION

How can a device inform the healing manager that it is in fault? If the device is in fault then is it really possible to inform of the fault? In a distributed computing system, heart beat message and absence of heartbeat massage are used to notify the fault. In autonomic pervasive computing, we have applied the similar concept but in a modified way. We have introduced different kinds of message systems like OK message, SOS message etc. to inform the healing manager not only of the presence of a fault but also the cause of the fault.

4.3 FAULTY DEVICE ISOLATIONThe isolation of faulty devices from the remaining network, a grand challenge of fault tolerant as well as self-healing system, can be achieved in self-healing in a very simple way. For this in software, every device is mapped with another one by means of service availability in these devices. It is adequate to remove the entry of the faulty device from that mapping to ensure its isolation from the entire network. The detailed description of our approach is presented in the following section.

4.4 FAULT HEALING

Page 7: Full Paper Software Aging and Rejuvenation

Attributes of self-healing system for autonomic pervasive computingWe have proposed some solutions for fault detection, fault notification and faulty device isolation. These solutions have the following attributes:

a. Less Memory footprint: Our system doesn't require much memory.b. Less Time complexity: The overall time complexity of our system is O(n).c. Transparent: Our system involves nominal user intervention to do fault detection, notification, and faulty device isolation.d. Solution for Infrastructure less system: Our system concentrates only at infrastructure less system.e. Scalable system: Even with the increase of the number of the devices in autonomic pervasive computing environment, our solution works fine.

Figure 3. Flow diagram of self-healing for autonomic pervasive computing

5.0 RATIONALE FOR A NEW SCHEME OF SOFTWARE REJUVENATION

Here, we explain the guidelines of our scheme, where we developed a software rejuvenation technique.

1. Our rejuvenation mechanism should be easy to apply in off-the-shelf Application Servers without re-engineering the applications or the middleware.

Page 8: Full Paper Software Aging and Rejuvenation

2. The mechanism should provide a very fast recovery to reduce the MTTR to the minimum: if possible, we should achieve a zero downtime even in case of restart.3. The mechanism should not lose any in-flight request or session data at the time of a restart or rejuvenation; the end user should see no impact when there is some restart in the server.4. The software infrastructure should automate the rejuvenation scheme to improve the self-healing abilities of the server.5. The rejuvenation mechanism should not introduce a visible overhead during runtime.6. The scheme should not require any additional hardware: it should work well in single server and in cluster configurations.7. The mechanism should be easy to deploy and maintain in complex IT systems.

We are mainly focused on the healing of software aging and transient failures. Permanent software bugs, operator mistakes, and hardware failures are out-of-scope of our mechanism. Several studies have reported the large percentage of transient software failures and the importance of software aging in 24_7 applications [8] and this is our target failure model.

The concept of micro rebooting, from the ROC Project [25], was likely the most advanced contribution in the area. However, that scheme does not fulfill some of our guidelines: points 1, 3, and 7. First, the microrebooting technique requires the re-engineering of the middleware and the restructuring of the applications to make them “crashonly.” The microrebooting concept was experimented in an instrumented version of JBoss, and it cannot be easily applied to other application servers. Second, in their scheme some of the work-in-progress can be lost during a restart operation. For instance, in [29], the authors presented an interesting result: when they applied a restart they lost3,900 requests, but when they used the microreboot of a component they lost only 78 ongoing requests. Even so, some requests were still lost, which means that some of theend users will see the impact of that microrestart. This may undermine their confidence level in the Website, or may cause some inconsistency in enterprise applications.We feel that when applying a rejuvenation action to avoid software aging, it is mandatory that we do not lose any request at all: a restart should be fully transparent to all the end users. And it is important that the MTTR for a protective restart should be zero, if possible. A clear recipe to avoid downtime when there is a server restart is to use a cluster configuration: when one server is restarted, there is always a backup server that assures the service. However, even in these cluster configurations, the server restart has tobe carefully done to avoid losing the work-in-progress in that particular server. Using a cluster for all the application servers in an enterprise represents a huge increase in termsof budget: in [2], it is argued that the adoption of a cluster may represent an increase of 4-10 times more in the budget, when compared with a single-server configuration. If weincrease the number of server machines and load balancers, we are also increasing the cost of management and Total- Cost-of-Ownership (TCO).

In order to achieve a low MTTR for planned restarts even in a single-server configuration, we decided to exploit the use of virtualization. With this technique, we are

Page 9: Full Paper Software Aging and Rejuvenation

able to optimize the rejuvenation process without requiring any additional hardware. Our rejuvenation mechanism is totally supported by software, and can be easily deployedin existing IT infrastructures. It can be applied on cluster configurations or single-server applications.

6.0 VM-REJUV: THE FRAMEWORK

Our rejuvenation mechanism can be applied in any Application Server: it can be Websphere, WebLogic, JBoss, Tomcat, Microsoft.Net, or others. All the persistent state of the application is maintained in a database that should be made reliable by some RAID topology. Exception is made to the state of the application that is maintained in session objects. This session data cannot be lost in a restart operation. We do not require any restructuring of the applications or the middleware container and the scheme should workseamlessly with any server in the market. The main requirement is the use of a virtualization middleware like VMWare , XEN or Virtuoso.We have adopted XEN in our experiments, but all the software infrastructure that was developed could be used in any other virtualization middleware. On top of our virtualization layer, we create three virtual machines per application server: one VM to run a software load balancer (VM-LB), one VM where we run the main application server, and a third VM where we execute a replica of the application server that works as a hot standby.

The VM-LB also runs some other software modules that will be responsible for the detection of software aging or transient failures. When this happens, this module will trigger a rejuvenation action. In this action, we do not restart the main server right away: first, we start the standby server; all the new requests and sessions are sent by the LB to this second server, the session state is migrated to the secondary server, and we wait for all the ongoing requests to be finished in the primary server. Fig. 3 presents the main modules of our rejuvenation framework.

VM1 runs the following software modules:- A Load Balancer (LB).- A module that collects system data from the application servers.- A module that applies some techniques for aging forecast.- Another module that detects transient failures in the target servers.- A software watchdog.- The coordinator of the rejuvenation procedure.

In our experiments, the LB module was implemented by using the Linux Virtual Server (LVS). LVS is a 4-layer load balancer that also provides IP fail-over capabilities and a myriad of balancing policies. All the client requests are sent to the LVS that forwards the request to the active application server. For the Watchdog functionality, we used the director d tool. This tool is bundled together with LVS and has direct access to the LVS server table. It executes HTTP probing to some static HTML object and is used to detect server outages. We have enhanced this tool to avoid the occurrence of false alarms. For the system monitoring, we used Ganglia. It requires the installation of a system probe in

Page 10: Full Paper Software Aging and Rejuvenation

every target server (S-Probe). The Ganglia probe does the monitoring of several system parameters like CPU, memory usage, swap space, disk usage, number of threads, I/O traffic, connection to the database, among other system parameters. All the collected data is assembled and sent to a main daemon running in VM1 (Data Collector). This module applies some detection rules and provides the data feed for two of the other modules: the Aging Detector and the Anomaly Detector. These two modules use some detection techniques based on the data collected by different sensors:

1. System-level parameters, collected by Ganglia.2. Communication protocol errors (HTTP errors, TCPIP errors, communication time-outs) that are collectedby the watchdog and the P-Probes.3. Error codes and anomaly detection by runtime searching in the log files.4. Application-specific sensors (HTML errors in message responses) that are collected by the P-Probes.5. Performability metrics like the continuous surveillance of the overall throughput and latency as wellas the fine-grain latency per service component, collected by the P-Probes. The Aging Detector is a core module in our system: in the first version of our project this module detects potential anomalies and evidences of software aging by applying some reactive rules to the monitoring data. The surveillance of external QoS metrics has been proved relevant in the analysis of Web server and services [37] and it has been highly effective in the detection of aging and fail-stutter failures [38] in a previous study that was presented in [21]. We have used similar techniques in this paper. In the future, we plan to enhance this module with statistical learning techniques [23] and time-series analysis [39] to provide some more accurate forecast of the occurrence of software aging.The Anomaly Detector is a complement of the above module: it detects application-level anomalies, protocolerrors, log errors, and threshold violations in system parameters. System data is collected in runtime and thepatterns for default and acceptable behavior continuously monitored. If some of the system parameters exceed (above or below) the expected values, some triggers will be launched by this module. The module also includes direct detection of errors in log files and communication messages. In the other virtual machines (VM2 and VM3), we execute two replicas of the Application Server; both servers should have access to a database in the back-end. In each of these VMs (VM2 and VM3), we install a Software Rejuvenation Agent (SRA-Agent) that is responsible for the rejuvenation operation. This module is directly coordinated by the SRA-Coord. There are three other probes that should be installed in both VMs:1. S-Probe corresponds to the Ganglia probe;2. Log Probe is a simple software module that performs some anomaly analysis at the logs of the container;3. Log Probe, that is a small proxy installed in front of the application server: it filters some error conditions and collects some fine-grain performance metrics, like throughput and latency. This Log Probe is able to distinguish latency variations per service component that is externally accessible by the end users. In the case of a Java-based

Page 11: Full Paper Software Aging and Rejuvenation

container like Tomcat, we used the servlet filter capability to implement this functionality.The SRA-Coord module works in coordination with the two SRA-Agents to achieve a clean restart procedure. During the server migration process, the main concern is to avoid losing any ongoing request that is being executed in the primary server. There is a window of execution where we have both servers running in active mode and we need toassure a clean restart. The primary server is able to be restarted only when all its session data has been migrated to the secondary server, all the in-memory caches should be flushed to the database and the server should have no more ongoing requests. When all these conditions are executed, the local SRA conducts a rejuvenation of the server. By saving all the session state to the standby server, we might be able to achieve one of the fundamental features of crash-only software [40]. In a nutshell, crash-only software is structured in such a way that it is able to handle failures just by restarting without requiring any complex recovery procedure. All these software modules were implemented by using open-source tools, like LVS, ldirectord, and Ganglia. The deployment of this framework is straightforward and does not require any change to the applications or the middleware containers. Although we have explained the main modules of our framework, the reader should take into account that the main focus of this paper is to present an experimental study of our rejuvenation mechanism.

Figure 3 :

7.0 CONCLUSIONS

In this paper, we presented a simple but effective approach for software rejuvenation: it can be applied to off-the-shelf application servers, it achieves a zero downtime without losing any work-in-progress and does not incur in a significant performance overhead. It can be used in a single server or in a cluster configuration without any additional cost. We just require the use of a virtualization layer and the installation of some software

Page 12: Full Paper Software Aging and Rejuvenation

modules. The goal of our project is to study the application of the software rejuvenation technique as an important piece of the puzzle that is necessary to provide self-healing abilities for application servers.

8.0 References :

1. Self-healing for Autonomic PervasiveComputing by Shameem Ahmed1, Sheikh I. Ahamed2, Moushumi Sharmin1, and Chowdhury S. Hasan2

2. Using Virtualization to Improve Software Rejuvenation by Luis Moura Silva, Javier Alonso, and Jordi Torres


Top Related