# Does this look okay?

**URL:** <https://www.ruby-forum.com/t/does-this-look-okay/149744>\
**Category:** NGINX\
**Created:** [September 29, 2008, 9:14am UTC](https://www.ruby-forum.com/t/does-this-look-okay/149744 "2008-09-29T09:14:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [September 29, 2008, 9:14am UTC](https://www.ruby-forum.com/t/does-this-look-okay/149744/1 "2008-09-29T09:14:37Z")

</div>

my nginx stub status page says:

Active connections: 284  
server accepts handled requests  
28762321 28762321 183603127  
Reading: 1 Writing: 6 Waiting: 277

is that many in a “waiting” state okay? or is that something I should  
be worried about?

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [September 29, 2008, 9:24am UTC](https://www.ruby-forum.com/t/does-this-look-okay/149744/2 "2008-09-29T09:24:36Z")

</div>

On Sun, Sep 28, 2008 at 11:05:57PM -0700, mike wrote:

> my nginx stub status page says:
> 
> Active connections: 284  
> server accepts handled requests  
> 28762321 28762321 183603127  
> Reading: 1 Writing: 6 Waiting: 277
> 
> is that many in a “waiting” state okay? or is that something I should  
> be worried about?

Yes, this is OK. The waiting connections are keep-alive.  
Here is status of one of my sites:

Active connections: 45579  
server accepts handled requests  
268846178 268846178 638258372  
Reading: 620 Writing: 576 Waiting: 44383

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [September 29, 2008, 6:02pm UTC](https://www.ruby-forum.com/t/does-this-look-okay/149744/3 "2008-09-29T18:02:16Z")

</div>

What’s your HW for 50K active connection ?  
Would you please paste your system configure or optimization?  
There is no such system tuning sample of nginx for heavy traffic  
server.

2008/9/29 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [September 29, 2008, 9:13pm UTC](https://www.ruby-forum.com/t/does-this-look-okay/149744/4 "2008-09-29T21:13:44Z")

</div>

On Mon, Sep 29, 2008 at 11:48:37PM +0800, Delta Y. wrote:

> What’s your HW for 50K active connection ?

These are unactive keep-alive connections.  
There are 5,000 req/s, mostly small static files, all are cached by VM.

> Would you please paste your system configure or optimization?  
> There is no such system tuning sample of nginx for heavy traffic server.

FreeBSD 7.1/amd64, dual-core CPU, 4G.

/boot/loader.conf:

vm.kmem\_size=1844M

# decrease buff\_map and pipe\_map to increase KVM

# 64M KVA

kern.maxbcache=64M

# 4M KVA

kern.ipc.maxpipekva=4M

/etc/sysctl.conf:

# 4G, 2G KVA, 1844M KVM

# 

# 797M KVA/KVM

kern.ipc.nmbjumbop=192000

# 504M KVA/KVM

kern.ipc.nmbclusters=229376

# 334M KVA/KVM

kern.ipc.maxsockets=204800

# 8M KVA/KVM

net.inet.tcp.maxtcptw=163840

# 24M KVA/KVM

kern.maxfiles=204800

kern.ipc.somaxconn=4096

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [September 30, 2008, 7:07pm UTC](https://www.ruby-forum.com/t/does-this-look-okay/149744/5 "2008-09-30T19:07:03Z")

</div>

On Tue, Sep 30, 2008 at 11:48:20AM +0800, Delta Y. wrote:

> Great thank you!  
> I have put it on the nginx english wiki, the example page .  
> So others may take it as a reference.

However, increasing vm.kmem\_size blindly will lead to unbootable  
machine.  
1844M is probably upper limit for FreeBSD/amd64, when other kernel maps  
are decreased. 1400M is probably safe enough (by default kvm is 400M and  
this is too little).

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [September 30, 2008, 6:00am UTC](https://www.ruby-forum.com/t/does-this-look-okay/149744/6 "2008-09-30T06:00:22Z")

</div>

Great thank you!  
I have put it on the nginx english wiki, the example page .  
So others may take it as a reference.  
We still need more examples on other OS and HW.  
Anyone who want to report your story with NGINX can reply this thread  
in the form of

OS&HW:  
what operation system nginx runs on?  
what hardware you use ? CPU, memory, NIC.  
Purpose:  
nginx works as a web server,reverse proxy or both.  
Load description:  
how many connections?  
how many request per second?  
what CPU&MEM resources nginx use?  
System config:  
your system config or how you tune it?  
Nginx config:  
your nginx config? please remember to remove the sensitive data.

2008/9/30 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
