I would like to confirm this in our case. I was testing Redis 2.2.12
with tcmalloc on 64bit Ubuntu 10.04. Specifically, this is an m1.large
EC2 instance based on the ami-63be790a AMI. The contents of redis.conf
are
daemonize no
port 6379
timeout 300
loglevel notice
logfile /dev/null
syslog-enabled yes
syslog-ident redis
syslog-facility local0
save 900 1
save 300 10
save 60 10000
dbfilename dump.rdb
dir ./
The maximum number of open file descriptors have been increased to
100000, as seen in the output of ulimit -a:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 100000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
As for TCP tweaks in the kernel, this is the content of /etc/
sysctl.conf
vm.overcommit_memory = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.eth0.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.ip_forward = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.lo.accept_redirects = 0
net.ipv4.conf.eth0.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.lo.send_redirects = 0
net.ipv4.conf.eth0.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
net.ipv4.conf.eth0.accept_source_route = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.proxy_arp = 0
net.ipv4.tcp_fin_timeout = 30
net.core.somaxconn = 3000
net.core.netdev_max_backlog = 3000
I connected to the redis server using the redis-py python package.
Each client is doing operations on the redis server. Everything is
fine up to 1000 connections. When I tested 1200 connections, the CPU
usage of the redis server stayed at 100%, and "redis-cli info" hanged
until I killed the test clients.
Weirdly, there is no problem if I try to test idle clients using
"redis-benchmark -c 1200 -I". There is also no output in the redis log
file to indicate an error has occurred.
Thank you for your time and for any help you could give.
On Aug 22, 8:30 pm, Pieter Noordhuis <
pcnoordh...@gmail.com> wrote:
> Exceeds which range? The one that is commented in the config file?
> Redis has no limit on the maximum number ofclientsby default, so