nosql - 如何调优 WEBDIS性能(REDIS的HTTP代理)
高洛峰
高洛峰 2017-04-21 10:56:26
0
1
822

硬件环境:DELL 2950 8 CORE 8G RAM

运行REDIS-benchmark

====== PING_INLINE ====== 33222.59 requests per second ====== PING_BULK ====== 33444.82 requests per second ====== SET ====== 39682.54 requests per second ====== GET ====== 34965.04 requests per second ====== INCR ====== 38610.04 requests per second ====== LPUSH ====== 36764.70 requests per second ====== LPOP ====== 34843.21 requests per second ====== SADD ====== 37878.79 requests per second ====== SPOP ====== 33783.79 requests per second ====== LPUSH (needed to benchmark LRANGE) ====== 34129.69 requests per second ====== MSET (10 keys) ====== 23584.91 requests per second

用webdis代理封装REDIS后,通过http请求来操作REDIS,
测试工具webbench
setsid webbench -c 100 -t 60 http://111.1.3.68:7379/INCR/newcount
setsid webbench -c 200 -t 60 http://111.1.3.68:7379/INCR/newcount
最后读取newcount的值来判断操作的次数
提高 WEBBENCH 并发客户端 的数量,对最后的结果没有任何影响。用多台终端攻击同一台机器发现对结果也没有影响。

每秒的操作数量在17000次左右。LPUSH LPOP 等操作的数量都和这个一样。

WEBDIS的配置文件

{ "redis_host": "127.0.0.1", "redis_port": 6379, "redis_auth": null, "http_host": "0.0.0.0", "http_port": 7379, "threads": 8, "daemonize": false, "websockets": false, "database": 0, "acl": [ { "disabled": ["DEBUG" , "FLUSHDB", "FLUSHALL"] }, { "http_basic_auth": "user:password", "enabled": ["DEBUG"] } ], "verbosity": 3, "logfile": "webdis.log" }

想问下大家,怎么样提高WEBDIS的每秒并发性能。怎么样让WEBDIS的性能更加接近RERDIS-BENCHMARK测试的结果。

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all (1)
迷茫

We have stopped using webdis and it is not recommended for you to use it in a production environment

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!