php-fpm 进程在云服务器cpu分配不均匀
2017-07-03 12:11
447 查看
8核的云服务器,开了200个php-fpm进程,用top命令查看 大部分进程都在cpu 0 上跑着,导致其他cpu 负载很低,cpu分配不均匀;
使用shell 解决问题:
列出所有php-fpm 进程, 用 taskset 重新分配cpu
使用shell 解决问题:
列出所有php-fpm 进程, 用 taskset 重新分配cpu
1 #!/bin/bash 2 3 CPUs=$(grep -c processor /proc/cpuinfo) 4 PIDs=$(ps aux | grep "php-fpm[:] pool" | awk '{print $2}') 5 6 let i=0 7 for PID in $PIDs; do 8 CPU=$(echo "$i % $CPUs" | bc) 9 let i++ 10 11 taskset -pc $CPU $PID 12 done
相关文章推荐
- PHP-FPM进程CPU 100%的原因及解决方案
- 服务器php-cgi.exe进程过多,导致CPU占用100%的解决方法
- 服务器大量php-cgi.exe进程,导致CPU占用100%的解决
- PHP-FPM进程CPU 100%的原因及解决方案
- php-fpm---为每个开发人员分配进程
- 服务器php-cgi.exe进程过多,导致CPU占用100%的解决方法
- PHP-FPM进程CPU 飙高的原因及解决方案
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- 服务器的w3wp.exe进程占用cpu和内存过多的问题
- Python 监控 DB 服务器信息(cpu, 磁盘,进程,alert log) 脚本
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- PHP-CGI进程CPU 100% 与 file_get_contents 函数的关系分析
- 解决一个 MySQL 服务器进程 CPU 占用 100%的技术笔记
- [ZT] 使用PHP-FPM (PHP FastCGI Process Manager)来对php-cgi进程进行管理
- php-cgi进程占用cpu资源过多负载高的原因分析及解决步骤
- php-cgi进程占用cpu资源过多负载高的原因分析及解决步骤
- 服务器的w3wp.exe进程占用cpu和内存过多的问题
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- Python 监控 DB 服务器信息(cpu, 磁盘,进程,alert log) 脚本