Hello!
On Sun, Feb 28, 2016 at 08:52:12AM -0500, meteor8488 wrote:
> I just upgrade Nginx from 1.8 o 1.9 on my FreeBSD box.
> After I enabled reuseport on my server, it seems now there is one worker
> always takes up 100% CPU and all the rest workers are use less than 1% CPU.
> In the day time it's OK because my website doesn't have lots of users. But
> at night it's very slow.
While SO_REUSEPORT socket option is available on FreeBSD, its
behaviour is different from one nginx relies on: instead of
balancing between all sockets as Linux and DragonFly do, it
preserves historic behaviour for TCP and delivers all connections
to one socket instead.
That is, there is no surprise that you see all work done by a
single worker in your setup when you use "listen ... reuseport" on
FreeBSD.
Note that documentation explicitly says it's only expected to work
on Linux and DragonFly:
: This currently works only on Linux 3.9+ and DragonFly BSD.
See http//nginx.org/r/listen for details.
--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx