Welcome! Log In Create A New Profile

Advanced

Re: All workers in 'D' state using sendfile

Maxim Dounin
June 10, 2013 07:58AM
Hello!

On Mon, Jun 10, 2013 at 03:38:45PM +0430, Host DL wrote:

> Dear Maxim,
>
> Thanks for your response,
> I don't think it will help much since all of my files are larger enough
> than 2MB

The "D" state of nginx workers has only one explanation: blocking
operations on disks. When serving static files with nginx on
Linux, this basically means one of the following:

1. opening / stat()'ing files
2. blocking aio reads due to no directio on unaligned reads
3. blocking aio reads due to no directio on small files

Within nginx, you may reduce possibility of (3) using directio
directive with a smaller value. Both (1) and (2) are more or less
unavoidable, but aren't likely to happen, at least with proper OS
tuning.

If in doubt, try tracing where worker processes are blocked. As a
very first step, ps(1) output should be examined for a wait
channel column (wchan).

> Regarding AIO problem in linux, do you think using AIO + sendfile together
> on FreeBSD will be better in performance in my case?

Yes.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

All workers in 'D' state using sendfile

Drew Wareham May 12, 2012 06:30AM

Re: All workers in 'D' state using sendfile

Maxim Dounin May 12, 2012 07:20AM

Re: All workers in 'D' state using sendfile

Drew Wareham May 25, 2012 01:00AM

Re: All workers in 'D' state using sendfile

Drew Wareham May 28, 2012 03:10AM

Re: All workers in 'D' state using sendfile

姚伟斌 May 28, 2012 06:08AM

Re: All workers in 'D' state using sendfile

fanboy May 28, 2012 10:32AM

Re: All workers in 'D' state using sendfile

Drew Wareham May 29, 2012 12:52AM

Re: All workers in 'D' state using sendfile

Host DL June 08, 2013 09:48PM

Re: All workers in 'D' state using sendfile

Maxim Dounin June 09, 2013 08:14AM

Re: All workers in 'D' state using sendfile

Host DL June 09, 2013 10:56AM

Re: All workers in 'D' state using sendfile

Maxim Dounin June 10, 2013 06:56AM

Re: All workers in 'D' state using sendfile

Host DL June 10, 2013 07:10AM

Re: All workers in 'D' state using sendfile

Valentin V. Bartenev June 10, 2013 07:32AM

Re: All workers in 'D' state using sendfile

Maxim Dounin June 10, 2013 07:58AM

Re: All workers in 'D' state using sendfile

Host DL June 18, 2013 10:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 143
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