InnoDBmemcached plug-in vs native memcached performance test

Source: Internet
Author: User
MySQL5.6 began to support the InnoDBmemcached plug-in, that is, the cache content in memcached can be efficiently read and written through SQL, and the Native memcache protocol is also supported, and cache data persistence can be realized, crashrecovery, mysqlreplication, triggers, stored procedures, and many other features. For details, see Benefit.

MySQL 5.6 began to support the InnoDB memcached plug-in, that is, the cache content in memcached can be efficiently read and written through SQL, and the Native memcache protocol can be used for read and write, and cache data persistence can be realized, crash recovery, mysql replication, triggers, stored procedures, and many other features. For details, see Benefit.

MySQL 5.6 began to support the InnoDB memcached plug-in, that is, the cache content in memcached can be efficiently read and written through SQL, and the Native memcache protocol can be used for read and write, and cache data persistence can be realized, crash recovery, mysql replication, triggers, stored procedures, and many other features. For details, see Benefits of the InnoDB/memcached Combination. It looks very attractive, so let's test it. It's just that the donkey is out of the door.

  • Environment preparation
Testing Machine Dell pe R710
CPU E5620? @ 2.40 GHz (4 core, 8 threads, L3 Cache 12 MB) * 2
Memory 48G (8G * 6)
RAID card PERC H700 Integrated, 512 MB, BBU, 12.10.1-0001
System Red Hat Enterprise Linux Server release 6.4 (Santiago)
Kernel 2.6.32-358. el6.x86 _ 64 #1 SMP
Raid level Raid 5 (10 k rpm sas 300G * 6)
File System Xfs
Hard Disk 10 k rpm sas 300G * 6, 1 hotspare
  • Test Plan
Solution 1 The server runs InnoDB MC and locally/remotely calls memslap to execute benchmark
Solution 2 The server runs Native MC and locally/remotely calls memslap to execute benchmark
  • Test script
Cat memslap_run.sh #! /Bin/sh .~ /. Bash_profile>/dev/null 2> & 1cd/home/mc-benchexec 3> & 1 4> & 2 1> memcache_memslap _ $ {RANDOM }. log 2> & 1 # continuous loop while [1] do # number of concurrent threads 4 ~ 256for THREAD in 4 8 16 32 64 128 256do # count = 1max = 5 while [$ count-le $ {max}] do # sample echo "memstat" memstat # -- flush the money after each test, data is cleared first # -- binary adopts the binary mode # initialize data: 5000000, and the data volume is accessed by each concurrent thread: 100000 # When the concurrent thread is 256, the total data volume can reach 30,600,000 # The -- test option is not specified, the default is to perform the set test memslap -- server = mc_server: 11211 -- concurrency =$ {THREAD} -- execute-number = 100000 -- initial-load = 5000000 -- flush -- binarycount = 'expr $ {count} + 1' # after each test, take a two-minute rest and wait for the server to restore the empty load. if [$ {count}-lt $ {max}]; then sleep 120 fiecho "" echo "" donedonedone
  • Test Results

1. Write MC

? ? ? ? ? ? ? ? Number of threads
Time consumed
256 128 64 32 16 8 4
NativeMC (unit: 1 second) 104.315 47.646 24.486 12.162 6.351 5.525 5.078
InnoDBMC (Units: 100 seconds) 339.1431 68.11128 27.67265 11.26917 4.968556 2.24988 1.104334

Directly compare with a graph:

Nativemc-vs-innodbmc-benchmark-02-set-result-20130828

2. Read MC

??????? Number of threads
Time consumed
4 concurrent threads, 10 million records
LOCAL Native MC 198.5016
Local InnoDB MC 327.239
Remote Native MC 846.286
Remote InnoDB MC 912.467

Comparison of graph methods:

Nativemc-vs-innodbmc-benchmark-03-get-result-20130828

  • Conclusion

InnoDB MC looks beautiful, and the reality is very skinny. It takes a lot of time to write data in four concurrent threads, which is the same as the 256 thread of native memcached. The difference is not just a few minutes, there is still much room for optimization.

In the case of cache read-only, InnoDB MC's local reading efficiency is approximately 2/3 of that of native memcached. In the case of remote reading, the local reading efficiency is equivalent to 1/4 ~ 1/3.

  • Recommended application scenarios

Considering the above test results, we recommend using InnoDB MC as follows:

1. Data is written to the InnoDB MC cache table through trigger or event sched;

2. Read the cache records in InnoDB MC locally/remotely using the memcache API;

3. Minimize the amount of data written to InnoDB MC remotely;

Original article address: InnoDB memcached plug-in vs native memcached performance test. Thank you for sharing it with me.

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.