Centos7 Source Installation Memaslap (libmemcached)--memcached Benchmark Testing tool

Source: Internet
Author: User
Tags benchmark memcached


Memaslap is a load generation and benchmark tool for memcached servers. It generates configurable workload such as threads, Concurrencies,connections, run time, overwrite, Miss rate, key size, V Alue size, get/setproportion, expected throughput, and so on. Furthermore, it also tests dataverification, expire-time verification, UDP, binary protocol, Facebook test,replication tes T, Multi-get and reconnection, etc.



It can be considered that Memaslap is an upgraded version of Emslap, offering more features.






Prerequisite: Memcached is installed to ensure that the Libevent library is installed





Yum install libevent.x86_64  libevent-devel.x86_64    memcached.x86_64





Memaslap is a component of the libmemcached, so you need to compile the installation. (Libmemcached is a memcached library, client library, C and C + + language implementation of the client library, with low memory occupancy, thread safety, and provides full support for memcached functionality.) )





  wget  https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz  
  tar zxvf Libmemcached-1.0.18.tar.gz-c/data/  
  cd/data/libmemcached-1.0.18/  
  ./configure-prefix=/usr/local/ libmemcached--with-memcached--enable-memaslap make make and  
  install
If you have memaslap this file under/usr/local/libmemcached/bin, it means that the installation was successful





Problems that you may encounter



1.





/bin/ld:clients/ms_thread.o:undefined reference to symbol ' pthread_key_delete@ @GLIBC_2.2.5 '
/bin/ld:note: ' pthread_key_delete@ @GLIBC_2.2.5 ' is defined in dso/lib64/libpthread.so.0 so try adding it to the linker command
line /lib64/libpthread.so.0:could not read Symbols:invalid operation
Collect2:error:ld returned 1 exit status
make [1]: * * * [Clients/memaslap] Error 1

Solutions





Try going into the Makefile and adding '-l/lib64-lpthread ' to the variable ldflags.



Ldflags variable in makefile file 2937 line



Then make & make Install



Reference links This guy's got a problem with the grammar.






2. C + + compiler not installed





# CENTOS7
Yum Group install "Development Tools" 

# if error
./libtool:line 990:g++: Command not found error message
Yum -y install gcc* 
# then continue make

# CENTOS6
 https://www.vultr.com/docs/how-to-install-gcc-on-centos-6





Finally, show





$ /usr/local/libmemcached/bin/memaslap -h
memslap v1.0
    Generates workload against memcached servers.

Usage:
    memslap -hV | -s servers [-F config_file] [-t time | -x exe_num] [...]

Options:
    -s, --servers=
        List one or more servers to connect. Servers count must be less than
        threads count. e.g.: --servers=localhost:1234,localhost:11211
    -T, --threads=
        Number of threads to startup, better equal to CPU numbers. Default 8.
    -c, --concurrency=
        Number of concurrency to simulate with load. Default 128.
    -n, --conn_sock=
        Number of TCP socks per concurrency. Default 1.
    -x, --execute_number=
        Number of operations(get and set) to execute for the
        given test. Default 1000000.
    -t, --time=
        How long the test to run, suffix: s-seconds, m-minutes, h-hours,
        d-days e.g.: --time=2h.
    -F, --cfg_cmd=

▽
        Load the configure file to get command,key and value distribution list.
    -w, --win_size=
        Task window size of each concurrency, suffix: K, M e.g.: --win_size=10k.
        Default 10k.
    -X, --fixed_size=
        Fixed length of value.
    -v, --verify=
        The proportion of date verification, e.g.: --verify=0.01
    -d, --division=
        Number of keys to multi-get once. Default 1, means single get.
    -S, --stat_freq=
        Frequency of dumping statistic information. suffix: s-seconds,
        m-minutes, e.g.: --resp_freq=10s.
    -e, --exp_verify=
        The proportion of objects with expire time, e.g.: --exp_verify=0.01.
        Default no object with expire time
    -o, --overwrite=
        The proportion of objects need overwrite, e.g.: --overwrite=0.01.
        Default never overwrite object.
    -R, --reconnect
        Reconnect support, when connection is closed it will be reconnected.
    -U, --udp
        UDP support, default memslap uses TCP, TCP port and UDP port of
        server must be same.
    -a, --facebook
        Whether it enables facebook test feature, set with TCP and multi-get with UDP.
    -B, --binary
        Whether it enables binary protocol. Default with ASCII protocol.
    -P, --tps=
        Expected throughput, suffix: K, e.g.: --tps=10k.
    -p, --rep_write=
        The first nth servers can write data, e.g.: --rep_write=2.
    -b, --verbose
        Whether it outputs detailed information when verification fails.
    -h, --help
        Display this message and then exit.
    -V, --version
        Display the version of the application and then exit.

Examples:
    memslap -s 127.0.0.1:11211 -S 5s
    memslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
    memslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
    memslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
    memslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
    memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
    memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2


Reference





MEMASLAP Official Website documents



http://blog.csdn.net/wangsg2014/article/details/17451273



http://blog.csdn.net/jzmzy/article/details/47806371





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.