Welcome! Log In Create A New Profile

Advanced

Re: Nginx Slowdown on Solaris

Maxim Dounin
April 28, 2011 11:00AM
Hello!

On Thu, Apr 28, 2011 at 08:12:59AM -0400, darckos wrote:

> Hello,
>
> I use nginx 0.8.53 on Solaris 10 and I feel like I reach a kind of limit
> but I'm not abble to find it.
> I use Nginx to serve static image and sometimes to get one image I need
> to wait 10 or more seconds.

Most likely nginx actually disk bound and worker processes are
blocked on disk, and that's what causes such delays.

You may want to examine iostat output to see if it really happens.

> nginx is launched with a ulimit -n 65536, and here is my config:
>
> worker_processes 40;
> error_log logs/error.log;
> events {
> worker_connections 8192;
> devpoll_events 1;
> }
> http {
> include mime.types;
> default_type application/octet-stream;
>
> sendfile on;

[...]

> Do you have any idea to solve this problem ?

Try the following (in no particular order, you may want actually
to start with (3)):

1. Tune worker_processes to add more (or less) concurency to make
sure disks are reasonably loaded but not overloaded (i.e. disk r/w
times are small enough).

2. Try switching accept_mutex off to get better request
distribution between worker processes.

events {
accept_mutex off;
...
}

3. Switch off sendfile and tune output_buffers to use 1-2 big
enough buffers to make sure requests to disks will be big (and
disks aren't trashed with large number of small requests).
Something like

output_buffers 2 256k;

will do the trick (using bigger buffers may help better if you
have enough memory and your images are big enough).

Ideally aio should be used in such situation, but it's not
available with nginx under Solaris.

Maxim Dounin

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

Nginx Slowdown on Solaris

darckos April 28, 2011 08:12AM

Re: Nginx Slowdown on Solaris

Sergey A. Osokin April 28, 2011 08:20AM

Re: Nginx Slowdown on Solaris

darckos April 28, 2011 08:48AM

Re: Nginx Slowdown on Solaris

darckos April 28, 2011 09:38AM

Re: Nginx Slowdown on Solaris

Sergey A. Osokin April 28, 2011 09:28AM

Re: Nginx Slowdown on Solaris

Sergey A. Osokin April 28, 2011 10:08AM

Re: Nginx Slowdown on Solaris

Maxim Dounin April 28, 2011 11:00AM

Re: Nginx Slowdown on Solaris

darckos April 28, 2011 12:52PM

Re: Nginx Slowdown on Solaris

jjjx128 April 28, 2011 04:50PM

Re: Nginx Slowdown on Solaris

darckos April 29, 2011 09:28AM

Re: Nginx Slowdown on Solaris

jjjx128 April 29, 2011 01:11PM

Re: Nginx Slowdown on Solaris

darckos May 03, 2011 10:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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