Created
April 12, 2016 07:44
-
-
Save jirfag/fc62cfd7e59c58a90b394007880766c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. go to https://aws.amazon.com and launch t2.nano instance with Ubuntu 14.04, opening ports 11212 and 11211 in security group settings | |
# 2. connect via ssh to it | |
# 3. curl http://download.tarantool.org/tarantool/1.6/gpgkey | sudo apt-key add - | |
# 4. run next commands for installation of tarantool (it's from http://tarantool.org/download.html) | |
curl http://download.tarantool.org/tarantool/1.6/gpgkey | sudo apt-key add - | |
release=`lsb_release -c -s` | |
sudo rm -f /etc/apt/sources.list.d/*tarantool*.list | |
sudo tee /etc/apt/sources.list.d/tarantool_1_6.list <<- EOF | |
deb http://download.tarantool.org/tarantool/1.6/ubuntu/ $release main | |
deb-src http://download.tarantool.org/tarantool/1.6/ubuntu/ $release main | |
EOF | |
sudo apt-get update | |
sudo apt-get -y install tarantool | |
# 5. install tarantool-memcached | |
sudo apt-get install tarantool-memcached -y | |
# 6. run memcached-app in tarantool like in https://github.com/tarantool/memcached | |
sudo su | |
echo "local memcached = require('memcached')" >> /etc/tarantool/instances.available/example.lua | |
echo "local instance = memcached.create('my_instance', '0.0.0.0:11212')" >>/etc/tarantool/instances.available/example.lua | |
exit | |
sudo ln -sf /etc/tarantool/instances.{available,enabled}/example.lua | |
sudo sed "s/slab_alloc_arena = 0.5/slab_alloc_arena = 0.1/" -i /etc/tarantool/instances.available/example.lua | |
sudo tarantoolctl start example | |
# 7. run memcached | |
sudo apt-get install memcached -y | |
# is runs automatically after installation on port 127.0.0.1:11211 | |
sudo sed "s/127.0.0.1/0.0.0.0/" -i /etc/memcached.conf | |
sudo service memcached restart | |
# 8. go to go to https://aws.amazon.com and launch another t2.nano instance with Ubuntu 14.04, ssh to it | |
# 9. prepare ubuntu | |
sudo apt-get update | |
sudo apt-get install gcc make | |
# 9. download and compile mcperf | |
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/twemperf/mcperf-0.1.1.tar.gz | |
tar xvf mcperf-0.1.1.tar.gz | |
cd mcperf-0.1.1 | |
./configure && make | |
# 10. run mcperf benchmark | |
export SRV_IP="X.X.X.X" # ip of first aws instance | |
./src/mcperf -s $SRV_IP -p 11211 --sizes=u10,30 --linger=0 --timeout=5 --conn-rate=1000 --call-rate=10000 --num-calls=100 --num-conns=1000 | |
# 14713.8 req/s | |
./src/mcperf -s $SRV_IP -p 11212 --sizes=u10,30 --linger=0 --timeout=5 --conn-rate=1000 --call-rate=10000 --num-calls=100 --num-conns=1000 | |
# 20401.3 req/s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment