Skip to content

Instantly share code, notes, and snippets.

@fipar
Created March 15, 2018 16:57
Show Gist options
  • Save fipar/ca871024a1b0de4e99829c23935ccbc3 to your computer and use it in GitHub Desktop.
Save fipar/ca871024a1b0de4e99829c23935ccbc3 to your computer and use it in GitHub Desktop.
Running sysbench against Cassandra
telecaster:~ fipar$ docker run --name cassandra1 -d cassandra:latest
Unable to find image 'cassandra:latest' locally
latest: Pulling from library/cassandra
2a72cbf407d6: Pull complete
45339d0734a1: Pull complete
0881010f31a6: Pull complete
5331d043a453: Pull complete
c3eba8661eb9: Pull complete
9a8ad05c763b: Pull complete
e215e9518ddb: Pull complete
ed5cc4e008b9: Pull complete
4137f4ced19b: Pull complete
163716436679: Pull complete
Digest: sha256:3d9c03336f405b4ebc90baf7656df95ec2b29a7b91b9ddaf209b83309f850ae1
Status: Downloaded newer image for cassandra:latest
2f44207c0eb042cb67cc6e8ac286b59c1991f988f716e15269b863915f20e7cd
telecaster:~ fipar$ docker run --name cassandra2 -d --link cassandra1:cassandra cassandra:latest
6dbb0e565ca7d059f40f15052abc5d64b620f756fb664adc0d0799493c3d7d03
telecaster:~ fipar$ docker exec -it cassandra1 bash
root@2f44207c0eb0:/# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor':2};
cqlsh> use test;
cqlsh> create table user (userid int, username text, primary key (userid));
cqlsh> insert into user (userid,username) values (1,'root');
cqlsh:test> select * from user;
userid | username
--------+----------
1 | root
(1 rows)
telecaster:~ fipar$ docker run -v ~/src/:/src/ --name=sb -it severalnines/sysbench bash -c 'luarocks install lua-cassandra --local; luarocks install luasocket --local; /src/tmp/benchmark1.lua run'
Warning: The directory '/root/.cache/luarocks' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing /usr/local/lib/luarocks/rocks/luarocks/2.4.3-1/bin/luarocks with sudo, you may want sudo's -H flag.
Installing https://luarocks.org/lua-cassandra-1.2.3-0.rockspec
Missing dependencies for lua-cassandra 1.2.3-0:
luabitop (not installed)
lua-cassandra 1.2.3-0 depends on luabitop (not installed)
Installing https://luarocks.org/luabitop-1.0.2-3.rockspec
Cloning into 'luabitop'...
remote: Counting objects: 32, done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 32 (delta 2), reused 22 (delta 2), pack-reused 0
Receiving objects: 100% (32/32), 37.18 KiB | 0 bytes/s, done.
Resolving deltas: 100% (2/2), done.
Note: checking out 'ad0412ab7f94bd3d5b4ff3ddc1037e0e9531d54a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
gcc -O2 -fPIC -I/usr/include/lua5.1 -c bit.c -o bit.o
gcc -shared -o bit.so -L/usr/lib bit.o
No existing manifest. Attempting to rebuild...
luabitop 1.0.2-3 is now installed in /root/.luarocks (license: MIT/X license)
Cloning into 'lua-cassandra'...
remote: Counting objects: 106, done.
remote: Compressing objects: 100% (102/102), done.
remote: Total 106 (delta 25), reused 39 (delta 0), pack-reused 0
Receiving objects: 100% (106/106), 104.40 KiB | 0 bytes/s, done.
Resolving deltas: 100% (25/25), done.
Note: checking out 'ec12ee9b6bdbd7f9f8845c1662cace95e65b5600'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
lua-cassandra 1.2.3-0 is now installed in /root/.luarocks (license: MIT)
Warning: The directory '/root/.cache/luarocks' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing /usr/local/lib/luarocks/rocks/luarocks/2.4.3-1/bin/luarocks with sudo, you may want sudo's -H flag.
Installing https://luarocks.org/luasocket-3.0rc1-2.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/mime.c -o src/mime.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -shared -o mime/core.so -L/usr/lib src/mime.o
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/buffer.c -o src/buffer.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/auxiliar.c -o src/auxiliar.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/options.c -o src/options.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/timeout.c -o src/timeout.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/io.c -o src/io.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/usocket.c -o src/usocket.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/serial.c -o src/serial.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -shared -o socket/serial.so -L/usr/lib src/buffer.o src/auxiliar.o src/options.o src/timeout.o src/io.o src/usocket.o src/serial.o
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/buffer.c -o src/buffer.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/auxiliar.c -o src/auxiliar.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/options.c -o src/options.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/timeout.c -o src/timeout.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/io.c -o src/io.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/usocket.c -o src/usocket.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/unix.c -o src/unix.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -shared -o socket/unix.so -L/usr/lib src/buffer.o src/auxiliar.o src/options.o src/timeout.o src/io.o src/usocket.o src/unix.o
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/luasocket.c -o src/luasocket.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/timeout.c -o src/timeout.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/buffer.c -o src/buffer.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/io.c -o src/io.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/auxiliar.c -o src/auxiliar.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/options.c -o src/options.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/inet.c -o src/inet.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/except.c -o src/except.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/select.c -o src/select.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/tcp.c -o src/tcp.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/udp.c -o src/udp.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/usocket.c -o src/usocket.o -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_API=__attribute__((visibility("default"))) -DUNIX_API=__attribute__((visibility("default"))) -DMIME_API=__attribute__((visibility("default")))
gcc -shared -o socket/core.so -L/usr/lib src/luasocket.o src/timeout.o src/buffer.o src/io.o src/auxiliar.o src/options.o src/inet.o src/except.o src/select.o src/tcp.o src/udp.o src/usocket.o
luasocket 3.0rc1-2 is now installed in /root/.luarocks (license: MIT)
sysbench 1.0.13 (using bundled LuaJIT 2.1.0-beta2)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Initializing worker threads...
Threads started!
General statistics:
total time: 10.0027s
total number of events: 2977
Latency (ms):
min: 1.84
avg: 3.35
max: 98.38
95th percentile: 5.28
sum: 9960.83
Threads fairness:
events (avg/stddev): 2977.0000/0.00
execution time (avg/stddev): 9.9608/0.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment