Welcome! Log In Create A New Profile

Advanced

Re: nginx workers in "D" status in top

Ryan Malayter
July 27, 2010 11:28PM
On Tue, Jul 27, 2010 at 1:45 PM, Igor Sysoev <igor@sysoev.ru> wrote:
> nginx supports file AIO only in 0.8.11+, but the file AIO is functional
> on FreeBSD only. On Linux AIO is supported by nginx only on kerenl
> 2.6.22+ (although, CentOS 5.5 has backported the required AIO features).
> Anyway, on Linux AIO works only if file offset and size are aligned
> to a disk block size (usually 512 bytes) and this data can not be cached
> in OS VM cache (Linux AIO requires DIRECTIO that bypass OS VM cache).
> I believe a cause of so strange AIO implementaion is that AIO in Linux
> was developed mainly for databases by Oracle and IBM.

Thank you for the detailed explanation. I suppose I am somewhat
shocked by the state of AIO on Linux, but then again most server
applications are likely using blocking IO with threads, as the
programming model is more straightforward.

I often see 3 or more nginx workers in "uninterruptible sleep" state
at the same time, even if only for a few ms. I presume this means any
other connections being handled by those workers are also blocked,
even if they are proxy-only connections that don't hit the disk. We
noticed extended response times from our application at peak periods,
even though the observed CPU load on the back-end would actually dip
and then spike. So I think that nginx is effectively "queuing"
requests that are blocked behind requests that have large responses
that get spooled to disk.

Do you foresee an issue with running 10 or more workers per CPU core?
Is there any upper bound on the number nginx of workers after which
inter-process communication overhead starts to become problematic?

--
RPM

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx workers in "D" status in top

Ryan Malayter July 27, 2010 01:04PM

Re: nginx workers in "D" status in top

Joaquin Cuenca Abela July 27, 2010 01:28PM

Re: nginx workers in "D" status in top

Ryan Malayter July 27, 2010 02:32PM

Re: nginx workers in "D" status in top

Igor Sysoev July 27, 2010 02:54PM

Re: nginx workers in "D" status in top

Ryan Malayter July 27, 2010 11:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 266
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready