Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Twemperf to test the performance of Memcache

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "how to use Twemperf to test the performance of Memcache", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Twemperf to test the performance of Memcache.

Twemperf, also known as mcperf, is a performance testing tool for memcached. It uses memcached's ASCII protocol and can quickly generate a large number of memcached connections and requests. The tool is mainly used for memcached performance testing, simulating large concurrent set, get and other operations, mcperf can only run in unix/linux environment.

Installation

Download: https://github.com/twitter/twemperf

Installation is an ordinary trilogy. If you don't write it here, you won't Google it by yourself.

Usage

The first is to create 1000 concurrent connections to port 11211 of the machine (this port is the default port for the tool). The speed of connection creation is 1000 per second, and each connection sends 10 "set" requests (equivalent to 10 iterations). These 10 requests are sent at the speed of 1000 requests per second, and the size of the data sent is normally distributed in 1-16 bytes (that is, the size of the value stored in memcached).

The command is mcperf-- linger=0-- timeout=5-- conn-rate=1000-- call-rate=1000-- num-calls=10-- num-conns=1000-- sizes=u1,16

The second: create 100 connections to port 11211 on this machine, each connection is created after the last connection is disconnected, each connection sends 100 "set" requests, each request is created after receiving the response of the previous request, and the data size sent is 1 byte.

The command is mcperf-- linger=0-- call-rate=0-- num-calls=100-- conn-rate=0-- num-conns=100-- sizes=d1

Result field interpretation

Total: displays the total number of connections, total requests, total responses, and time spent testing.

Connection rate: actual number of connections per second

Connection time: actual time spent on each connection (including connection time, set time, etc.)

Connect time: the time it takes to connect (just the time spent connecting)

Request rate: number of requests per second

Request size: size of bytes per request

Response rate: responses per second

Response size: byte size of the response

Response time: response time (in milliseconds)

Response type:stored indicates the quantity of storage, not_stored indicates the quantity of storage that is not available, exists indicates the quantity that already exists, and not_found indicates the quantity not found.

Summary

From the above introduction, we can see that the method of testing memcache with mcperf is to adjust different parameter values to execute the command, and get the result after many samples. Generally, focus on Total, Connection rate, Request rate, Response rate, Response time, Response type, Net I Dot O these indicators.

At this point, I believe you have a deeper understanding of "how to use Twemperf to test the performance of Memcache". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report