Swoole Threads and processes

Source: Internet
Author: User
Tags php server

pstree-a | grep php

|       | '-php server.php Master process
|           | |-php server.php Management thread can restart a worker thread after the worker thread dies
|           |   | '-php server.php
|           | '-{php}

Ps-aux

Root3797  0.0  1.5  42776 16240pts/0sl+ +: -   0:xx/usr/local/php-5.6.8/bin/PHP server.phproot3798  0.0  0.2  32024  2116pts/0S+ +: -   0:xx/usr/local/php-5.6.8/bin/PHP server.phproot3800  0.0  0.2  32368  2360pts/0S+ +: -   0:xx/usr/local/php-5.6.8/bin/php server.php
[Email protected] ~]# strace-p3797 (see what the current process is doing)Process3797Attached-Interrupt to Quitpoll ([{FD=5, Events=pollin}],1, +)  =0(Timeout) Time (NULL)=1431008802poll ([{FD=5, Events=pollin}],1, +)  =0(Timeout) Time (NULL)=1431008803poll ([{FD=5, Events=pollin}],1, +)  =0(Timeout) Time (NULL)=1431008804poll ([{FD=5, Events=pollin}],1, +)  =0(Timeout) Time (NULL)=1431008805poll ([{FD=5, Events=pollin}],1, +)  =0(Timeout) Time (NULL)=1431008806
37983798 attached- interrupt to QUITWAIT4 (-1

Threads are memory and resources that can share processes

Master Master Process

Manager Management Threads

Worker

Swoole Threads and processes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.