On Thu, Aug 7, 2008 at 11:03 AM, Chavelle V. [email protected]
wrote:
definitly not an expert but when I read your post, it’s the idea that I
have had.
From what I read ncache works by caching items from disk into memory.
The problem I have is that the media is changing every 250ms.
Anyway an update, I have tweaked the kernel IPV4 parameters and even
though I have at times 23,000 TIME_WAITs, they are now being recycled.
The server is sustaining about 50Mbits of traffic going through
memcached->nginx. My connection count hovers around 220 when using
nginx_stats module. Is this the norm? I am wondering if I have an
artificial bottleneck somewhere?
Looking more into the unix domain sockets I am not sure if this would
be the most pertinent solution to the problem. I noticed there was
some talk on persistent connections to upstream servers – is this
planned for memcached (I am using this model on the app server side to
feed memcached and it is working great)?
what is the operating system?
what do you mean tweaked(details pls.)?
I am seeing the same behavior on Centos 4.5 with nginx 0.6.32 and
memcached 1.2.6.
After running load tests using apache bench, I see a high number
of TIME_WAIT connections from netstat. The load tests hits nginx
which fetches static response from memcached.
$ uname -a
Linux geocode1.admin.zvents.com 2.6.9-55.ELsmp #1 SMP Wed May 2 14:04:42
EDT
2007 x86_64 x86_64 x86_64 GNU/Linux
what is the operating system?
what do you mean tweaked(details pls.)?
net.ipv4.ip_local_port_range = 1024 65000
Indeed. Also:
net.ipv4.ip_local_port_range = 10000 65535 (since I have memcached and
other services on port 9000-10000)
net.ipv4.tcp_tw_recycle = 1 (fast recycle of T_W’s)
net.ipv4.tcp_tw_reuse = 1 (reuse T_W’s when ‘safe’ to do so)
It would seem that a persistent backend connection or domain socket
support for memcached would resolve this issue.
In my tests I have also noticed that connecting and disconnecting from
memcached has a performance impact on serving content. When I use this
mechanism on my application backend my video serving FPS maxes out at
2-3 updates per second. With a persistent connection I can go upwards
of 10fps. It would seem likely that the non-persistent
nginx<->memcached connectivity would also cause a bottleneck under
high connection rates.
Cheers
Kon
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.