Docsity

Performance Evaluation of Key-Value Stores for APM Storage: Cassandra, HBase, Redis, Notas de estudo de Processamento de Dados

Toggle sidebar
bg1
Solving Big Data Challenges for Enterprise Application
Performance Management
Tilmann Rabl
Middleware Systems
Research Group
University of Toronto, Canada
Mohammad Sadoghi
Middleware Systems
Research Group
University of Toronto, Canada
Hans-Arno Jacobsen
Middleware Systems
Research Group
University of Toronto, Canada
Sergio G´
omez-Villamor
DAMA-UPC
Universitat Polit`
ecnica de
Catalunya, Spain
Victor Munt´
es-Mulero
CA Labs Europe
Barcelona, Spain
Serge Mankovskii
CA Labs
San Francisco, USA
ABSTRACT
As the complexity of enterprise systems increases, the need for
monitoring and analyzing such systems also grows. A number of
companies have built sophisticated monitoring tools that go far be-
yond simple resource utilization reports. For example, based on
instrumentation and specialized APIs, it is now possible to monitor
single method invocations and trace individual transactions across
geographically distributed systems. This high-level of detail en-
ables more precise forms of analysis and prediction but comes at
the price of high data rates (i.e., big data). To maximize the benefit
of data monitoring, the data has to be stored for an extended period
of time for ulterior analysis. This new wave of big data analytics
imposes new challenges especially for the application performance
monitoring systems. The monitoring data has to be stored in a sys-
tem that can sustain the high data rates and at the same time enable
an up-to-date view of the underlying infrastructure. With the ad-
vent of modern key-value stores, a variety of data storage systems
have emerged that are built with a focus on scalability and high data
rates as predominant in this monitoring use case.
In this work, we present our experience and a comprehensive
performance evaluation of six modern (open-source) data stores in
the context of application performance monitoring as part of CA
Technologies initiative. We evaluated these systems with data and
workloads that can be found in application performance monitor-
ing, as well as, on-line advertisement, power monitoring, and many
other use cases. We present our insights not only as performance
results but also as lessons learned and our experience relating to
the setup and configuration complexity of these data stores in an
industry setting.
1. INTRODUCTION
Large scale enterprise systems today can comprise complete data
centers with thousands of servers. These systems are heteroge-
neous and have many interdependencies which makes their admin-
istration a very complex task. To give administrators an on-line
view of the system health, monitoring frameworks have been de-
veloped. Common examples are Ganglia [20] and Nagios [12].
These are widely used in open-source projects and academia (e.g.,
Wikipedia1). However, in industry settings, in presence of stringent
response time and availability requirements, a more thorough view
of the monitored system is needed. Application Performance Man-
agement (APM) tools, such as Dynatrace2, Quest PerformaSure3,
AppDynamics4, and CA APM5provide a more sophisticated view
on the monitored system. These tools instrument the applications
to retrieve information about the response times of specific services
or combinations of services, as well as about failure rates, resource
utilization, etc. Different monitoring targets such as the response
time of a specific servlet or the CPU utilization of a host are usu-
ally referred to as metrics. In modern enterprise systems it is not
uncommon to have thousands of different metrics that are reported
from a single host machine. In order to allow for detailed on-line
as well as off-line analysis of this data, it is persisted at a cen-
tralized store. With the continuous growth of enterprise systems,
sometimes extending over multiple data centers, and the need to
track and report more detailed information, that has to be stored for
longer periods of time, a centralized storage philosophy is no longer
viable. This is critical since monitoring systems are required to in-
troduce a low overhead – i.e., 1-2% on the system resources [2]
– to not degrade the monitored system’s performance and to keep
maintenance budgets low. Because of these requirements, emerg-
ing storage systems have to be explored in order to develop an APM
platform for monitoring big data with a tight resource budget and
fast response time.
1Wikipedia’s Ganglia installation can be accessed at http://
ganglia.wikimedia.org/latest/.
2Dynatrace homepage - http://www.dynatrace.com
3PerformaSure homepage - http://www.quest.com/
performasure/
4AppDynamics homepage - http://www.appdynamics.
com
5CA APM homepage - http://www.ca.com/us/
application-management.aspx
1724
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee. Articles from this volume were invited to present
their results at The 38th International Conference on VeryLarge Data Bases,
August 27th - 31st 2012, Istanbul, Turkey.
Proceedings of the VLDB Endowment, Vol. 5, No. 12
Copyright 2012 VLDB Endowment 2150-8097/12/08... $10.00.
pf3
pf4
pf5
pf8
pf9
pfa

Pré-visualização parcial do texto

Baixe Performance Evaluation of Key-Value Stores for APM Storage: Cassandra, HBase, Redis e outras Notas de estudo em PDF para Processamento de Dados, somente na Docsity!

Solving Big Data Challenges for Enterprise Application

Performance Management

Tilmann Rabl

Middleware Systems

Research Group

University of Toronto, Canada

[email protected]

Mohammad Sadoghi

Middleware Systems

Research Group

University of Toronto, Canada

[email protected]

Hans-Arno Jacobsen

Middleware Systems

Research Group

University of Toronto, Canada

[email protected]

Sergio G ´omez-Villamor

DAMA-UPC

Universitat Polit `ecnica de

Catalunya, Spain

[email protected]

Victor Munt ´es-Mulero

CA Labs Europe

Barcelona, Spain

[email protected]

Serge Mankovskii

CA Labs

San Francisco, USA

[email protected]

ABSTRACT

As the complexity of enterprise systems increases, the need for monitoring and analyzing such systems also grows. A number of companies have built sophisticated monitoring tools that go far be- yond simple resource utilization reports. For example, based on instrumentation and specialized APIs, it is now possible to monitor single method invocations and trace individual transactions across geographically distributed systems. This high-level of detail en- ables more precise forms of analysis and prediction but comes at the price of high data rates (i.e., big data). To maximize the benefit of data monitoring, the data has to be stored for an extended period of time for ulterior analysis. This new wave of big data analytics imposes new challenges especially for the application performance monitoring systems. The monitoring data has to be stored in a sys- tem that can sustain the high data rates and at the same time enable an up-to-date view of the underlying infrastructure. With the ad- vent of modern key-value stores, a variety of data storage systems have emerged that are built with a focus on scalability and high data rates as predominant in this monitoring use case. In this work, we present our experience and a comprehensive performance evaluation of six modern (open-source) data stores in the context of application performance monitoring as part of CA Technologies initiative. We evaluated these systems with data and workloads that can be found in application performance monitor- ing, as well as, on-line advertisement, power monitoring, and many other use cases. We present our insights not only as performance results but also as lessons learned and our experience relating to the setup and configuration complexity of these data stores in an industry setting.

1. INTRODUCTION

Large scale enterprise systems today can comprise complete data centers with thousands of servers. These systems are heteroge- neous and have many interdependencies which makes their admin- istration a very complex task. To give administrators an on-line view of the system health, monitoring frameworks have been de- veloped. Common examples are Ganglia [20] and Nagios [12]. These are widely used in open-source projects and academia (e.g., Wikipedia^1 ). However, in industry settings, in presence of stringent response time and availability requirements, a more thorough view of the monitored system is needed. Application Performance Man- agement (APM) tools, such as Dynatrace^2 , Quest PerformaSure^3 , AppDynamics^4 , and CA APM^5 provide a more sophisticated view on the monitored system. These tools instrument the applications to retrieve information about the response times of specific services or combinations of services, as well as about failure rates, resource utilization, etc. Different monitoring targets such as the response time of a specific servlet or the CPU utilization of a host are usu- ally referred to as metrics. In modern enterprise systems it is not uncommon to have thousands of different metrics that are reported from a single host machine. In order to allow for detailed on-line as well as off-line analysis of this data, it is persisted at a cen- tralized store. With the continuous growth of enterprise systems, sometimes extending over multiple data centers, and the need to track and report more detailed information, that has to be stored for longer periods of time, a centralized storage philosophy is no longer viable. This is critical since monitoring systems are required to in- troduce a low overhead – i.e., 1-2% on the system resources [2]

  • to not degrade the monitored system’s performance and to keep maintenance budgets low. Because of these requirements, emerg- ing storage systems have to be explored in order to develop an APM platform for monitoring big data with a tight resource budget and fast response time. (^1) Wikipedia’s Ganglia installation can be accessed at http:// ganglia.wikimedia.org/latest/. (^2) Dynatrace homepage - http://www.dynatrace.com (^3) PerformaSure homepage - http://www.quest.com/ performasure/ (^4) AppDynamics homepage - http://www.appdynamics. com (^5) CA APM homepage - http://www.ca.com/us/ application-management.aspx

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Articles from this volume were invited to present their results at The 38th International Conference on Very Large Data Bases, August 27th - 31st 2012, Istanbul, Turkey. Proceedings of the VLDB Endowment, Vol. 5, No. 12 Copyright 2012 VLDB Endowment 2150-8097/12/08... $ 10.00.

APM has similar requirements to current Web-based informa- tion systems such as weaker consistency requirements, geograph- ical distribution, and asynchronous processing. Furthermore, the amount of data generated by monitoring applications can be enor- mous. Consider a common customer scenario: The customer’s data center has 10K nodes, in which each node can report up to 50K metrics with an average of 10K metrics. As mentioned above, the high number of metrics result from the need for a high-degree of detail in monitoring, – an individual metric for response time, fail- ure rate, resource utilization, etc. of each system component can be reported. In the example above, with a modest monitoring in- terval of 10 seconds, 10 million individual measurements are re- ported per second. Even though a single measurement is small in size, below 100 bytes, the mass of measurements poses similar big data challenges as those found in Web information system applica- tions such as on-line advertisement [9] or on-line analytics for so- cial Web data [25]. These applications use modern storage systems with focus on scalability as opposed to relational database systems with a strong focus on consistency. Because of the similarity of APM storage requirements to the requirements of Web informa- tion system applications, obvious candidates for new APM storage systems are key-value stores and their derivatives. Therefore, we present a performance evaluation of different key-value stores and related systems for APM storage. Specifically, we present our benchmarking effort on open source key-value stores and their close competitors. We compare the throu- ghput of Apache Cassandra, Apache HBase, Project Voldemort, Redis, VoltDB, and a MySQL Cluster. Although, there would have been other candidates for the performance comparison, these sys- tems cover a broad area of modern storage architectures. In contrast to previous work (e.g., [7, 23, 22]), we present details on the maxi- mum sustainable throughput of each system. We test the systems in two different hardware setups: (1) a memory- and (2) a disk-bound setup. Our contributions are threefold: (1) we present the use case and big data challenge of application performance management and specify its data and workload requirements; (2) we present an up- to-date performance comparison of six different data store archi- tectures on two differently structured compute clusters; and, (3) finally, we report on details of our experiences with these systems from an industry perspective. The rest of the paper is organized as follows. In the next section, we describe our use case: application performance management. Section 3 gives an overview of the benchmarking setup and the testbed. In Section 4, we introduce the benchmarked data stores. In Section 5, we discuss our benchmarking results in detail. Section 6 summarizes additional findings that we made during our bench- marking effort. In Section 7, we discuss related work before con- cluding in Section 8 with future work.

  1. APPLICATION PERFORMANCE MAN-

AGEMENT Usually enterprise systems are highly distributed and heteroge- neous. They comprise a multitude of applications that are often interrelated. An example of such a system can be seen in Figure 1. Clients connect to a frontend, which can be a Web server or a client application. A single client interaction may start a transaction that can span over more than a thousand components, which can be hosted on an equal number of physical machines [26]. Neverthe- less, response time is critical in most situations. For example, for Web page loads the consumer expectation is constantly decreasing and is already as low as 50 ms to 2 s [3]. In a highly distributed

Application server Database Client

Identity Manager

Message Queue

Client

Client

Client (^) Web server Application server

Application server

Database

Web Service

Main Frame

3 rd^ Party

Message Broker

Figure 1: Example of an enterprise system architecture

system, it is difficult to determine the root cause of performance deterioration especially since it is often not tied to a single com- ponent, but to a specific interaction of components. System com- ponents themselves are highly heterogeneous due to the constant changes in application software and hardware. There is no unified code base and often access to the entire source code is not possible. Thus, an in depth analysis of the components or the integration of a profiling infrastructure is not possible. To overcome this challenges, application performance manage- ment systems (APM) have been developed and are now a highly profitable niche in enterprise system deployment. APM refers to the monitoring and managing of enterprise software systems. There are two common approaches to monitor enterprise systems: (1) an API-based approach, which provides a programming interface and a library that has to be utilized by all monitored components; (2) a black-box approach, which instruments the underlying sys- tem components or virtual machines to obtain information about the monitored system. The first approach gives a high degree of freedom to the programmer on how to utilize the monitoring tool- box. A popular example is the ARM standard [1]. In this approach every component has to implement the ARM API that is available for C and Java. Prominent ARM-instrumented applications are the Apache HTTP server and IBM DB2. Although several common enterprise software systems are already ARM enabled, it is often not feasible to implement the ARM API in legacy systems. In gen- eral, this solution is often not possible, especially when 3rd^ party software components are used. The instrumentation of virtual ma- chines and system libraries is a non-intrusive way of monitoring an application. In the case of Java programs, this is enabled by the Virtual Machine Tool Interface that was specified in JSR-163 and introduced in J2SE 5.0 [11]. The intention of JSR-163 is to present an interface for profiling and debugging. Byte code instrumentation allows to augment software components with agents that have ac- cess to the state and the method invocations. This approach enables monitoring components, tracing transactions, and performing root cause analysis without changing the code base of the monitored system. Another benefit of this approach is the low performance overhead incurred. By making it possible to capture every method invocation in a large enterprise system, APM tools can generate a vast amount of data. However, in general, only specific method invocations are actually of interest. Most notably, these are communication meth- ods such as RMI calls, Web service calls, socket connections and such. Still, current systems process thousands of transactions per second with each transaction being processed by multiple nodes. Due to the resulting amount of data, monitoring agents do not re- port every single event but instead aggregate events in fixed time intervals in the order of seconds. Nevertheless, each agent can re- port thousands of different measurements in each interval. In larger

Metric Name Value Min Max Timestamp Duration HostA/AgentX/ServletB/AverageResponseTime 4 1 6 1332988833 15

Figure 2: Example of an APM measurement

gle switch. We use the Cluster M for memory-bound experiments and the Cluster D for disk-bound tests. For Cluster M the size of the data set was set to 10 million records per node resulting 700 MB of raw data per node. The raw data in this context does not include the keys which increases the total data footprint. For Cluster D we tested a single setup with 150 million records for a total of 10.5 GB of raw data and thus mak- ing memory-only processing impossible. Each test was run for 600 seconds and the reported results are the average of at least 3 inde- pendent executions. We automated the benchmarking process as much as possible to be able to experiment with many different set- tings. For each system, we wrote a set of scripts that performed the complete benchmark for a given configuration. The scripts installed the systems from scratch for each workload on the required number of nodes, thus making sure that there was no interference between different setups. We made extensive use of the Parallel Distributed Shell (pdsh). Many configuration parameters were adapted within the scripts using the stream editor sed. Our workloads were generated using 128 connections per server node, i.e., 8 connections per core in Cluster M. In Cluster D, we reduced the number of connection to 2 per core to not overload the system. The number of connections is equal to the number of independently simulated clients for most systems. Thus, we scaled the number of threads from 128 for one node up to 1536 for 12 nodes, all of them working as intensively as possible. To be on the safe side, we used up to 5 nodes to generate the workload in order to fully saturate the storage systems. So no client node was running more than 307 threads. We set a scan-length of 50 records as well as fetched all the fields of the record for read operations.

  1. BENCHMARKED KEY-VALUE STORES

We benchmarked six different open-source key-value stores. We chose them to get an overview of the performance impact of dif- ferent storage architectures and design decisions. Our goal was not only to get a pure performance comparison but also a broad overview of available solutions. According to Cartell, new gener- ation data stores can be classified in four main categories [4]. We chose each two of the following classes according to this classifi- cation:

Key-value stores: Project Voldemort and Redis

Extensible record stores: HBase and Cassandra

Scalable relational stores: MySQL Cluster and VoltDB

Our choice of systems was based on previously reported perfor- mance results, popularity and maturity. Cartell also describes a fourth type of store, document stores. However, in our initial re- search we did not find any document store that seemed to match our requirements and therefore did not include them in the com- parison. In the following, we give a basic overview on the bench- marked systems focusing on the differences. Detailed descriptions can be found in the referenced literature.

4.1 HBase

HBase [28] is an open source, distributed, column-oriented data- base system based on Google’s BigTable [5]. HBase is written in

Java, runs on top of Apache Hadoop and Apache ZooKeeper [15] and uses the Hadoop Distributed Filesystem (HDFS) [27] (also an open source implementation of Google’s file system GFS [13]) in order to provide fault-tolerance and replication. Specifically, it provides linear and modular scalability, strictly consistent data access, automatic and configurable sharding of data. Tables in HBase can be accessed through an API as well as serve as the input and output for MapReduce jobs run in Hadoop. In short, applications store data into tables which consist of rows and col- umn families containing columns. Moreover, each row may have a different set of columns. Furthermore, all columns are indexed with a user-provided key column and are grouped into column families. Also, all table cells – the intersection of row and column coordi- nates – are versioned and their content is an uninterpreted array of bytes. For our benchmarks, we used HBase v0.90.4 running on top of Hadoop v0.20.205.0. The configuration was done using a dedicated node for the running master processes (NameNode and Secondary- NameNode), therefore for all the benchmarks the specified number of servers correspond to nodes running slave processes (DataNodes and TaskTrackers) as well as HBase’s region server processes. We used the already implemented HBase YCSB client, which required one table for all the data, storing each field into a different column.

4.2 Cassandra Apache Cassandra is a second generation distributed key value store developed at Facebook [19]. It was designed to handle very large amounts of data spread out across many commodity servers while providing a highly available service without single point of failure allowing replication even across multiple data centers as well as for choosing between synchronous or asynchronous repli- cation for each update. Also, its elasticity allows read and write throughput, both increasing linearly as new machines are added, with no downtime or interruption to applications. In short, its ar- chitecture is a mixture of Google’s BigTable [5] and Amazon’s Dy- namo [8]. As in Amazon’s Dynamo, every node in the cluster has the same role, so there is no single point of failure as there is in the case of HBase. The data model provides a structured key-value store where columns are added only to specified keys, so different keys can have different number of columns in any given family as in HBase. The main differences between Cassandra and HBase are columns that can be grouped into column families in a nested way and consistency requirements that can be specified at query time. Moreover, whereas Cassandra is a write-oriented system, HBase was designed to get high performance for intensive read workloads. For our benchmark, we used the recent 1.0.0-rc2 version and used mainly the default configuration. Since we aim for a high write throughput and have only small scans, we used the default RandomPartitioner that distributes the data across the nodes ran- domly. We used the already implemented Cassandra YCSB client which required to set just one column family to store all the fields, each of them corresponding to a column.

4.3 Voldemort Project Voldemort [29] is a distributed key-value store (devel- oped by LinkedIn) that provides highly scalable storage system.

With a simpler design compared to a relational database, Volde- mort neither tries to support general relational model nor to guar- antee full ACID properties, instead it simply offers a distributed, fault-tolerant, persistent hash table. In Voldemort, data is automat- ically replicated and partitioned across nodes such that each node is responsible for only a subset of data independent from all other nodes. This data model eliminates the central point of failure or the need for central coordination and allows cluster expansion without rebalancing all data, which ultimately allow horizontal scaling of Voldemort. Through simple API, data placement and replication can easily be tuned to accommodate a wide range of application domains. For instance, to add persistence, Voldemort can use different storage systems such as embedded databases (e.g., BerkeleyDB) or stand- alone relational data stores (e.g., MySQL). Other notable features of Voldemort are in-memory caching coupled with storage system

  • so a separate caching tier is no longer required and multi-version data model for improved data availability in case of system failure. In our benchmark, we used version 0.90.1. with the embed- ded BerkeleyDB storage and the already implemented Voldemort YCSB client. Specifically, when configuring the cluster, we set two partitions per node. In both clusters, we set Voldemort to use about 75% of the memory whereas the remaining 25% was used for the embedded BerkeleyDB storage. The data is stored in a single table where each key is associated with an indexed set of values.

4.4 Redis

Redis [24] is an in-memory, key-value data store with the data durability option. Redis data model supports strings, hashes, lists, sets, and sorted sets. Although Redis is designed for in-memory data, depending on the use case, data can be (semi-) persisted either by taking snapshot of the data and dumping it on disk periodically or by maintaining an append-only log of all operations. Furthermore, Redis can be replicated using a master-slave archi- tecture. Specifically, Redis supports relaxed form of master-slave replication, in which data from any master can be replicated to any number of slaves while a slave may acts as a master to other slaves allowing Redis to model a single-rooted replication tree. Moreover, Redis replication is non-blocking on both the mas- ter and slave, which means that the master can continue serving queries when one or more slaves are synchronizing and slaves can answer queries using the old version of the data during the synchro- nization. This replication model allows for having multiple slaves to answer read-only queries resulting in highly scalable architec- ture. For our benchmark, we used version 2.4.2. Although a Redis cluster version is expected in the future, at the time of writing this paper, the cluster version is in an unstable state and we were not able to run a complete test. Therefore, we deployed a single-node version on each of the nodes and used the Jedis^6 library to imple- ment a distributed store. We updated the default Redis YCSB client to use ShardedJedisPool, a class which automatically shards and accordingly accesses the data in a set of independent Redis servers. This gives considerable advantage to Redis in our benchmark since there is no interaction between the Redis instances. For the storage of the data, YCSB uses a hash map as well as a sorted set.

4.5 VoltDB

VoltDB [30] is an ACID compliant relational in-memory database system derived from the research prototype H-Store [17]. It has a shared nothing architecture and is designed to run on a multi-node

(^6) Jedis, a Java client for Redis - http://github.com/

xetorthio/jedis.

cluster by dividing the database into disjoint partitions by making each node the unique owner and responsible for a subset of the partitions. The unit of transaction is a stored procedure which is Java interspersed with SQL. Forcing stored procedures as the unit of transaction and executing them at the partition containing the necessary data makes it possible to eliminate round trip messag- ing between SQL statements. The statements are executed serially and in a single threaded manner without any locking or latching. The data is in-memory, hence, if it is local to a node a stored pro- cedure can execute without any I/O or network access, providing very high throughput for transactional workloads. Furthermore, VoltDB supports multi-partition transactions, which require data from more than one partition and are therefore more expensive to execute. Multi-partition transactions can completely be avoided if the database is cleanly partitionable. For our benchmarking we used VoltDB v2.1.3 and the default configuration. We set 6 sites per host which is the recommenda- tion for our platform. We implemented an YCSB client driver for VoltDB that connects to all servers as suggested in the documenta- tion. We set a single table with 5 columns for each of the fields and the key as the primary key as well as being the column which allows VoltDB for computing the partition of the table. This way, as read, write and insert operations are performed for a single key, they are implemented as single-partition transactions and just the scan op- eration is a multi-partition transaction. Also, we implemented the required stored procedures for each of the operations as well as the VoltDB YCSB client.

4.6 MySQL MySQL [21] is the world’s most used relational database system with full SQL support and ACID properties. MySQL supports two main storage engines: MyISAM (for managing non-transactional tables) and InnoDB (for providing standard transactional support). In addition, MySQL delivers an in-memory storage abstraction for temporary or non-persistent data. Furthermore, the MySQL clus- ter edition is a distributed, multi-master database with no single point of failure. In MySQL cluster, tables are automatically sharded across a pool of low-cost commodity nodes, enabling the database to scale horizontally to serve read and write-intensive workloads. For our benchmarking we used MySQL v5.5.17 and InnoDB as the storage engine. Although MySQL cluster already provides shared-nothing distribution capabilities, instead we spread indepen- dent single-node servers on each node. Thus, we were able to use the already implemented RDBMS YCSB client which connects to the databases using JDBC and shards the data using a consistent hashing algorithm. For the storage of the data, a single table with a column for each value was used.

  1. EXPERIMENTAL RESULTS In this section, we report the results of our benchmarking efforts. For each workload, we present the throughput and the latencies of operations. Since there are huge variations in the latencies, we present our results using logarithmic scale. We will first report our results and point out significant values, then we will discuss the results. Most of our experiments were conducted on Cluster M which is the faster system with more main memory. Unless we explicitly specify the systems were tested on Cluster M.

5.1 Workload R The first workload was Workload R, which was the most read intensive with 95% reads and only 5% writes. This kind of work- load is common in many social web information systems where the read operations are dominant. As explained above, we used 10

0

50000

100000

150000

200000

250000

2 4 6 8 10 12

Throughput (Ops/sec)

Number of Nodes Cassandra HBase

Voldemort VoltDB

Redis MySQL

Figure 6: Throughput for Workload RW

1

10

100

1000

2 4 6 8 10 12

Latency (ms) - Logarithmic

Number of Nodes Cassandra HBase

Voldemort VoltDB

Redis MySQL

Figure 7: Read latency for Workload RW

has a throughput that is about 10% higher than for the first work- load. HBase’s throughput increases by 40% for the higher write rate, while Project Voldemort’s throughput shrinks by 33% as does MySQL’s throughput. For multiple nodes, Cassandra, HBase, and Project Voldemort follow the same linear behavior as well. MySQL exhibits a good speed-up up to 8 nodes, in which MySQL’s throughput matches Cassandra’s throughput. For 12 nodes, its throughput does no longer grow noticeably. Finally, Redis and VoltDB exhibit the same be- havior as for the Workload R. As can be seen in Figure 7, the read latency of all systems is es- sentially the same for both Workloads R and RW. The only notable difference is MySQL, which is 75% less for one node and 40% less for 12 nodes. In Figure 8, the write latency for Workload RW is summarized. The trends closely follows the write latency of Workload R. How- ever, there are two important subtle differences: (1) HBase’s la-

1

10

100

2 4 6 8 10 12

Latency (ms) - Logarithmic

Number of Nodes Cassandra HBase

Voldemort VoltDB

Redis MySQL

Figure 8: Write latency for Workload RW

0

50000

100000

150000

200000

250000

2 4 6 8 10 12

Throughput (Ops/sec)

Number of Nodes Cassandra HBase Project Voldemort

VoltDB Redis MySQL

Figure 9: Throughput for Workload W

1

10

100

1000

10000

2 4 6 8 10 12

Latency (ms) - Logaritmic

Number of Nodes Cassandra HBase

Voldemort VoltDB

Redis MySQL

Figure 10: Read latency for Workload W

tency is almost 50% lower than for Workload R; and (2) MySQL’s latency is twice as high on average for all scales.

5.3 Workload W Workload W is the one that is closest to the APM use case (with- out scans). It has a write rate of 99% which is too high for web information systems’ production workloads. Therefore, this is a workload neither of the systems was specifically designed for. The throughput results can be seen in Figure 9. The results for one node are similar to the results for Workload RW with the difference that all system have a worse throughput except for Cassandra and HBase. While Cassandra’s throughput increases modestly (2% for 12 nodes), HBase’s throughput increases almost by a factor of 2 (for 12 nodes). For the read latency in Workload W, shown in Figure 7, the most apparent change is the high latency of HBase. For 12 nodes, it goes up to 1 second on average. Furthermore, Voldemort’s read latency almost twice as high while it was constant for Workload R and RW. For the other systems the read latency does not change significantly. The write latency for Workload W is captured in Figure 11. It can be seen that HBase’s write latency increased significantly, by a factor of 20. In contrast to the read latency, Project Voldemort’s write latency is almost identical to workload RW. For the other sys- tems the write latency increased in the order of 5-15%.

5.4 Workload RS In the second part of our experiments, we also introduce scans in the workloads. In particular, we used the existing YCSB client for Project Voldemort which does not support scans. Therefore, we omitted Project Voldemort in the following experiments. In the scan experiments, we split the read percentage in equal sized scan and read parts. For Workload RS this results in 47% read and scan operations and 6% write operations.

1

10

100

2 4 6 8 10 12

Latency (ms) - Logarithmic

Number of Nodes Cassandra HBase

Voldemort VoltDB

Redis MySQL

Figure 11: Write latency for Workload W

0

10000

20000

30000

40000

50000

60000

2 4 6 8 10 12

Throughput (Ops/sec)

Number of Nodes Cassandra HBase

VoltDB Redis

MySQL

Figure 12: Throughput for Workload RS

In Figure 12, the throughput results can be seen. MySQL has the best throughput for a single node, but does not scale with the number of nodes. The same is true for VoltDB which is, however, consistent with the general performance of VoltDB in our evalu- ation. Furthermore, Redis achieves similar performance as in the workloads without scans. Lastly, Cassandra and HBase, again, ob- tain a linear increase in throughput with the number of nodes. The scan latency results, shown in Figure 13, signify that the MySQL scans are slow for setup with larger than two nodes. This justifies the low throughput. MySQL’s weak performance for scans can also be justified with the way the scans are done in the YCSB client. The scan is translated to a SQL query that retrieves all records with a key equal or greater than the start key of the scan. In the case of MySQL this is inefficient. HBase’s latency is almost in the second range. Likewise, Cassan- dra’s scans are constant and are in the range of 20-25 milliseconds. Although not shown, it is interesting to note that HBase’s latency for read and write operations is the same as without scans. In ad- dition, the scans are not significantly slower than read operations. This is not true for Cassandra, here all operations have the same increase of latency, and, in general, scans are 4 times slower than reads. Redis behaves like HBase, but has a latency that is in the range of 4-8 milliseconds. Similar to Cassandra, VoltDB has the same latency for all different operations.

5.5 Workload RSW

Workload RSW has 50% reads of which 25% are scans. The throughput results can be seen in Figure 14. The results are sim- ilar to workload RS with the difference that MySQL’s throughput is as low as 20 operations per second for one node and goes below one operation per second for four and more nodes. This can again be explained with the implementation of the YCSB client. HBase and Cassandra gain from the lower scan rate and have, therefore,

1

10

100

1000

2 4 6 8 10 12

Latency (ms) - Logarithmic

Number of Nodes Cassandra HBase

VoltDB Redis

MySQL

Figure 13: Scan latency for Workload RS

0

10000

20000

30000

40000

50000

60000

70000

80000

2 4 6 8 10 12

Throughput (Ops/sec)

Number of Nodes Cassandra HBase

VoltDB Redis

MySQL

Figure 14: Throughput for Workload RSW

a throughput that is twice as high as for Workload RS. VoltDB achieves the best throughput for one node. Furthermore, VoltDB’s throughput only slightly decreases from two to four nodes which can also be seen for Workload RS. The scan operation latency is for Workload RSW for Cassandra and Voldemort, all other systems have a slightly increased scan latency. The scan latencies are all stable with the exception of MySQL. We omit the graph due to space restrictions.

5.6 Varying Throughput The maximum throughput tests above are a corner case for some of the systems as the high latencies show. To get more insights into the latencies in less loaded system we made a series of tests where we limited the maximum workload. In this test, we used the configuration with 8 nodes for each system and limited the load to 95% to 50% of the maximum throughput that was determined in

0

20

40

60

80

100

120

100 90 80 70 60 50

Latency (Normalized)

Percentage of Maximum Throughput Cassandra HBase

Voldemort MySQL

Redis

Figure 15: Read latency for bounded throughput on Workload R

1

10

R RW W

Latency (ms) - Logarithmic

Workload Cassandra HBase Voldemort

Figure 20: Write latency for 8 nodes in Cluster D

40 ms for Workload R and RW. For workload W the latency is 25 ms. HBase’s read latency is surprisingly best in the mixed Work- load RW with 70 ms on average, for Workload W it is worst with over 200 ms. Voldemort has by far the best latency that is 5 and 6 ms for Workload R and Workload RW and increases to 20 ms for Workload W. The write latency is less dependent on the workload as can be seen in Figure 20. As in Cluster M, HBase has a very low latency, well below 1 ms. Interestingly, it is best for Workload RW. Cas- sandra and Project Voldemort exhibit a similar behavior. The write latency of these two systems is stable with a slight decrease for Workload RW.

5.9 Discussion

In terms of scalability, there is a clear winner throughout our experiments. Cassandra achieves the highest throughput for the maximum number of nodes in all experiments with a linear in- creasing throughput from 1 to 12 nodes. This comes at the price of a high write and read latencies. Cassandra’s performance is best for high insertion rates. HBase’s throughput in many exper- iments is the lowest for one node but also increases almost linearly with the number of nodes. HBase has a low write latency, espe- cially in workloads with a considerable number of reads. The read latency, however, is much higher than in other systems. Project Voldemort in our tests positions itself in between HBase and Cas- sandra. It also exhibits a near linear scalability. The read and write latency in Project Voldemort are similar and are stable at a low- level. Cassandra, HBase, and Project Voldemort were also evalu- ated on Cluster D. In this disk-bound setup, all systems have much lower throughputs and higher latencies. Our sharded MySQL installation achieves a high throughput as well which is almost as high as Cassandra’s. Interestingly, the la- tency of the sharded system decreases with the number of nodes due to the decreased relative load of the individual systems. For scans, the performance of MySQL is low which is due to the imple- mentation of scans in the sharding library. Since we were not able to successfully run the Redis cluster version, we used the sharding library Jedis. The standalone version of Redis has a high through- put that exceeds all other systems for read-intensive workloads. The sharding library, however, does not balance the workload well which is why the the throughput does not increase in the same man- ner as for MySQL. However, the latencies for both read and write operations also decrease with increasing number of nodes for the sharded Redis setup. Intrigued by the promised performance, we also included VoltDB in our experiments. The performance for a single instance is in fact high and comparable to Redis. How- ever, we never achieved any throughput increase with more than one node.

  1. EXPERIENCES In this section, we report, from an industry perspective, addi- tional findings and observations that we encountered while bench- marking the various systems. We report on the difficulty to setup, to configure, and, most importantly, to tune these systems for an industry-scale evaluation. In our initial test runs, we ran every sys- tem with the default configuration, and then tried to improve the performance by changing various tuning parameters. We dedicated at least a week for configuring and tuning each system (concentrat- ing on one system at a time) to get a fair comparison.

6.1 YCSB The YCSB benchmark was intuitive to use and fit our needs pre- cisely. In the first version of YCSB that we used to benchmark the system, we, however, had a problem with its scalability. Because of the high performance of some of the systems under test, YCSB was not able to fully saturate them with one client node assigned to four storage nodes. Partly due to a recent YCSB patch (during our experimental evaluation) and by decreasing the ratio of client nodes to store nodes up to 1:2, we were able to saturate all data stores. Cassandra Cassandra’s setup was relatively easy, since there are quick-start manuals available at the official website^9. Since Cassan- dra is a symmetric system, i.e., all nodes are equal, a single setup for all nodes is virtually sufficient. There are only a few changes necessary in the configuration file to setup a cluster of Cassandra. In our tests, we had no major issues in setting up the cluster. Like other key-value store systems, Cassandra employs consis- tent hashing for distributing the values across the nodes. In Cassan- dra, this is done by hashing the keys in the a range of 2127 values and dividing this range by certain tokens. The default configura- tion selects a random seed (token) for each node that determines its range of hashed keys. In our tests, this default behavior fre- quently resulted in a highly unbalanced workload. Therefore, we assigned an optimal set of tokens to the nodes after the installation and before the load. This resulted in an optimally balanced data placement it, however, requires that the number of nodes is known in advance. Otherwise, a costly repartitioning has to be done for achieving a balanced data load. HBase The configuration and installation of HBase was more challenge than in the case of Cassandra. Since HBase uses HDFS, it also requires the installation and configuration of Hadoop. Fur- thermore, HBase is not symmetric and, hence, the placement of the different services has an impact on the performance as well. Since we focused on a setup with a maximum of 12 nodes, we did not assign the master node and jobtracker to separate nodes instead we deployed them with data nodes. During the evaluations, we encountered several additional prob- lems, in which the benchmark unexpectedly failed. The first issue that randomly interrupted the benchmarks was a suspected memory leak in the HBase client that was also documented in the Apache HBase Reference Guide^10. Although we were able to fix this is- sue with specific memory settings for the Java Virtual Machine, determine the root cause was non-trivial and demanded extensive amount of debugging. Another configuration problem, which al- most undetectable was due to an incorrect permission setting for the HDFS data directory, in which the actual errors in log file were misleading. HBase is strict in the permission settings for its direc- tories and does not permit write access from other users on the data

(^9) Cassandra website: http://cassandra.apache.org/ (^10) Apache HBase Reference Guide - http://hbase.apache. org/book.html

directory. Although the error is written to the data node log, the error returned to the client reports a missing master. In contrast to the other systems in our test, the HBase benchmark runs frequently failed when there was no obvious issue. These fail- ures were non-deterministic and usually resulted in a broken test run that had to be repeated many times. Redis The installation of Redis was simple and the default con- figuration was used with no major problems. However, Redis re- quires additional work to be done on the YCSB client side, which was implemented only to work against a single-node server in- stance. Since the Redis cluster version is still in development, we implemented our own YCSB client using the sharding capabilities of the Java Jedis library. Thus, we spread out a set of independent single-node Redis instances among the client nodes responsible of the sharding. Therefore, as each thread was required to manage a connection for each of the Redis server, the system got quickly saturated be- cause of the number of connections. As a result, we were forced to use a smaller number of threads. Fortunately, smaller number of threads were enough to intensively saturate the systems. Project Voldemort The configuration of Project Voldemort was easy for the most part. However, in contrast to the other systems, we had to create a separate configuration file for each node. One rather involved issue was tuning the configuration of the client. In the default setting, the client is able to use up to 10 threads and up to 50 connections. However, in our maximum throughput setup this limit was always reached. This triggered problems in the storage nodes because each node configured to have a fixed number of open connections – which is in the default configuration 100 – this limit is quickly reached in our tests (with only two YCSB client threads). Therefore, we had to adjust the number of server side threads and the number of threads per YCSB instances. Furthermore, we had to optimize the cache for the embedded BerkeleyDB so that Project Voldemort itself had enough memory to run. For inadequate set- tings the server was unreachable after the clients established their connections. MySQL MySQL is a well-known and widely documented project, thus the installation and configuration of the system was smooth. In short, we just set InnoDB as the storage system and the size of the buffer pool accordingly to the size of the memory. As we used the default RDBMS YCSB client, which automati- cally shards the data on a set of independent database servers and forces each client thread to manage a JDBC connection with each of the servers, we required to decrease the number of threads per client in order to not saturate the systems. An alternative approach would be to write a different YCSB client and use a MySQL cluster version. VoltDB Our VoltDB configuration was mostly inspired by the VoltDB community documentation^11 that suggested the client im- plementation and configuration of the store. The VoltDB develop- ers benchmarked the speed of VoltDB vs. Cassandra themselves with a similar configuration but only up to 3 nodes [14]. Unlike our results they achieved a speed-up with a fixed sized database. In contrast to our setup, their tests used asynchronous communication which seems to better fit VoltDB’s execution model.

  1. RELATED WORK After many years in which general purpose relational database systems dominated not only the market but also academic research, there has been an advent of highly specialized data stores. Based

(^11) VoltDB Performance Guide - http://community.voltdb.

com/docs/PerfGuide/index

on the key-value paradigm many different architectures where cre- ated. Today, all major companies in the area of social Web have de- ployed a key-value store: Google has BigTable, Facebook Cassan- dra, LinkedIn Project Voldemort, Yahoo! PNUTS [6], and Amazon Dynamo [8]. In our benchmarking effort, we compared six well- known, modern data stores, all of which are publicly available. In our comparison, we cover a broad range of architectures and chose systems that were shown or at least said to be performant. Other stores we considered for our experiments but excluded in order to present a more thorough comparison of the systems tested were: Riak^12 , Hypertable^13 , and Kyoto Cabinet^14. A high-level overview of different existing systems can be found in [4]. As explained above, we used the YCSB benchmark for our eval- uation [7]. This benchmark is fairly simple and has a broad user base. It also fits our needs for the APM use case. In the YCSB’s publication, a comparison of PNUTS, Cassandra, HBase, and My- SQL is shown. Interestingly enough, there is no other large scale comparison across so many different systems available. However, there are a multiple online one-on-one comparisons as well as sci- entific publications. We summarize the findings of other compar- isons without claiming to be exhaustive. Hugh compared the per- formance of Cassandra and VoltDB in [14], in his setup VoltDB outperformed Cassandra for up to 3 nodes on a data set of 500K values. We see a similar result for Workload R, however, for 4 and more nodes the VoltDB performance drastically decreases in our setup. In [16], Jeong compared Cassandra, HBase, and Mon- goDB on a three node, triple replicated setup. In the test, the author inserted 50M 1KB records in the system and measured the write throughput, the read-only throughput, and a 1:1 read-write through- put which is similar to our Workload RW. The results show that Cassandara outperforms HBase with less difference than we ob- served in our tests. MongoDB is shown to be less performant, how- ever, the authors note that they observed high latencies for HBase and Cassandra which is consistent with our results. Erdody com- pared the performance and latency for Project Voldemort and Cas- sandra in [10]. In the three node, triple replicated setup, 1.5KB and 15KB records are used which is much larger than our record size. In this setup, the performance difference of Project Voldemort and Cassandra is not as significant as in our setup. Pirzadeh et al. used YCSB to evaluate the performance of scan operations in key value stores [23]. The authors compared the per- formance of Cassandra, HBase, and Project Voldemort with a focus on scan workloads to determine the scan characteristics of these systems. Patil et al. developed the YCSB++ benchmark [22]. In their tests, they compared HBase to their own techniques with up to 6 nodes. An interesting feature of the YCSB++ benchmark is the more enhanced monitoring using an extension of Ganglia. A com- parison of Cassandra, HBase, and Riak discussing their elasticity was presented by Konstantinou et al. [18]. The authors also use the YCSB benchmark suite. In the presented results, HBase consis- tently outperforms Cassandra which could be the case because of the older version of Cassandra (0.7.0 beta vs. 1.0.0-rc2). We are not aware of any other study that compares the perfor- mance of such a wide selection of systems on a scale of up to 12+ nodes. In contrast to previous work, our data set consists of small records which increases the impact of inefficient resource usage for memory, disk and network. Our performance numbers are in many cases consistent with previous findings but give a comprehensive comparison of all systems for a broad range of workloads. (^12) Riak homepage - http://wiki.basho.com/ (^13) Hypertable homepage - http://hypertable.org (^14) Kyoto Cabinet homepage - http://fallabs.com/ kyotocabinet/