Home  >  Q&A  >  body text

How to determine whether nginx uses epoll

nginx documentation says that the appropriate method can be automatically selected:

There is normally no need to specify it explicitly, because nginx will by default use the most efficient method.

Use epoll is not specified in the configuration file. How to determine whether nginx uses epoll?

过去多啦不再A梦过去多啦不再A梦2713 days ago836

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-05-16 17:21:03

    Download the source code and log
    Compile your own version orz

    In fact, just compile a version that can be debugged by gdb, and then use gdb to start it, and you can track and see where nginx is blocked when no events arrive (whether it is blocked in the epoll event processing function

    For specific tools and methods, please refer to "In-depth Analysis of Nginx" written by Chinese people

    reply
    0
  • 高洛峰

    高洛峰2017-05-16 17:21:03

    Linux versions above 2.6 should all support epoll.

    You can use strace to check whether nginx calls the epoll series syscall

    reply
    0
  • 怪我咯

    怪我咯2017-05-16 17:21:03

    The default is epoll, in the Linux version

    reply
    0
  • Cancelreply