redis memcache 性能测试

Redis性能测试报告 本文档描述Redis中间件性能测试的范围、方法、资源、进度,作为该中间件性能测试的依据,该文档的目的主要有: 1.明确测试范围、测试对象 2.明确测试目标 3.明确测试环境需求,包括:测试需要的软、硬件环境以及测试人力需求 4.确定测试方案,测试的方法和步骤 5.确定测试需要输出的结果和结果表现形式 立即下载

  $m = new Memcached();
    $m->addServer('127.0.0.1',11211);
    for($i=0;$i<1000;$i++){
         //$m->set($i,microtime());
          $m->get($i);
    }
    $r = new Redis;
    $r->connect('127.0.0.1',6379);
     for($i=0;$i<1000;$i++){
         //$r->set($i,microtime());
          $r->get($i);
    }
    

//redis get

This is ApacheBench, Version 2.3 <$Revision: 655654 $>

Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking localhost (be patient)




Server Software:        nginx/1.9.4
Server Hostname:        localhost
Server Port:            80


Document Path:          /test/test.php
Document Length:        0 bytes


Concurrency Level:      100
Time taken for tests:   47.997 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      147000 bytes
HTML transferred:       0 bytes
Requests per second:    20.83 [#/sec] (mean)
Time per request:       4799.664 [ms] (mean)
Time per request:       47.997 [ms] (mean, across all concurrent requests)
Transfer rate:          2.99 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   1.6      0       6
Processing:   103 4646 737.0   4787    6722
Waiting:       97 4646 737.0   4787    6722
Total:        103 4646 736.0   4787    6722


Percentage of the requests served within a certain time (ms)
  50%   4787
  66%   4814
  75%   4822
  80%   4849
  90%   4925
  95%   5343
  98%   6071
  99%   6128

 100%   6722 (longest request)



//redis set

This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking localhost (be patient)




Server Software:        nginx/1.9.4
Server Hostname:        localhost
Server Port:            80


Document Path:          /test/test.php
Document Length:        0 bytes


Concurrency Level:      100
Time taken for tests:   51.391 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      147000 bytes
HTML transferred:       0 bytes
Requests per second:    19.46 [#/sec] (mean)
Time per request:       5139.068 [ms] (mean)
Time per request:       51.391 [ms] (mean, across all concurrent requests)
Transfer rate:          2.79 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.3      0       6
Processing:    92 4975 728.6   5115    7040
Waiting:       86 4975 728.6   5115    7040
Total:         92 4975 727.6   5115    7040


Percentage of the requests served within a certain time (ms)
  50%   5115
  66%   5163
  75%   5207
  80%   5213
  90%   5231
  95%   5253
  98%   6202
  99%   6579
 100%   7040 (longest request)


//memcache get

This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking localhost (be patient)




Server Software:        nginx/1.9.4
Server Hostname:        localhost
Server Port:            80


Document Path:          /test/test.php
Document Length:        0 bytes


Concurrency Level:      100
Time taken for tests:   23.268 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      147000 bytes
HTML transferred:       0 bytes
Requests per second:    42.98 [#/sec] (mean)
Time per request:       2326.798 [ms] (mean)
Time per request:       23.268 [ms] (mean, across all concurrent requests)
Transfer rate:          6.17 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.1      0       6
Processing:    68 2246 802.2   2073    3578
Waiting:       63 2246 802.2   2073    3578
Total:         68 2247 801.8   2073    3578


Percentage of the requests served within a certain time (ms)
  50%   2073
  66%   2900
  75%   3030
  80%   3111
  90%   3265
  95%   3352
  98%   3430
  99%   3456
 100%   3578 (longest request)


//memcache set

This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking localhost (be patient)




Server Software:        nginx/1.9.4
Server Hostname:        localhost
Server Port:            80


Document Path:          /test/test.php
Document Length:        0 bytes


Concurrency Level:      100
Time taken for tests:   30.619 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      147000 bytes
HTML transferred:       0 bytes
Requests per second:    32.66 [#/sec] (mean)
Time per request:       3061.896 [ms] (mean)
Time per request:       30.619 [ms] (mean, across all concurrent requests)
Transfer rate:          4.69 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   1.9      0       8
Processing:    58 2966 653.7   2989    4569
Waiting:       44 2966 653.7   2989    4569
Total:         59 2967 652.7   2989    4569


Percentage of the requests served within a certain time (ms)
  50%   2989
  66%   3128
  75%   3288
  80%   3368
  90%   3814
  95%   4125
  98%   4336
  99%   4432
 100%   4569 (longest request)



+session stored

 ini_set('session.gc_maxlifetime', 3600);
ini_set("session.save_handler","redis");
ini_set("session.save_path","tcp://127.0.0.1:6379");
 session_start();
$_SESSION['session'] = 'this is session content!';
//echo $_SESSION['session'];
//echo session_id().'<br/>';
// 
//$redis = new redis();
//$redis->connect('127.0.0.1', 6379);
////redis用session_id作为key并且是以string的形式存储
//echo $redis->get('PHPREDIS_SESSION:' . session_id());
   /*PHPREDIS_SESSION+session_id()*/
/*
 * This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking localhost (be patient)




Server Software:        nginx/1.9.4
Server Hostname:        localhost
Server Port:            80


Document Path:          /test/test.php
Document Length:        2 bytes


Concurrency Level:      50
Time taken for tests:   0.880 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      344000 bytes
HTML transferred:       2000 bytes
Requests per second:    1136.97 [#/sec] (mean)
Time per request:       43.977 [ms] (mean)
Time per request:       0.880 [ms] (mean, across all concurrent requests)
Transfer rate:          381.95 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   4.2      0      23
Processing:     2   42  10.4     44      60
Waiting:        0   42  10.5     44      60
Total:          5   43   8.4     44      60


Percentage of the requests served within a certain time (ms)
  50%     44
  66%     47
  75%     49
  80%     49
  90%     52
  95%     59
  98%     59
  99%     59
 100%     60 (longest request)


 */
ini_set("session.save_handler", "memcache"); 
ini_set("session.save_path", "tcp://127.0.0.1:11211"); 
session_start(); 
$_SESSION[$i] = time();
/*
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking localhost (be patient)




Server Software:        nginx/1.9.4
Server Hostname:        localhost
Server Port:            80


Document Path:          /test/test.php
Document Length:        2 bytes


Concurrency Level:      50
Time taken for tests:   11.352 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      344000 bytes
HTML transferred:       2000 bytes
Requests per second:    88.09 [#/sec] (mean)
Time per request:       567.596 [ms] (mean)
Time per request:       11.352 [ms] (mean, across all concurrent requests)
Transfer rate:          29.59 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       5
Processing:    19  559 104.2    559     991
Waiting:       15  559 104.2    559     991
Total:         19  559 103.9    559     991


Percentage of the requests served within a certain time (ms)
  50%    559
  66%    593
  75%    616
  80%    629
  90%    672
  95%    713
  98%    776
  99%    798
 100%    991 (longest request)
 * 
 */

文献计量VOSviewer分析知网文献基本操作及实用技巧 本教程旨在为读者提供一个关于VOS viewer的初级使用指南。VOS viewer是一个强大的科学研究可视化工具,主要用于构建和可视化科学地图。它能够处理大规模的科研数据,包括文献引用、共引、共词、共作者等信息。无论你是科研人员,还是数据分析师,甚至是研究生,都能在这个教程中找到使用VOS viewer的有效方法。我们将一步步教你如何使用这个软件,以及如何利用它进行科研数据的可视化。 阅读详情

相关推荐

FileZilla Server 1.2.0 TLS证书过期问题

FileZilla Server TLS证书过期后重新生成

Wigle的备忘录 7524

redis性能测试报告结果

redis性能测试1. 环境配置:2. 测试准备:2.1 每服务器一个Redis的结果:2.2 每服务器两个Redis的结果:3. 结论: 由于项目需要,要查询一个数量巨大的键值对,数据量大约6亿。先是在内存中用hashmap,虽然速度很快,但数据量不到1亿就直接死机了,而且无法持久,每次重新加载,也不合理。于是就想到了redis。 测试方法: 1. 环境配置: 机器用途 配置 数量 ...

weixin_45357522的博客 1239

达梦7实时主备集群

达梦7实时主备配置实时主备数据环境说明配置主库配置 dm.ini配置dmmal.ini配置dmarch.ini配置dmwatcher.ini配置dmwatcher.ini以mount方式启动主库设置OGUID修改数据库为primary模式配置备库 在服务器部署过程中,通常搭建有数据库主备集群,用于防备数据库服务器产生问题影响数据正常,在此,我们分享一下在虚拟机环境中模拟搭建实时主备的数据守护模式。 在搭建环境之前,需用户确认主备DM7的数据库已安装完成,且版本一致,同时还应注意各实例所在主机的操作系统位数、

g360382的博客 1022

Redis 测试报告

redis 测试

春の木々の風的博客 1072

CTransformers: 高效的Python语言模型绑定库

CTransformers是一个为C/C++实现的Transformer模型提供Python绑定的开源库。它基于GGML库构建,旨在为开发者提供一种高效且易用的方式来在Python中使用各种流行的语言模型。支持多种流行的语言模型,如GPT-2、LLaMA、Falcon等提供统一的简单API接口支持GPU加速(CUDA和Metal)与Hugging Face Transformers和LangChain集成支持流式输出和嵌入计算。

helloaiworld的博客 1267

千兆以太网 PCB 设计实战:4层板 100Ω 差分对布线,EMI 降低 6dB 实测

本文详细解析了千兆以太网 PCB 设计中的关键技术与实战经验,重点介绍了4层板上100Ω差分对的优化布线方法,通过实测数据展示了EMI降低6dB的有效方案。内容涵盖层叠设计、阻抗计算、布线技巧及EMI抑制措施,为硬件工程师提供了一套完整的高速电路设计解决方案。

weixin_29175469的博客 424

redis读写性能测试

     一、基础测试:       redis读写性能测试redis官网测试读写能到10万左右,非常吸引人,我在研发环境对redis进行测试,发现redis的速度的确很快,此测试是为日后应用优化提供研发参考。由于受到网络环境的限制,本机是100M的网卡,最高10M/s的传输速度,所以当测试到每秒读取45000条时,测试机和测试服务器上传或者下载速度已经达到10M/s,基本到了网络瓶颈,无法...

用技术点亮生命,用产品温暖人心,探讨coding真谛,感悟技术精神。 2753

【操作系统】 Operation System 第一章:概述

B站 陈渝老师 清华大学 https://www.bilibili.com/video/av6538245?from=search&seid=436175425155932048 相关资料(源自B站下方评论区) https://www.shiyanlou.com/courses/221 配套上机实验地址 https://b23.tv/av18273642/p1 这个适合跨考和基础薄弱的 h...

iwanderu的博客 4万+

Redis压力性能测试

一.Redis-benchmark测试 1.执行./redis-benchmark,结果如下,在自己不加参数的情况下,默认参数有-h 默认服务器主机名为127.0.0.1 , -p 默认端口号为6379 ,-c 并发连接数默认为50 ,-n 发出的请求总数默认值为100000 ,-k 1(保持连接) ,–dbnum 选择用于性能测试的数据库的编号(默认值为0)默认情况下是对redis中的所有添加查询方法进行测试,并返回结果。 2.在上述默认参数情况下,加入-q表示静默测试,只显示QPS的值,不显示过程信息

好奇的博客 2939

域格4G网优模块获取

1、获取当前小区信息 接口说明 该命令用于获取当前小区信息。 语法结构 命令类型 格式 返回结果 Execute AT+SCELLINFO +SCELLINFO: <cellMode>,<mcc>,<mnc>,<lac>,<cellId>,<afrcn>,<cpi>,<rxLevel>

自由的幻想 2463

基于STM32F1XX 、HAL库的BH1745NUC-E2环境光传感器驱动应用C语言程序设计

printf("BH1745制造商ID: 0x%02X\r\n", BH1745_ReadManufacturerID(&hbh1745));#define BH1745_ADDR_HIGH 0x39 // ADDR引脚接VDD。#define BH1745_ADDR_LOW 0x38 // ADDR引脚接地。= 0xE0) // BH1745制造商ID为0xE0。// 清除RGBC测量使能位。printf("BH1745初始化失败\r\n");

PP_Cottage的博客 278

Redis和Memcache性能测试对比

Redis和Memcache,测试服务器是一个个人PC:配置一般(2CPU\2G内存),操作系统安装的CentOS。 1、redis memcache都是空的时候 redis设置100000个值开始时间:1311742106 redis设置100000个值时间:1311742123 耗时:16.8817 memcache设置100000个值开始时间:1311742123 ...

weixin_30321449的博客 356

【WorkBuddy专栏32】从「分文件夹」到「组队打仗」——WorkBuddy v5.0项目模式深度拆解

【WorkBuddy专栏32】从「分文件夹」到「组队打仗」——WorkBuddy v5.0项目模式深度拆解

AI人人懂 296

memcache vs redis 性能测试

//redis get This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt; Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://w...

coder 485

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

redis 与 memcache 性能测试比较

试验场景一:要对同一个list实时添加元素,且放入缓存中。代码如下: @Test public void testMemCacheAndRedis() { this.testInsert(1000); } public void testInsert(int size) { MemCach...

weixin_30539835的博客 225

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

来一次 memcache,redis 性能测试大对比,分别测试大字节数和小字节数

测试环境 1.服务器,一台i7的pc 2.测试使用语言 python 测试代码用python很简单,有不足部分,欢迎大神指正 #coding=utf8 import multiprocessing from redis import Redis import config import time import sys class Monitor(multiproc

qiushi888的专栏 2336

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

CYQ.Data 对于分布式缓存Redis、MemCache高可用的改进及性能测试

背景: 随着.NET Core 在 Linux 下的热动,相信动不动就要分布式或集群的应用的需求,会慢慢火起来。 所以这段时间一直在研究和思考分布式集群的问题,同时也在思考把几个框架的思维相对提升到这个Level。 最近大力重构了框架两个点:一个是分布式缓存,一个是数据库主从备。 今天,先分享分布式缓存的改进的两个点: 1、高可用:能动态增加或减少Redis、MemCache的实例,而不...

weixin_30746117的博客 323

缓存:ehcache、memcache、redis三大缓存比较。

ehcache、memcache、redis三大缓存比较。

孤芳不自赏 734

初识redis

Redis是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API 作为Key-value型数据库,Redis也提供了键(Key)和键值(Value)的映射关系。但是,除了常规的数值或字符串,Redis的键值还可以是以下形式之一: Lists (列表) Sets (集合) Sorted sets (有序集合) Hash

wang_quan_li的专栏 634

Redis简介以及linux下常用命令

Remote Dictionary Server (redis) 是一个由salvatore Sanfilippo开发的高性能的key-value数据库(存储系统)。Redis是一个开源的使用ANSI C语言编写、遵守BSD协议、支持网络、可基于内存也可持久化的日志型,key-value数据库,并提供多种语言的api。它通常被称为数据结构服务器,因为值可以是字符串(String)、哈希(Map)、列表(List)、集合(Set)、有序集合()等类型。

qq_39253096的博客 2349

Memcache

Memcache memcache是一套分布式的高速缓存系统,由LiveJournal的BradFitzpatrick开发,但目前被许多网站使用以提升网站的访问速度,尤其对于一些大型的、需要频繁访问数据库的网站访问速度提升效果十分显著[1]  。这是一套开放源代码软件,以BSDlicense授权发布。 Redis 和memcache的区别 1 什么是redis redis是一个key

Get old 330

常用缓存性能对比,memcache,redis,tair

第1章     限制条件 前一周所做的分布缓存技术预言中有包括ehcache、memcache、redis、tair,还包括了基于MongoDB的分布式技术。测试中,考虑到各自功能的差异化特点,其中选择了memcache、redis、tair功能特性相近的缓存服务器进行性能对比,所以ehcache、MongoDB将不做为本次测试的规范,其原因如下: 1)  Ehcache是组件级别的缓存,要搭...

Ray 2376

MongoDB、Memcache、TC/TT、Redis等NOSQL博文汇总

MongoDB 系列:MongoDB介绍MongoDB 2.4.10 安装和配置MongoDB 实现currentOp定时捕获MongoDB 使用副本集备份添加新的辅助副本成员MongoDB日志切换(Rotate Log Files)方法及注意事项MongoDB日志切换(Rotate Log Files)指南MongoDB日志切换(Rotate Log Files)实战replSet error ...

weixin_33885676的博客 111
上一篇: linux start+log+bak
下一篇: redis+mc review
telnet166
博客等级 码龄14年 14粉丝 35原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值