• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    JavaScript
  • Created over 12 years ago
  • Updated over 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MemSQL Workload Simulator and Dashboard

MemSQL Workload Simulator

The MemSQL Workload Simulator lets you simulate running thousands of queries per second against the database with a custom workload. It also supports live mode, which lets you monitor the performance of a running MemSQL instance.

This project is under active, continuous development. Expect updates to come frequently as the feature set is built out. If you have suggestions for features, feel free to post them to the issues section of this repository or implement them and submit them as a pull request. If you build an interesting workload, we would love to include it in the workloads directory.

Requirements

This guide is known to work on Ubuntu 12.04. Since it uses standard python packages and tools, it should work on other Linux distributions as well. It assumes that you already have a MemSQL server set up and running on 127.0.0.1:3306 -- refer to developers.memsql.com for more info about running MemSQL.

All command-line instructions assume that your working directory is the original location of this README file.

Installing the workload simulator

  • Make sure you have python dev tools and pip installed
sudo apt-get install python-dev python-setuptools libmysqlclient-dev
sudo easy_install pip
  • Install dependencies
sudo pip install flask sqlalchemy MySQL-python simplejson

Running the workload simulator

  • Start the server
python runner
  • You can stop it by sending SIGTERM to the parent python process. The easiest way to do this is to type Ctrl-\ (control backslash) on your terminal.

  • Open http://localhost:9000 in a browser

This is the "active mode" which allows you to run queries against the MemSQL server. Let's start with a simple example.

  • Install the key-value example database and table
mysql -h 127.0.0.1 -u root -P 3306 -vv < workloads/key_value/key_value.sql
  • Load the key-value workload

On http://localhost:9000, click Load Workload and choose the file workloads/key_value/key_value.json

You will see three types of queries appear in a grid. Next to each there is a dial indicating how many times per second we will try to execute a query of that type.

  • Hit PLAY

The simulator starts executing queries against the database. The dials start showing the actual number of queries per second for each type of query. On the right you can see a real-time graph of the total number of queries per second being processed by MemSQL.

  • Console

At any time, you can use the console on the right to run individual queries. Running your own queries may be useful for setting up schemas, inspecting the tables, and checking syntax.

  • Running with MySQL

This mode does not use any MemSQL specific query constructs, so you can use it to run heavy workloads against MySQL as well.

Live mode

This is a real-time monitor of all queries processed by MemSQL. It is refreshed every second. On the bottom right there is a pie chart detailing the memory used by MemSQL. This mode can only be used with MemSQL.

Getting advanced

  • Try creating your own workload in active mode.

Generate random numbers and strings with @ and ^, respectively. For example, to insert a random integer value in the key-value example, use the query INSERT INTO t (k, v) VALUES (@, @);

The sql schema is in workloads/video/video.sql. The workload is in workloads/video/video.json

Troubleshooting

If a message pops up saying, "something went wrong...", you've run into an unhandled error. If the problem persists, restart the server from the command line by interrupting with Ctrl-\ and running "python runner".

More Repositories

1

singlestore-spark-connector

A connector for MemSQL and Spark
Scala
156
star
2

dbbench

Database Benchmark Tool
Go
147
star
3

lockfree-bench

Benchmarks for lockfree datastructures.
C++
118
star
4

memsql-docker-quickstart

A docker image for testing MemSQL + MemSQL Ops
Python
64
star
5

memsql-python

This repository holds some python libraries and plugins designed to be used with MemSQL.
Python
62
star
6

memsql-perf-tools

37
star
7

streamliner-starter

Starter project for building MemSQL Streamliner Pipelines
Scala
32
star
8

datafiller

DataFiller - generate random data from database schema
Python
31
star
9

streamliner-examples

Example code for building your own MemSQL Streamliner Pipelines
Scala
23
star
10

bench

MemSQL Benchmark Tools
Python
23
star
11

nyse-demo

Simple NYSE Simulator on MemSQL
Python
19
star
12

deployment-docker

This repository contains our official deployment Docker images for various products.
Shell
15
star
13

pipelines-twitter-demo

Example project which simulates an interesting analytics use case using MemSQL Pipelines.
PLpgSQL
14
star
14

singlestore-kafka-connector

Java
10
star
15

arcanist

clone of facebook arcanist repository
PHP
10
star
16

singlestore-odbc-connector

C
8
star
17

memsql-loader

Deprecated - Check out MemSQL Pipelines instead!
Python
8
star
18

memsql-top

Python
7
star
19

dbt-singlestore

Python
7
star
20

benchmarks-tpc

benchmarks-tpc
6
star
21

tpcc-mysql

Fork of github.com/Percona-Lab/tpcc-mysql
C
6
star
22

memsql-collectd

The official MemSQL Ops collectd plugin.
Python
5
star
23

frodo

Python
4
star
24

memsql-statsd

A statsd plugin for MemSQL Ops
JavaScript
4
star
25

dbbench-tools

Tools for simplifying workloads that use dbbench.
Python
4
star
26

starter_kits

LookML
3
star
27

geo-benchmark

A simple benchmark to help compare performance of MemSQL and Elasticsearch on a Geospatial workload.
Python
3
star
28

upsert-benchmark

This repository contains a simple benchmark to help compare performance of MemSQL and Cassandra on a fast-update workload.
Python
3
star
29

gatsby-source-api

TypeScript
2
star
30

memsql-xgboost

2
star
31

book

Shell
2
star
32

memsql-covid-datasets

This repo contains quick-start scripts for COVID-19 related datasets.
TSQL
2
star
33

eslint-react-hooks-disable-import

JavaScript
2
star
34

ntest

Dependency-injection test helpers for testing with nject. Golang
Go
2
star
35

singlestore-auth-helper

Helper utility for browser-based authentication
Go
2
star
36

hiring

1
star
37

pipelines-meetup-oct-2016

https://www.meetup.com/MemSQL/events/234405914/
Python
1
star
38

datadirect-example

Example of using the Progress DataDirect MySQL Connector with MemSQL
Java
1
star
39

dremio-singlestore

Java
1
star
40

sinfo-workshop

JavaScript
1
star