zoukankan      html  css  js  c++  java
  • redis相关

    资源:

    http://redis.io/

    http://www.redis.cn/

    http://www.redis.net.cn/ (挂了吗)

    =====================

    安装

    http://redis.io/download 下载最新版本

    $ wget http://download.redis.io/releases/redis-3.2.5.tar.gz
    
    $ tar xzf redis-3.2.5.tar.gz
    
    $ cd redis-3.2.5
    
    $ make
    

    可能出现的问题:

    make

    错误一: cc: Command not found

    原因 :没有安装gcc

    解决:yum install gcc

    然后再次make

    错误2:error: jemalloc/jemalloc.h: No such file or directory

    原因:一些编译依赖或原来编译遗留出现的问题

    解决:make distclean 清理一下,

    然后再make。

    make 成功后 提示Hint: It's a good idea to run 'make test'

    输入:make test

    错误3:make[1]: Entering directory `/root/software/redis-3.0.0/src'

    You need tcl 8.5 or newer in order to run the Redis test

    原因:没有安装tcl

    解决方案:yum install -y tcl

    然后

    make test

    然后make

    安装成功后src目录会多出

    redis-server,redis-cli等可执行文件

    ===========================

    运行

    cd src

    ./redis-server 服务器端

    ./redis-cli 客户端

    =============================

    redis-benchmark结果

    [ucloud-dev 复制错了貌似]

    Common KVM CPU (2.6 GHz) * 4
    8G Memory

    PING_INLINE: 73855.24 requests per second
    PING_BULK: 78492.93 requests per second

    SET: 87873.46 requests per second
    GET: 86956.52 requests per second
    INCR: 88339.23 requests per second
    LPUSH: 84889.65 requests per second
    RPUSH: 89206.06 requests per second
    LPOP: 91575.09 requests per second
    RPOP: 90252.70 requests per second
    SADD: 89445.44 requests per second
    SPOP: 82850.04 requests per second
    LPUSH (needed to benchmark LRANGE): 74962.52 requests per second
    LRANGE_100 (first 100 elements): 38255.55 requests per second
    LRANGE_300 (first 300 elements): 16909.03 requests per second
    LRANGE_500 (first 450 elements): 11627.91 requests per second
    LRANGE_600 (first 600 elements): 9772.31 requests per second
    MSET (10 keys): 70771.41 requests per second

    [local ubuntu 14]

    i5 4440 (3.10 GHz) * 2
    2G Memory

    PING_INLINE: 73855.24 requests per second
    PING_BULK: 78492.93 requests per second
    SET: 87873.46 requests per second
    GET: 86956.52 requests per second
    INCR: 88339.23 requests per second
    LPUSH: 84889.65 requests per second
    RPUSH: 89206.06 requests per second
    LPOP: 91575.09 requests per second
    RPOP: 90252.70 requests per second
    SADD: 89445.44 requests per second
    SPOP: 82850.04 requests per second
    LPUSH (needed to benchmark LRANGE): 74962.52 requests per second
    LRANGE_100 (first 100 elements): 38255.55 requests per second
    LRANGE_300 (first 300 elements): 16909.03 requests per second
    LRANGE_500 (first 450 elements): 11627.91 requests per second
    LRANGE_600 (first 600 elements): 9772.31 requests per second
    MSET (10 keys): 70771.41 requests per second

    [ideapad 310]

    Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz * 2
    4G Memory

    PING_INLINE: 131406.05 requests per second
    PING_BULK: 146412.88 requests per second
    SET: 147058.83 requests per second
    GET: 145137.88 requests per second
    INCR: 139860.14 requests per second
    LPUSH: 152207.00 requests per second
    RPUSH: 154798.75 requests per second
    LPOP: 136612.02 requests per second
    RPOP: 147492.62 requests per second
    SADD: 136425.66 requests per second
    SPOP: 151975.69 requests per second
    LPUSH (needed to benchmark LRANGE): 145137.88 requests per second
    LRANGE_100 (first 100 elements): 62656.64 requests per second
    LRANGE_300 (first 300 elements): 20554.99 requests per second
    LRANGE_500 (first 450 elements): 14912.02 requests per second
    LRANGE_600 (first 600 elements): 11514.10 requests per second
    MSET (10 keys): 116144.02 requests per second

    ~单cpu下性能约80%

  • 相关阅读:
    表单小知识
    HTML列表,表格与媒体元素
    P1008 三连击
    打鱼晒网问题
    最小编辑距离算法
    算法设计与分析--01背包问题(动态规划法解决)
    文件读写函数
    C语言中数据输入输出到文件操作freopen()函数(1)
    输入输出框架(未完待续)
    阶乘1到阶乘n的和
  • 原文地址:https://www.cnblogs.com/zergling9999/p/redis.html
Copyright © 2011-2022 走看看