redis-benchmark -h192.168.41.14 -p 7002 -c 100 -n 100000 100個并發(fā)連接,100000個請求,檢測host為localhost 端口為7002的redis服務(wù)器性能 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.
解決: 你使用的是透明大頁,可能導(dǎo)致redis延遲和內(nèi)存使用問題。執(zhí)行echo never > /sys/kernel/mm/transparent_hugepage/enabled修復(fù)該問題。 永久解決方法: 將其寫入/etc/rc.local文件中 echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled