<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Recent Advances in Energy E cient Query Processing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Matteo Catena</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nicola Tonellotto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Research Council of Italy</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Web search companies distribute their infrastructures and operations across several, geographically distant data centers. This distributed architecture facilitates high performance query processing, which is fundamental for the success of a Web search engine. At the same time, data centers require an huge amount of electricity to operate their computing resources. In this extended abstract, we brie y discuss our recent works for improving the energy e ciency of query processing systems. Firstly, we introduce a novel query forwarding algorithm which exploits green energy sources to reduce the electricity expenditure and carbon footprint of Web search engines. Then, we propose to delegate the CPU power management from a server' operative system directly to the query processing application, to reduce the energy consumption of a search engine's servers. Finally, we introduce PESOS, a scheduling algorithm which manages the CPU power consumption on a per-query basis while considering query latency constraints.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        High performance query processing is fundamental for the success of a Web
search engine. In fact, Web search engine can receive billions of queries per
day [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Additionally, the issuing users are often impatient and expect
subsecond response times to their queries (e.g., 500 ms). Indeed, users become less
engaged [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] or migrate to other search services [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] when a search engine fails
to provide fast responses to queries. For such reasons, search companies adopt
distributed query processing strategies to cope with huge volumes of incoming
queries and to provide sub-second response times.
      </p>
      <p>
        Web search engines perform distributed query processing on computer
clusters composed by thousands of computers and hosted in large data centers [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
While such facilities enable large-scale online services, they also raise economical
and environmental concerns. Indeed, a large-scale data center { like those used
by Web search engines { can draw tens of megawatts of electricity to operate
and it can cost 9 million US dollars per year in terms of energy expenditure [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
Therefore, an important problem to address is how to reduce the energy
expenditure of data centers. Additionally, producing and consuming electricity can
involve the emission of carbon dioxide, which is the main cause of global
warming due to the greenhouse e ect. In 2007, the Information and Communication
Technology (ICT) sector has been reported to be responsible for roughly 2% of
global carbon emissions, with general purpose data centers accounting for 14% of
the ICT footprint. These emission levels were projected to more than double by
2020 [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Therefore, another problem to tackle is how to reduce these emissions
and the negative impact of the data centers on the environment.
      </p>
      <p>
        Obviously, a possible solution to these challenges consists in designing more
energy-e cient data centers, which consume less energy and, consequently,
pollute and cost less. In the past, a large part of the energy consumption of a data
center could be accounted to ine ciencies in its cooling and power supply
systems. However, search companies already adopt state-of-the art techniques to
reduce the energy wastage of such systems1,2, leaving little room for more
improvements in those areas. Indeed, the energy consumption of a state-of-the-art
data center would be reduced by less than 24% if all the overheads in its cooling
and power supply systems were eliminated [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Therefore, new approaches are
necessary to mitigate the environmental impact and the energy expenditure of
Web search engines.
      </p>
      <p>
        One option consists in using green energy. In fact, several search companies
use green energy to partially power their data centers, i.e., energy which comes
from resources that are renewable and do not emit carbon dioxide, such as
sunlight and wind3,4,5. At the same time, Web search engines experience spatial
and temporal variations in electricity prices [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] as they distribute their
infrastructures and operations across several, geographically distant data centers [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
Stemming from these observations, we propose a novel query forwarding
algorithm that exploits both the green energy sources available at di erent data
centers and the di erences in market energy prices [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The main idea is to
dispatch queries from the data center that rstly received the requests to a di erent
one, if the latter can rely on green energy or cheaper energy sources than the
former. The problem of exploiting di erent energy sources to reduce costs when
forwarding queries is modeled as a Minimum Cost Flow Problem. The model
takes into account the di erent and limited processing capacities of data
centers, query response time constraints and communication latencies among sites.
We evaluate the proposed algorithm using workloads obtained from the Yahoo
search engine, together with realistic electricity price data. Our experimental
results show that the proposed solution maintains an high query throughput,
while reducing by up to 25% the energy operational costs of multi-center search
engines. Moreover, our algorithm can reduce by almost 6% the consumption of
non-green energy.
      </p>
      <p>
        The energy expenditure and carbon footprint of a search company can also
be mitigated by reducing the energy consumption of its computing resources. In
particular, reducing the energy consumption of CPUs represents an attractive
venue for Web search engines. In fact, CPUs are the most energy consuming
component in servers dedicated to query processing, accounting for 40% of total
1 https://www.google.com/about/datacenters/efficiency/internal/
2 https://www.microsoft.com/about/csr/downloadhandler.ashx?Id=02-01-12
3 https://environment.google/
4 https://www.microsoft.com/about/csr/environment/
5 https://sustainability.fb.com
energy consumption when a server is idle and for 66% of total energy
consumption when it is fully utilized [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Dynamic Voltage and Frequency Scaling (DVFS)
technologies can be used to reduce the CPU energy consumption of a server [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
DVFS permits to adjust the frequency and voltage at which the CPU cores
operate, trading o performance for power consumption. In fact, higher core
frequencies mean faster computations but higher power consumption, while lower
frequencies lead to slower computations but reduced power consumption.
However, carefulness is required when reducing the operating frequency of the CPU
cores since low frequencies entail longer query processing times that may be
unacceptable for the users.
      </p>
      <p>
        Typically, DVFS mechanisms are managed by operating system (OS)
components, called frequency governors [
        <xref ref-type="bibr" rid="ref14 ref4">4, 14</xref>
        ]. However, the OS misses
domainspeci c information regarding the utilization and load of the query processing
application. This knowledge can be exploited to better throttle the frequency of
the CPU cores, thereby reducing the power consumption of a query processing
server. Therefore, in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] we propose to delegate the CPU power management
from the OS frequency governors to the query processing application, and we
devise search engine-speci c frequency governors. We experimentally evaluate
such governors upon the TREC ClueWeb09B corpus and the query stream from
the MSN 2006 query log. Results show that the knowledge of the query
processing server utilization and load facilitates a more re ned control of the CPU
to achieve power savings. In fact, the proposed search engine-speci c governors
can reduce up to 24% a server power consumption, with only limited (but
uncontrollable) drawbacks in the quality of search results with respect to a system
operating at maximum CPU frequency.
      </p>
      <p>
        Another important aspect that can be exploited to reduce the energy
consumption of a server is the fact that users can hardly notice response times that
are faster than their expectations [
        <xref ref-type="bibr" rid="ref1 ref11">1, 11</xref>
        ]. Therefore, we advise that Web search
engines should not process queries faster than user expectations and,
consequently, we propose the Predictive Energy Saving Online Scheduling (PESOS)
algorithm [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. PESOS selects the most appropriate CPU frequency to process a
query by its deadline, on a per-core basis. It considers the latency requirement
of queries as an explicit parameter, and it tries to process queries no faster than
required. In doing so, the CPU energy consumption is reduced while respecting
the query latency constraints. PESOS bases its decision on query e ciency
predictors, which are techniques to estimate the processing volume and processing
time of a query before its execution [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. We experimentally evaluate PESOS upon
the TREC ClueWeb09B collection and the MSN 2006 query log. Depending on
the required latency, results show that PESOS can reduce the CPU energy
consumption of a query processing server from 24% up to 48% when compared to
an high performance system running at maximum CPU core frequency. Also,
PESOS outperforms our best search engine-speci c frequency governor [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] with
a 20% energy saving, while the competitor requires a ne parameter tuning and
it may incurs in uncontrollable latency violations.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Arapakis</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bai</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cambazoglu</surname>
            ,
            <given-names>B.B.</given-names>
          </string-name>
          :
          <article-title>Impact of Response Latency on User Behavior in Web Search</article-title>
          . In: ACM (ed.)
          <source>Proc. SIGIR</source>
          . pp.
          <volume>103</volume>
          {
          <fpage>112</fpage>
          .
          <string-name>
            <surname>Gold</surname>
            <given-names>Coast</given-names>
          </string-name>
          , Queensland, Australia (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Barroso</surname>
            ,
            <given-names>L.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clidaras</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Holzle, U.:
          <article-title>The Datacenter as a Computer: an Introduction to the Design of Warehouse-scale Machines</article-title>
          .
          <source>Synthesis lectures on computer architecture 8(3)</source>
          ,
          <volume>1</volume>
          {
          <fpage>154</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Blanco</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Catena</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tonellotto</surname>
          </string-name>
          , N.:
          <article-title>Exploiting Green Energy to Reduce the Operational Costs of Multi-Center Web Search Engines</article-title>
          . In: IW3C2 (ed.)
          <source>Proc. WWW</source>
          . pp.
          <volume>1237</volume>
          {
          <fpage>1247</fpage>
          . Montreal, Quebec, Canada (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Brodowski</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>CPU frequency and voltage scaling code in the Linux kernel</article-title>
          . https: //www.kernel.org/doc/Documentation/cpu-freq/index.txt (
          <year>2015</year>
          ),
          <source>last visited: 2016-11-08</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Cambazoglu</surname>
            ,
            <given-names>B.B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baeza-Yates</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <source>Scalability Challenges in Web Search Engines. Synthesis Lectures on Information Concept, Retrieval, and Services</source>
          <volume>7</volume>
          (
          <issue>6</issue>
          ),
          <volume>1</volume>
          {
          <fpage>138</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Catena</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Macdonald</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tonellotto</surname>
          </string-name>
          , N.:
          <article-title>Load-sensitive CPU Power Management for Web Search Engines</article-title>
          . In: ACM (ed.)
          <source>Proc. SIGIR</source>
          . pp.
          <volume>751</volume>
          {
          <fpage>754</fpage>
          .
          <string-name>
            <surname>Santiago</surname>
          </string-name>
          ,
          <string-name>
            <surname>Chile</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Catena</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tonellotto</surname>
          </string-name>
          , N.:
          <article-title>Energy-e cient Query Processing in Web Search Engines. Transactions on Knowledge and Data Engineering (</article-title>
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Greenberg</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hamilton</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maltz</surname>
            ,
            <given-names>D.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>The Cost of a Cloud: Research Problems in Data Center Networks</article-title>
          .
          <source>SIGCOMM Computer Commununication Review</source>
          <volume>39</volume>
          (
          <issue>1</issue>
          ),
          <volume>68</volume>
          {
          <fpage>73</fpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Macdonald</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tonellotto</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ounis</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Learning to Predict Response Times for Online Query Scheduling</article-title>
          . In: ACM (ed.)
          <source>Proc. SIGIR</source>
          . pp.
          <volume>621</volume>
          {
          <fpage>630</fpage>
          .
          <string-name>
            <surname>Portland</surname>
          </string-name>
          , Oregon, USA (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Qureshi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weber</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balakrishnan</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guttag</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maggs</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Cutting the Electric Bill for Internet-scale Systems</article-title>
          . In: ACM (ed.)
          <source>Proc. SIGCOMM</source>
          . pp.
          <volume>123</volume>
          {
          <fpage>134</fpage>
          .
          <string-name>
            <surname>Barcelona</surname>
          </string-name>
          ,
          <string-name>
            <surname>Spain</surname>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Schurman</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brutlag</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <article-title>: Performance Related Changes and their User Impact</article-title>
          .
          <source>In: O'Reilly (ed.) Proc. Velocity</source>
          . San Jose, USA (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Snowdon</surname>
            ,
            <given-names>D.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruocco</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heiser</surname>
          </string-name>
          , G.:
          <article-title>Power Management and Dynamic Voltage Scaling: Myths and Facts</article-title>
          .
          <source>In: Proc. PARC workshop at EMSoft</source>
          . IEEE (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <article-title>The Climate Group for the Global e-Sustainability Initiative: Smart 2020: Enabling the low carbon economy in the information age</article-title>
          . http://gesi.org/files/ Reports/Smart%202020%20report%
          <fpage>20in</fpage>
          %
          <fpage>20English</fpage>
          .
          <string-name>
            <surname>pdf</surname>
          </string-name>
          (
          <year>2008</year>
          ),
          <source>last visited: 2016- 11-04</source>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <article-title>The Linux Kernel Archives: Intel P-State driver</article-title>
          . https://www.kernel.org/doc/ Documentation/cpu-freq/intel-pstate.
          <source>txt</source>
          (
          <year>2016</year>
          ),
          <source>last visited: 2016-11-08</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>