redis-benchmark -h192.168.41.14 -p 7002 -c 100 -n 100000 100个并发连接,100000个请求,检测host为localhost 端口为7002的redis服务器性能 3、遇到的问题 1、WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2、WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
解决: 你使用的是透明大页,可能导致redis延迟和内存使用问题。执行echo never > /sys/kernel/mm/transparent_hugepage/enabled修复该问题。 永久解决方法: 将其写入/etc/rc.local文件中 echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled