Answers: <blockquote>
    <p>... [I] can't say what exact app (shop, <strong>historic info</strong>, social media, forum)</p>
  </blockquote>
  
  <p>This makes this question very difficult to answer. This is because you have two basic types of queries:</p>
  
  <h2>OLTP and OLAP queries</h2>
  
  <blockquote>
    <p><strong>Online transaction processing (OLTP)</strong> is information systems that facilitate and manage transaction-oriented applications, typically for data entry and retrieval transaction processing.<sup>1</sup></p>
  </blockquote>
  
  <p>These kinds of queries tend to be very high volume, but short, and targeted and are a great fit for a system like MariaDB. On the other hand,</p>
  
  <blockquote>
    <p><strong>Online analytical processing, or OLAP</strong>, is an approach to answering multi-dimensional analytical (MDA) queries swiftly in computing. OLAP is part of the broader category of business intelligence, which also encompasses relational database, report writing and data mining. Typical applications of OLAP include business reporting for sales, marketing, management reporting, business process management (BPM), budgeting and forecasting, financial reporting and similar areas, with new applications coming up, such as agriculture.<sup>2</sup></p>
  </blockquote>
  
  <p>These types of queries perform extremely poorly at scale in Maria DB unless it is <a href="https://mariadb.com/resources/blog/mariadb-columnstore-new-beginning" rel="nofollow noreferrer">properly tuned</a> and certain database management and <a href="https://www.percona.com/blog/2010/11/15/shard-query-adds-parallelism-to-queries/" rel="nofollow noreferrer">retrieval techniques</a> are used (such as <a href="https://www.rittmanmead.com/blog/2006/04/using-partitioning-to-improve-the-performance-of-oracle-olap-aggregation/" rel="nofollow noreferrer">partitioning</a>, for example). These performance issues are largely a result of a confluence of disk I/O issues and the fact that <a href="https://dba.stackexchange.com/questions/56522/mysql-multi-threading-for-a-single-query">queries are single-threaded</a> in terms of CPU. While sysbench can do a great job of testing the performance of OLTP queries, for OLAP queries, you will need something else. For example, one programmer forked sysbench to <a href="https://github.com/tidalscale-frankh/sysbench-olap" rel="nofollow noreferrer">add the ability to do OLAP queries</a>.</p>
  
  <h2>Conclusion</h2>
  
  <p>Unless we can get a bit more information about how much data you are working with and what kind of I/O operations you will be doing (reporting or transactional) it is hard to say if this specific tool will do the job. Ultimately database management is a complex discipline and there is a reason DBAs are able to make careers out of just database management. I have seen a lot of programmers think that they don't really need to worry about database management and they don't really need to integrate a DBA into their team. As their app scaled, they very quickly found out they were dead wrong. If you are planning a multi-tenancy DBaaS environment, you are going to need to architect your system very carefully in order to prevent one tenant from affecting the performance of the other and consider offering DBA consulting if your customers begin to suffer performance issues - and factor that into the price. If they can't afford their own databases and find that managing that in house is untenable and unaffordable, you will need to provide both the platform <strong><em>and</em></strong> the expertise as part of your service as one customers performance issue can easily become <em>all</em> of your customers' performance issue. That means you are going to really need to know your stuff or make sure you hire people who do. In short, databases are <em>hard</em>.</p>
  
  <p><sup>1</sup> <a href="https://en.wikipedia.org/wiki/Online_transaction_processing" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Online_transaction_processing</a></p>
  
  <p><sup>2</sup> <a href="https://en.wikipedia.org/wiki/Online_analytical_processing" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Online_analytical_processing</a></p>
  
Answers: CC BY-SA 3.0
Answers: 2018-01-29T16:45:05.703Z
Answers: 2018-01-29T16:45:05.703Z
Answers: James Shewey
Body: <p>As far as I understand <code>sysbench</code> is for bencharking / test max. performance of a database server. I wish to simulate DB usage pattern of a typical cloud native web app (Twelve-Factor App). Is this possible with <code>sysbench</code>? If yes how? Or any other Open Source tool you recommend?</p>
  
  <p>I work in DBaaS (MariaDB) so can't say what exact app (shop, historic info, social media, forum). I wish to deploy app on Cloud Foundry.</p>
  
Tags: <cloud><databases>
Title: simulate SQL DB usage pattern of a typical cloud native web app with sysbench?
UserDisplayName: Sybil
ThreadText: # simulate SQL DB usage pattern of a typical cloud native web app with sysbench?
  
  (Asked by: username_0 on 2018-01-29)
  
  As far as I understand `sysbench` is for bencharking / test max. performance of a database server. I wish to simulate DB usage pattern of a typical cloud native web app (Twelve-Factor App). Is this possible with `sysbench`? If yes how? Or any other Open Source tool you recommend?
  
  I work in DBaaS (MariaDB) so can't say what exact app (shop, historic info, social media, forum). I wish to deploy app on Cloud Foundry.
  
  **Tags:** cloud, databases
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-29. Score: 2
  
  > ... [I] can't say what exact app (shop, **historic info**, social media, forum)
  
  This makes this question very difficult to answer. This is because you have two basic types of queries:
  
  ## OLTP and OLAP queries
  
  > **Online transaction processing (OLTP)** is information systems that facilitate and manage transaction-oriented applications, typically for data entry and retrieval transaction processing.1
  
  These kinds of queries tend to be very high volume, but short, and targeted and are a great fit for a system like MariaDB. On the other hand,
  
  > **Online analytical processing, or OLAP**, is an approach to answering multi-dimensional analytical (MDA) queries swiftly in computing. OLAP is part of the broader category of business intelligence, which also encompasses relational database, report writing and data mining. Typical applications of OLAP include business reporting for sales, marketing, management reporting, business process management (BPM), budgeting and forecasting, financial reporting and similar areas, with new applications coming up, such as agriculture.2
  
  These types of queries perform extremely poorly at scale in Maria DB unless it is [properly tuned](https://mariadb.com/resources/blog/mariadb-columnstore-new-beginning) and certain database management and [retrieval techniques](https://www.percona.com/blog/2010/11/15/shard-query-adds-parallelism-to-queries/) are used (such as [partitioning](https://www.rittmanmead.com/blog/2006/04/using-partitioning-to-improve-the-performance-of-oracle-olap-aggregation/), for example). These performance issues are largely a result of a confluence of disk I/O issues and the fact that [queries are single-threaded](https://dba.stackexchange.com/questions/56522/mysql-multi-threading-for-a-single-query) in terms of CPU. While sysbench can do a great job of testing the performance of OLTP queries, for OLAP queries, you will need something else. For example, one programmer forked sysbench to [add the ability to do OLAP queries](https://github.com/tidalscale-frankh/sysbench-olap).
  
  ## Conclusion
  
  Unless we can get a bit more information about how much data you are working with and what kind of I/O operations you will be doing (reporting or transactional) it is hard to say if this specific tool will do the job. Ultimately database management is a complex discipline and there is a reason DBAs are able to make careers out of just database management. I have seen a lot of programmers think that they don't really need to worry about database management and they don't really need to integrate a DBA into their team. As their app scaled, they very quickly found out they were dead wrong. If you are planning a multi-tenancy DBaaS environment, you are going to need to architect your system very carefully in order to prevent one tenant from affecting the performance of the other and consider offering DBA consulting if your customers begin to suffer performance issues - and factor that into the price. If they can't afford their own databases and find that managing that in house is untenable and unaffordable, you will need to provide both the platform ***and*** the expertise as part of your service as one customers performance issue can easily become *all* of your customers' performance issue. That means you are going to really need to know your stuff or make sure you hire people who do. In short, databases are *hard*.
  
  1 <https://en.wikipedia.org/wiki/Online_transaction_processing>
  
  2 <https://en.wikipedia.org/wiki/Online_analytical_processing>
  
  
  ---
  
  