Implementing Quality of Service in Web Servers by ps94506


									                         Implementing Quality of Service in Web Servers
                              Carlos Montez                   Joni Fraga
                   LCMI - Depto de Automação e Sistemas - Univ. Fed. de Santa Catarina
                        Caixa Postal 476 - 88040-900 - Florianópolis - SC - Brasil

                        Abstract                               model, in which the applications are classified and
This paper analyzes the importance of differentiated           grouped in service classes, and the network infrastructure
services implementation in current web servers, within the     seeks to maintain a relative ordering in the quality
context of new Internet applications. An innovative            obtained among these classes.
approach of resource management is presented, which is             Based on these models, two complementary
carried out through Proportional Cumulative Value              architectures were proposed by IETF: IntServ [2] and
Attribution (PCV) heuristic. This heuristic acts through       DiffServ [3]. The IntServ implements the model of
two policies, which in response to the requests,               absolute guarantee through control of packet flows and a
simultaneously, sort the requests according to                 protocol of resource reserve (RSVP). The routers in
dynamically assigned priorities; and select different          network must keep the state of each packet flow and,
versions of web pages.                                         therefore, has a serious drawback of scalability.
Keywords: Internet applications, E-commerce enabling               The relative differentiation model is implemented by
technologies, Web QoS                                          the DiffServ architecture. This architecture resolve
                                                               scalability problems, dealing with traffic aggregates, that
                                                               is, it classifies and groups flows with similar QoS
1. Introduction                                                requirements (service classes). The DiffServ policies are
                                                               implemented with the aim of supplying QoS to these
The convergence of communication and computation               aggregates, with the central premise that some classes will
technologies has given rise to new types of applications       receive better services than others will.
and, consequently, has required the development of new             Underlying each type of approach is the concept of
techniques that provide support for these applications.        QoS granularity. While in the absolute model, there exists
Two outstanding examples of these new types of                 an individual treatment of QoS; in the relative model, the
applications are electronic commerce and digital libraries.    quality of service is dealt with in flow aggregates.
Both adopt the Internet as a global information bus, and           It is interesting to observe that the DiffServ approach,
have new demands in matters of security, reliability and       which implements the relative differentiation model,
performance. These new applications have to share              considers that the complexity of the network lies along its
resources with conventional applications, such as those of     endpoints. However, the servers and the current
electronic mail, whose the needs for resources are less        applications, dealing with their clients in a uniform way
demanding and, for this reason, can often be ignored.          and processing their requests by FIFO order, are not
    One common characteristic related to these new             prepared for this differentiation of services.
applications is that their demands cannot wait for the             This article defends the use of the relative model for
development of a "new Internet”, because many of these         implementing QoS on web servers, where overload
applications are already being used as part of our daily       conditions tend to degrade the quality of service offered.
routine. Their designers wish to utilize legacy code and       In this way, this paper proposes the use of the concept of
existing Internet services. However, these solutions have      cumulative value [13] as a metric to be adopted in the
serious drawback, because they are constructed with the        differentiation of services, and presents a new heuristic
aim of supplying the services equally to all clients,          called Proportional Cumulative Value Attribution (PCV),
without considering the particular needs of each client.       which, based on this metric, seeks to maintain,
    Today, there is a general recognition of the inadequacy    dynamically, proportional the differentiation of services
of Internet's current paradigm of "the same service for        on web servers.
all", and of the necessity in to adopt immediate solutions         This text is divided into six parts. Section 2 surveys
that offer differentiated qualities of service (QoS) to the    the motivations of the QoS support on web servers.
clients of these applications. Organizations such as IETF      Section 3, presents our approach for implementing
have been seeking open solutions in providing QoS to           differentiation of services using adaptive scheduling
applications. For this reason, there has been an effort to     policies. In section 4, some simulation results of our
implement architectures based on two QoS models. The           approach are shown and interpreted. Section 5 describes
absolute guarantee model which seeks to keep the               related works. Finally, in section 6, the conclusions and
absolute levels of service; and the relative differentiation   suggestions for future research are presented.
2. Differentiation of services on web servers                    adaptive resource management policy, we developed a
                                                                 heuristic scheduling, called (p+i,k)-firm [11], which
With the growth and ubiquity of the Internet, many               sought to avoid failures by joining together two policies:
different web-based services are currently being made            (i) of dynamic assignment of priorities [10] and, (ii) of
available (ex. file hosting, remote assistance, chat, e-mail,    selecting precise/imprecise versions in executions [12].
translation of texts, payments). These services, in turn, are        Our interest is now directed to the behavior of web
being used in more complex applications, such as                 servers in overload situations. All of the arguments
electronic commerce, digital libraries and distance              presented in the previous section directed our research
learning, which require more rigid supports for their            with the aim of also implementing differentiation of
requests for security and quality of service (QoS).              services in this type of server, using adaptive scheduling
     Electronic business has given rise to research              approaches.
concerning security on the web. Today, web servers are
usually installed and configured with various modules of         3.1. Adaptive scheduling
access control. In the same way, we believe that, in the         The essence of the predictable behavior of many systems
specific context of web servers, there are many different        is based on the execution of scheduling policies; these
justifications for a supplementary support for the               determine allocations in resources (processor, network
differentiation of its services.                                 bandwidth, devices) for execution of applications.
     For example, in the case of services of hosting files       Adaptive scheduling approaches assume that the
and web sites, it is possible to distinguish “classes” of        conditions of the system are monitored, and that decisions
clients, who can pay fees proportional to the levels of          regarding scheduling are dynamic and based on these
services offered. Today, clients already pay fees                observations. These approaches are being implemented
proportional to the space made available to them.                increasingly by the research community in real-time
Nevertheless, there also ought to be a differentiation of        scheduling [4-6,10-14] due to the interest in executing
clients, in regard to other parameters, such as time of          real-time applications in dynamic environments, as in the
service.                                                         case of the Internet, where the load cannot be previously
     Web servers in e-commerce systems need just as much         determined.
support for the differentiation of services, due to the              Unlike the periodic model, investigated in our
different classes of accesses, with varying degrees of           previous researches [11], that was formed by a restricted
importance, among the entities involved. As an example,          group of tasks; web servers may have a large number of
it is possible to identify accesses (i) between the company      clients, making non-periodic requests. This characteristic
and the consumers (ex. direct sales), (ii) among companies       makes it difficult to maintain information about the state
(ex. purchases), and (iii) internally within a company (ex.      of each task, as it occurred in our original approach. This
internal communications).                                        scalability problem is similar to the one faced by the IETF
     Succinctly stated, compiling the above-mentioned            with the IntServ architecture. Consequently, like the
information, it is possible to affirm that differentiation can   DiffServ architecture, we also use the aggregation of
be made based (i) on client identities, (ii) on client’s         clients in previously defined service classes. Our adaptive
localizations, or (iii) on the nature of the content.            scheduling approach, then, comes to be applied over the
However, despite the existence of some recent works [4-          group of clients.
9], web servers are not yet prepared for this differentiation        With the aim of maintaining the properties of a
of services. Therefore, seeking to bridge precisely this         proportional differentiation of services, we implemented
gap, we have developed our work that is presented in the         our adaptation model, based on the joining of two
next section.                                                    policies: the priority assignment and the precise/imprecise
3. Differentiation of services using adaptive                    selection of versions. Before describing our adaptation
                                                                 model, it is important discuss its objectives and metrics.
For some time, our line of investigation has been a study        3.2. Multiple versions and metrics on web servers
of the predictability of computational systems in the            Usually, there are two metrics associated with web
presence of transient overloads, where the computational         servers: "service times" and "error rates". However, the
capacity available becomes insufficient to meet the              binary reality of "error" (no service) or "service" (no
demands. In a previous study, we investigated the                error) is a limitation imposed by the traditional
behavior of real-time applications, composed of periodic         computation model.
tasks with firm deadlines [11]. These tasks, exemplified             In the imprecise computation model [12] the aim
by some control and multimedia applications, tolerate            comes to be "execute the service you can, in the time
deadline misses, as long as they occur occasionally. When        available". A server implemented according to this model,
this last condition is violated, it is considered that a time    in a situation of transient overload, can give a partial reply
failure occurred. For this reason, within the scope of an        to a client request, which may be enough for the client to
have the perception that s/he was attended, although, with       example, Linux has many kinds of information about the
a reduced quality. When the server selects the version that      use of the processor within the system of virtual files
offers the best quality, it is said that a "precise execution"   “/proc”. However, this monitoring technique has as a
has taken place. Otherwise, when a partial version is            disadvantage the fact that it is dependent on the support of
selected, it is said that occurred an "imprecise execution”.     the operational system.
    In the specific case of web servers, it is possible to           On the other hand, it is possible to implement a
implement the contents of pages with more than one               monitoring on a level above the operational system and
version. In situations of overload, the server can reply to a    applications, by using middleware mechanisms. To do
client request, with an imprecise version of a web page,         this, it is necessary to alter the socket libraries used by the
that offers reduced quality, but that presents less access       web server for receiving and replying to client requests.
time.                                                            Intercepting requests and replies, one can, for example,
    When a web server's load exceeds its capacity, there is      make a count of the number of requests, and subtract it
great lag in the time it takes to carry out requests, and a      from the number of replies. This simple calculation makes
part of computational resources is wasted on canceled            it possible to verify, at a given moment, the number of
requests by "impatient" clients. Clients could also receive      requests pending that a server is carrying out. It is possible
timeout errors generated by its web browsers. The                to attempt to estimate the load conditions, and judge the
imprecise computation model represents a great                   existence of overload, when the number of requests
contribution compared with the traditional model, since,         pending goes beyond a certain limit.
by responding to some requests in an imprecise way, it               Another technique that can be employed in
reduces the load and, at the same time, offers a return of       middleware is that of direct monitoring of the reply times.
service to the clients.                                          It is possible to evaluate the load of a server, in a given
    In [4], Abdelzaher makes an excellent survey of              time interval, calculating the average time taken to carry
techniques for implementing multiple versions of web             out a request. In this case, it is possible to consider the
pages. This work succinctly recommends for the                   server in an overload state, when this time goes beyond a
implementation of imprecise versions: (i) reduction of size      certain value.
of JPEG images by means of an "aggressive"                           In our work, we have utilized a variation of this last
compression; (ii) reduction of embedded objects on web           approach. Considering that the clients (and their web
pages; (iii) reduction of local links on each page; (iv)         browsers) will not wait indefinitely for the replies to their
elimination of extra visual resources, such as animated          requests, it is possible to assume a failure condition, when
gifs and flash animations. Each one of these strategies          a request goes beyond a given value of maximum time to
seeks to reduce the hits for the server, the use network         be served. This value can be conceived as a kind of
bandwidth, the processing time on the client browser, the        deadline. When a request arrives, a deadline is attributed
processing time on the server. Considering the extreme           to the request. When the server sends the reply to the
case of creating imprecise versions of web pages only            client, it is verified whether or not there was a violation in
with HTML tags, experiments carried out have shown that          the deadline of the request, that is, whether a time failure
almost all the visited pages have had a great improvement        occurred (even considering that the request has been
in performance [4].                                              carried out to the very end).
    To evaluate this adaptation model, another type of               In our adaptive scheduling approach, this accounting
metric is necessary – the cumulative value. This metric,         of failures has two complementary purposes:
introduced by [13], sets out to measure the time spent by
                                                                 (i) It is used to detect the existence of overload, and to
the server, in executing the requests. For example, if a
                                                                     trigger an adaptive mechanism on the server that
server carries out a request through a precise execution,
                                                                     attempts to reduce the load, through the policy of
the cumulative value is incremented by 1 (100%). In case
                                                                     selecting the requests for execution in the imprecise
there is a failure in carrying out the request, the
                                                                     form; and,
cumulative value is incremented by 0 (0%); and, finally,
in case the server replies with an imprecise version, the        (ii) It is used in calculating the cumulative value that will
cumulative value will be incremented by a number                      direct the policy of dynamic assignment of priorities.
between 0 and 1, proportional to the time executed by the
server during that request.                                      3.4. Mechanism for choice of version
                                                                 The imprecise computation model, used by our adaptation
3.3. Detection of overload on web servers
                                                                 approach, implements two versions of each web page
Adaptive scheduling techniques are based on monitoring           hosted on the server. According to the protocol HTTP,
of conditions in the environment. Many different                 each request message contains, in format ASCII, the web
techniques may be employed for this type of monitoring,          site (host), name of page and the directory in which this
such as the use of monitoring load mechanisms offered by         page is stored (Figure 1).
many popular versions of operational systems. For
   GET /reseachers/principal.html HTTP/1.1                                 3.6. History and cumulative value
                                                                           A history of execution of a class, or simply history [10], is
   (Other data of heading)                                                 a k-tuple that stores information about executions of the
                                                                           last k requests of the class. In the model, this information
 Figure 1. Request message format in HTTP 1.1.
                                                                           of records can be resumed as: "P" for precise execution,
    This format makes possible the implementation of the                   "I" for imprecise execution and "X" for deadline miss. At
mechanism for choosing the version in a simple manner                      the end of each request, the history is shifted (from the
[4]. All the pages and objects referring to the imprecise                  right to the left) and the information corresponding to its
version, can be stored under a “/dir.impr” subdirectory. If                execution is added. Figure 3 represents a history of a class
the version chosen for execution is the precise version,                   that missed its deadline ("X") in its last request.
nothing needs to be done. This message is sent to the                                                            history
server with no alteration. However, in case the choice is
for the imprecise version, the message is altered, and the                                                                           X
                                                                                                       P I P P ...
subdirectory “/dir.impr” is linked together the name of the
page. For example, considering Figure 1, the first line of                                 history is shifted              recent activation
the message would then be:                                                                         to the left                      is added

   GET /dir.impr/researchers /principal.html HTTP/1.1.                                                 I P P ... X
                                                                                      Figure 3. History of execution.
3.5. Adaptation model
                                                                              Maintaining the updating of a history makes it possible
Our adaptation model considers the existence of a pre-                     to calculate the absolute cumulative value of the class
defined number of service classes. In the model, presented                 (VCabs):
in Figure 2, the classes are represented by types of metals,
considering the level of service offered by the web server,                    ∀ class i, VCabsi := Vact_formeri + Vact_recenti
proportional to the intrinsic value of the metal. A class of
service will have a FIFO queue associated, which stores                    where, Vact_formeri and Vact_recenti represent,
requests forwarded to the corresponding class.                             respectively, the value obtained by the oldest request and
                                                                           the value obtained by the most recent request in the
                                                                           history of a class i. Both can assume a value Q, so that:
            Service classes
                                                                           Q = 0 if request has missed its deadline,
                   Platinum                       Request queue
                    Gold                            (socket)               Q = 1 if request was executed in precise way,
  HTTP                         scheduling                          Web
 requests           Silver
                                 policies                         server   Q = C ∈ (0,1) if request was executed in imprecise way.
                              precise/imprecise                                When a request is executed in an imprecise way, in the
                   Others         selection             replies
                                                                           calculation of the cumulative value, it is considered that
            Figure 2. The adaptation model.                                this request obtains a worth proportional to the time spent
                                                                           in its execution (C). This means that if a web page has
    The priority assignment policy in the adaptation model                 been implemented in an imprecise form, without deadline
executes a dynamic attribution of priorities for the classes.              miss, and with its access time representing 30% of the
Each class of service, then, has an associated priority. In a              time of the precise version, the cumulative value
queue, all the requests of the corresponding class have the                associated with this request is then assumed to be 0.3.
same priority. These priorities will indicate the order of                     However, the cumulative value calculated above is
execution of the requests on web server.                                   absolute, it is not related to the cumulative values of the
    Before being executed by the server, the                               other classes. It is necessary to calculate the proportional
precise/imprecise selection policy determines whether the                  cumulative value (VCi) for each class i. This value is
execution of the request will be in the precise or imprecise               obtained by summing up the absolute cumulative values
way. The two policies (priority assignment and                             of all the N classes (TotalVCabs), and of a rule of three:
precise/imprecise selection) work in an integrated form in
our heuristics of scheduling called Proportional                                              N
                                                                                 TotalVC = ∑ VCabs i
Cumulative Value Attribution (PCV), and are based on                                         i =1
histories of precise and imprecise executions and of                             ∀ class i , VC i ← (VCabs i ∗ 100 ) / TotalVC
deadline misses, existing for each class defined on the
server.                                                                       From here on in the text it will be assumed that
whenever the contrary is not explicitly stated, the term        responsible for: (i) receiving requests and arranging them
"cumulative value" will refer to the proportional               in a queue (lines 8-9); (ii) taking requests at the heads of
cumulative value.                                               the arrival queues of each class and applying the
                                                                scheduling policies placing the requests in the socket
3.7. PCV policies                                               queue (lines 10-14); and (iii) at the end of each execution
To implement the adaptation model, it is considered that        of a request, verifying whether the respective deadline was
each class of service has an associated Value of Quality        missed, updating the history and cumulative value of the
(VQ). This value is a percentage statically attributed by       corresponding class, and, if indicated, selecting some class
the operator, and it represents the quality desired for that    to execute in the imprecise way in its next activations
class, in proportion to other classes. The sum of the           (lines 15-30).
quality values of all the classes must total 100%:
                                                                  01: initialization:
                       N                                          02:     ∀ class j do

                      ∑ VQ = 100%
                       i =1
                                                                               inicialize history hj with k values ‘P’
                                                                               VCj ← VQj
                                                                  05           prioj ← {lowest priority}
                                                                  06           next_execj ← “precise”
    The two PCV policies act, in an integrated way, with
the aim of keeping the cumulative values as close to the          07: *[
                                                                  08:       if request for a class j arrived →
stipulated values of quality as possible. This means that         09:              enqueue request at class queue
the policies act to seek an ideal situation:
                                                                  10:       if ∃ request at class j request queue →
                  ∀class i, VCi = VQi .                           11:         dequeue the request
                                                                  12:         if next_execj = “imprecise” ∧ VCj ≤ VQj
                                                                  13:              then next_execj ← “precise”
    When the cumulative value of a class, at a given time,        14:         enqueue request in socket queue according
is greater than or equal to its value of quality (VCi ≥ VQi),                               its priority prioj and next_execj version
the class of requests is found to be in a stable state and,
                                                                  15:       if execution of request x for class j ended →
presumably, the mean quality of services offered for the          16:         if present time > deadlinex
requisitions to that class is above or within what is             17:         then
expected. In this case, the value of the difference VCi -         18:              hj ← shift_left(hj) + ‘X’
VQi represents the distance from failure. However, when           19:              calculate VCj
                                                                  20:              if VCj < VQj
the cumulative value of a class is less than its value of         21                   then prioj ← VQj - VCj
quality, it is found to be in a state of failure, and, the        22                   else prioj ← {lowest priority}
greater the difference VQi - VCi, the greater its distance        23:              select class j so that
from stability.                                                                        next_execj = “precise” ∧ max(VC - VQ) and
    Therefore, the priority assignment policy set priorities      24:                        do next_execj ← “imprecise”
                                                                  25:         else
dynamically, taking into account these values, in which,          26:              hj ← shift_left(hj) + executed version (‘P’ ou ‘I’)
the greater the distance of a class from stability, the           27:              calculate VCj
greater is its priority. On the other hand, classes in the        28:              if VCj < VQj
stable state receive the lowest priorities in the system.         29:                  then prioj ← VQj - VCj
    The system needs to decrease its load when a time             30:                  else prioj ← {lowest priority}
                                                                  31: ]
failure (a deadline missed). To do so, the PCV choose a
class to execute in the imprecise way. In this choice, only
classes that are in a stable state are considered. The policy              Figure 4. PCV scheduling heuristic.
always chooses the class with the greatest distance from
                                                                    Because the scheduling model adopted is not overload-
                                                                aware [14] (i.e., it cannot predict future overloads), the
    Inasmuch as a class has imprecise versions being
                                                                precise/imprecise selection policy is directed by the
executed consecutively for its requests, its distance from
                                                                occurrences of overload. In heuristic, the variable
failure will decrease, until it reaches the “critical”
                                                                (next_execj) stores the information as to whether the next
moment, when that class can no longer have its requests
                                                                execution of class j is precise or imprecise. On ending the
carried out in an imprecise form without passing to a state
                                                                reply to a request, when an overload is detected (line 16),
of failure. This search for dynamic equilibrium is carried
                                                                the policy for selection of versions chooses to execute in
out by the integration of the two policies in the heuristics
                                                                an imprecise way, the class that has the greatest distance
of PCV scheduling, described in the following section.
                                                                from failure (line 23). This class is then selected to
3.8. PCV heuristic                                              execute imprecisely in the next request and in the
                                                                following requests of the class (line 24), until it reaches its
The heuristics of scheduling is described through three         critical situation, indicated by the distance from failure
independent execution flows (Figure 4). They are
(line 12). When this state is reached, the class is signaled     misses in comparison with FIFO. The main reason for this
once again to execute its precise version (line 13).             reduction is the fact that, in overload situations, the PCV
    At the beginning of the heuristic (lines 1-6), all classes   approach can reply some requests using imprecise
begin with a precise execution, start from a stable state        versions, reducing the effective load and, consequently,
(VC = VQ) and receive the same priorities (the lowest            the quantity of deadline misses. In other words, the
priority in the system). As a class j goes on receiving          possibility of imprecise executions is a further degree of
requests, its priority is being dynamically altered (lines       flexibility that PCV presents, compared with FIFO, and
21-22 and 29-30) according to the values in terms of its         that this is a determining factor for better performance.
distance from stability (VQj -VCj). It is considered in this                                        1
text, that the greater the numerical value of the variable                                         0,9
prioj, the higher is the priority assigned to class j.                                             0,8

                                                                      Deadline misses
4. Simulation results                                                                              0,7

The scheduling approach was evaluated by means of                                                  0,5
simulations. With this aim, a simulator was developed, in
language C, with a code-source available via FTP [15].
This simulator allows for the configuration of a series of
parameters such as the number of classes in the system                                                                                              FIFO
and its values of quality.                                                                                                                          PCV
    Every class in the simulator receives requests, whose                                           0
                                                                                                         90   100   110   120   130   140   150   160   170
times between arrivals are exponentially distributed,                                                                 Request arrival rate
according to Poisson. In configuration time the following
items are supplied to the simulator: the mean rate of                                               1
frequency of the requests, mean times of replying to the              Absolute Cumulative Values   0,9                                             FIFO
requests in the precise and imprecise versions, and a                                              0,8                                             PCV
relative deadline value, used in the calculation of the                                            0,7
absolute deadline at the moment of arrival for each
    A series of experiments was performed to evaluate the
PCV scheduling approach, comparing it with the FIFO –
the conventional approach on web servers. In each
experiment, many different data were registered, such as                                           0,2

cumulative values, totals of requests for the classes, of                                          0,1

deadline misses and of precise and imprecise executions.                                            0
                                                                                                         90   100   110   120   130   140   150   160   170
    In all the experiments that follow, the imprecise
                                                                                                                      Request arrival rate
execution times were considered 20% of those of the
precise version. In the calculations of the cumulative
values, therefore, each request that loses its deadline adds     Figure 5. PCV versus FIFO: deadline misses and
nothing, while, on meeting its deadline, adds 0.2 or 1,                     absolute cumulative values.
depending on whether it is executed through the imprecise            However, from a high load, the capacity of PCV
or precise version, respectively.                                heuristics to reduce deadline misses comes close (just as
                                                                 that of FIFO) to near zero. This is due to the fact that it
4.1. Comparison of performance with FIFO                         has reached the limit of imprecise executions in the PCV
For these experiments, three classes were defined – Gold,        approach: The selection policy of versions never chooses
Silver and Bronze, with values of quality: VQgold = 0.6;         requests from classes in a state of failure to execute in an
VQsilver = 0.3; and VQbronze =0.1. It was considered that        imprecise form (lines 12-13 of Figure 4).
these classes receive requests, whose load (request arrival          In regard to the comparison of the cumulative values,
rate), represented on the horizontal axes of Figure 5, are       the PCV approach manages to maintain the sum of the
distributed equally among them. A relative deadline value        cumulative values above those of the FIFO approach, in a
was specified, equal to the triple of the mean time in a         large range of load distribution. However, when the rates
precise execution.                                               go beyond a given limit, also due to the limitation
    Figure 5 shows the percentages of deadline misses and        imposed on the selection policy of the versions, the PCV
of the sum of the cumulative values of the classes,              approach presents a reduction in cumulative values,
considering various arrival rates. The results of these          coming close to the values obtained by the FIFO
experiments show that, in general, the PCV approach              approach.
achieves a substantial reduction in the quantity of deadline         While the PCV approach obtains a reduction in the
rates of deadline misses and, consequently, maintains a                                   1,0
good cumulative value, it is important point out that the                                 0,9                  Gold
main purpose of the PCV approach is the differentiation of                                0,8                  Nickel
services. In the section that follows some results are

                                                                   Cumulative value
shown that seek to evaluate the capacity of the PCV
approach to maintain this differentiation.
4.2. Differentiation of services in PCV                                                   0,4

In Figure 7 three graphs are presented, showing the                                       0,3

capacity of differentiation of services in the PCV                                        0,2

approach with, respectively, two, three and five classes                                  0,1
defined. In the experiments involved in supplying the data                                0,0
in the graph (a) of the figure, two classes were defined:                                       70       90           110       130     150         170

one privileged, “Gold” (VQgold = 0.75), and the other with                                                   Request arrival rate
requests considered less important, “Nickel” (VQnickel =                                                 (a) gold: 75%, nickel: 25%
0.25). For the graph (b) three classes were defined,
"Gold", "Silver" and "Bronze" with values of quality,
VQgold = 0.6; VQsilver = 0.3; and VQbronze = 0.1. Finally, for                            0,9
graph (c) five classes were defined, "Platinum", "Gold",                                  0,8                    Bronze
"Silver", "Bronze" and "Iron", with values of quality:

                                                                       Cumulative value
VQplatinum = 0.5; VQgold = 0.26; VQsilver = 0.14; VQbronze =                              0,6
0.07 and VQiron = 0.03.                                                                   0,5
    In all the experiments, the loads offered to the system
were divided equally among the classes. In graph (a) each
class received half a load; in graph (b) each class received
one third of the load; and in graph (c) of the figure, each                               0,2

of the five classes received 20% of the load.                                             0,1

    What is observed by the data obtained is that the PCV                                 0,0
approach manages to maintain the cumulative values quite                                        70        90              110     130     150             170

near the specified values of quality, in nearly all the load                                                    Request arrival rate
distribution range. However, at a given rate, according to                                           (b) gold 60%, silver: 30%, bronze 10%
what was previously discussed, the approach reaches its
limit of executions of imprecise versions. The approach,                                                       Platinum
in this way, comes to count almost exclusively on the                                     0,9                  Gold
priority assignment policy, and finds difficulties in                                     0,8                  Bronze
maintaining the cumulative values near those specified.                                                        Iron
                                                                     Cumulative value

The consequence of this effect on the quality of the                                      0,6
services offered, as it is possible to see on the three graphs
of Figure 5, is that as the mean rate of arrivals comes close
to 200%, an even greater distancing seems to exist,                                       0,4

beyond what is desired, among the cumulative values of                                    0,3

service classes.                                                                          0,2
    In other experiments performed, different loads were                                  0,1
injected in each class, and the behavior of differentiated
services was observed. In the Figure 7 the graphs of the                                        70        90              110     130         150         170
cumulative values of the approaches PCV and FIFO are                                                            Request arrival rate
shown, considering the definition of three classes, with the
                                                                                                     (c) platinum 50%, gold 26%, silver 14%,
following values of quality: VQgold = 0.6; VQsilver = 0.3;
                                                                                                                bronze 7%, iron 3%
and VQbronze = 0.1. The percentage of mean load injected
in each class obeyed the following proportion: Gold: 50%,        Figure 6. Differentiation of services in the PCV:
Silver and Bronze: 25%.                                                         2, 3 and 5 classes.
                        1,0                                                        some requests, reducing the load, while, at the same time,
                                        Gold                                       always seeking to maintain proportion in cumulative
                                        Silver                                     values of the classes.
                        0,8             Bronze
                                                                                       However, it is worthwhile to observe that, despite such
     Cumulative value

                        0,7                                                        a limitation, in all the load situations tested, at no time did
                        0,6                                                        a class with lower value of quality than others obtain
                        0,5                                                        better service quality (greater cumulative value) than those
                                                                                   of higher value of quality.
                        0,3                                                        5. Related works
                                                                                   Recently, some works have been recognizing the
                                                                                   importance of integrating the support of QoS in best-effort
                        0,0                                                        servers. The works of Abdelzaher [4] and Lu [5]
                              70   80   90       100 110 120 130 140 150 160 170
                                                                                   investigated ways of implementing classical control
                                             Request arrival rate                  theories on web servers, with the aim of maintaining the
                                                     PCV                           load offered to these servers below the acceptable values.
                                                                                   In this way, both works implement an adaptive approach,
                        1,0                                                        reinforced by observing the workload on the server. While
                                        Gold                                       Lu’s work [4] rejects connections (requests from clients)
                                                                                   as a way of controlling the load, Abdelzaher [4], as in our
                                                                                   approach, uses the implementation of various versions of
     Cumulative value

                                                                                   web pages.
                                                                                       Striegel et al. [6] work with multimedia servers,
                        0,5                                                        aggregating requests in service classes. They proposed the
                        0,4                                                        use of a heuristic of dynamic assignment of priorities [10]
                        0,3                                                        as a way of distributing the deadline misses on these
                                                                                   servers, seeking to reduce failures. Unlike our proposal, a
                                                                                   failure is assumed when a class has consecutive misses of
                                                                                   deadline, beyond pre-established values.
                                                                                       Some works [7-9] have investigated the performance
                              70   80   90       100 110 120 130 140 150 160 170
                                                                                   of the web server Apache [1] and its possible
                                               Request arrival rate                “bottlenecks”,     and      proposed     mechanisms        for
                                                      FIFO                         implementing differentiation of services. For example,
                                                                                   Eggert and Heidemann [8] considered the existence of
Figure 7. Differentiation of services with different                               only two classes of service, and proposed modification of
             loads: PCV versus FIFO.                                               the source codes of this server, seeking to reduce the
                                                                                   “inferior” class quality, (i) reducing the size of its request
    It is possible to observe that, while the PCV approach                         queue; (ii) reducing its priority; and (iii) limiting the
sought to maintain the cumulative values near the                                  bandwidth that this class could use. The work of Almeida
specified values of quality, the FIFO approach, maintained                         et al. [9] proposed mechanisms that dealt with priorities of
the cumulative values in the same proportion of the load                           classes, on two levels: on the application (server Apache)
offered for each class. In other words, using FIFO there is                        and in the operational system (Linux). The investigation
no controllability, and, due to the unstable load of the                           of Pandey et al. [7] was centered on the creation of a
Internet, there is no predictability.                                              language of specification of QoS for the implementation
4.3. Considerations concerning the simulations                                     on distributed web servers.

The results of the simulations showed that, on the whole,                          6. Final considerations
the PCV approach manages, at the same time, (i) to reduce                          This work has shown that it is possible to apply adaptive
deadline misses by reducing the service mean times and                             techniques, usually implemented in real-time scheduling,
(ii) to maintain the differentiation of services.                                  to maintain the differentiation of services on best-effort
     By means of simulations, we have been able to detect                          servers. Classes of services were defined on web servers,
a limitation of this approach in situations of very high                           and the model of imprecise computation was utilized [12],
loads. These results in high load point towards what we                            in which some web pages are created with two different
intend to investigate very soon: – the addition of an                              versions. Rather than dealing with latencies and loss rates
admission control policy, which would interact with the                            – usual metrics in the infrastructure of the network – this
other two existing policies, so as to immediately reject                           work has employed values of deadlines as a way of
signaling lags in replying to requests, and has adopted               [5] C. Lu, “Feedback Control Real-Time Scheduling”, PhD
cumulative value as a measure of evaluation that, in the                   Dissertation, University of Virginia, May 2001.
last instance, reflects the average quality offered for each          [6] A. Striegel, G. Manimaran, “Dynamic Class-Based Queue
class.                                                                     Management for Scalable Media Servers”, Sixth IEEE
                                                                           RTAS, Washington DC, USA, May 2000, pp.228-236.
    Adaptive scheduling heuristics PCV (Proportional                  [7] R. Pandey, et al., “Supporting Quality of Service in HTTP
Cumulative Value Attribution) was introduced. During                       Servers”, Proc. of the 17th Annual SIGACT-SIGOPS
occurrences of overload, the two policies of this heuristics               Symposium on Principles of Distributed Computing
operate, seeking: (i) to reduce the load (selecting some                   (PODC), Puerto Callarta, Mexico, Jun. 1998.
executions in the imprecise form) and, at the same time,              [8] L. Eggert, J. Heidemann, “Application-Level Differentiated
(ii) to distribute the deadline misses (prioritizing certain               Services for Web Servers”, World Wide Web Journal, Aug.
classes) so as to keep the cumulative values close to the                  1999, pp. 133-142.
pre-established values of service quality.                            [9] J. Almeida et al., “Providing Differentiated Levels of Service
    Through simulations, we have surveyed the behavior                     in Web Content Hosting”, First Workshop on Internet
                                                                           Server Performance, Madison, Wisconsin, Jun. 1998.
of the PCV approach, and verified the need to adopt an                [10] M. Hamdaoui, P. Ramanathan, “A Dynamic Priority
admission control, which acts in integration with the two                  Assignment Technique for Streams with (m,k)-Firm
existing policies. At present, our works point towards the                 Deadlines”, 1994
further elaboration of this policy, and the implementation            [11] C. Montez, J. Fraga, R. S. Oliveira, J-M. Farines, “An
and validation of this approach, in a real environment,                    Adaptive Scheduling Approach in Real-Time CORBA”, In
using the web server Apache [1] and SURGE workload                         Proc. of the 2nd IEEE ISORC, Saint-Malo, France, May
generator [16].                                                            1999.
Acknowledgements: This work was partially supported by                [12] J. -Y. Chung, J. W. S. Liu, K. -J. Lin, “Scheduling Periodic
CNPq – Process 68.0080/01-5 and Process.521053/98-6.                       Jobs that Allow Imprecise Results”, IEEE Transactions on
                                                                           Computer, 39(9), 1990, pp. 1156-1174.
References                                                            [13] S. Baruah et al., “On the Competitiveness of On-Line Real-
                                                                           Time Task Scheduling”, Proc. of the 12th IEEE RTSS, pp.
[1] G. Holden, N. Wells, M. Keller, “Apache Server                         106-115, 1991.
     Commentary”, CoriolisOpen Press, 1999.                           [14] M. Marucheck, J. Strosnider, “Some Insight into the Fault
[2] R. Braden, D. Clark, S. Shenker, "Integrated Services in the           Recovery Properties of Priority-Driven Schedulers”, Real-
     Internet Architecture: an Overview", IETF RFC 1633, Jun.              Time Systems Journal, Oct. 1995.
     1994.                                                            [15] PCV        Simulator        source-code,       web        site
[3] S. Blake et al., "An Architecture for Differentiated Services",, Jan. 2002.
     IETF RFC 2475, Dec. 1998.                                        [16] P. Barford and M. Crovella, "Generating Representative
[4] T. Abdelzaher, “QoS-Adaptation in Real-Time Systems”,                  Web Workloads for Network and Server Performance
     PhD Thesis, University of Michigan, Ann Arbor, Aug.                   Evaluation," in Proc. ACM SIGMETRICS, 1998, pp. 151-
     1999.                                                                 160.

To top