Gateway进程使用的非阻塞式IO通讯,属于CPU密集型业务,Gateway进程数设置成与CPU核数相性能最好。即start_gateway.php中$gateway->count= cpu核数;
start_gateway.php
$gateway->count= cpu
BusinessWorker进程中根据业务是否有阻塞式IO设置进程数为CPU核数的1倍-3倍即可。 即start_businessworker.php中$worker->count = cpu核数的1-3倍;
start_businessworker.php
$worker->count = cpu
参见:Workerman手册-进程数设置