PHP-FPM on highload tips
来源:互联网 发布:俄罗斯旅游知乎 编辑:程序博客网 时间:2024/06/06 03:15
When you running a highload website with PHP-FPM via FastCGI, the
following tips may be useful to you : )
1. Compile PHP's modules as less as possible, the simple the best
(fast);
2. Increas PHP FastCGI child number to 100 and even more. Sometime,
200 is OK! ( On 4GB memory server);
3. Using SOCKET PHP FastCGI, and put into /dev/shm on Linux;
4. Increase Linux "max open files", using the following command (must
be root):
# echo 'ulimit -HSn 65536' >> /etc/profile
# echo 'ulimit -HSn 65536 >> /etc/rc.local
# source /etc/profile
5. Increase PHP-FPM open file description rlimit:
# vi /path/to/php-fpm.conf
Find "<value name="rlimit_files">1024</value>"
Change 1024 to 4096 or higher number.
Restart PHP-FPM.
6. Using PHP code accelerator, e.g eAccelerator, XCache. And set
"cache_dir" to /dev/shm on Linux.
following tips may be useful to you : )
1. Compile PHP's modules as less as possible, the simple the best
(fast);
2. Increas PHP FastCGI child number to 100 and even more. Sometime,
200 is OK! ( On 4GB memory server);
3. Using SOCKET PHP FastCGI, and put into /dev/shm on Linux;
4. Increase Linux "max open files", using the following command (must
be root):
# echo 'ulimit -HSn 65536' >> /etc/profile
# echo 'ulimit -HSn 65536 >> /etc/rc.local
# source /etc/profile
5. Increase PHP-FPM open file description rlimit:
# vi /path/to/php-fpm.conf
Find "<value name="rlimit_files">1024</
Change 1024 to 4096 or higher number.
Restart PHP-FPM.
6. Using PHP code accelerator, e.g eAccelerator, XCache. And set
"cache_dir" to /dev/shm on Linux.
0 0
- PHP-FPM on highload tips
- Tips On PHP & MySQL
- Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks
- Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks
- Nginx PHP-FPM and MySQL on CentOS 5
- Setup NGINX, PHP-FPM, and MariaDB on Debian 8
- php-fpm
- php-fpm
- PHP-FPM
- php-fpm
- php-fpm
- Php-fpm
- php-fpm
- PHP-FPM
- php-fpm
- php-fpm
- php-cgi php-fpm
- PHP FPM php-fpm.conf设置详解
- C语言中的循环与递归
- 字符流和字节流的区别,使用场景,相关类
- 关于MySql安装完成,默认链接的初始化密码修改[mac版MySQL初始密码]
- POJ1985Cow Marathon
- 数据结构实验之栈七:出栈序列判定
- PHP-FPM on highload tips
- 二维数组中的查找
- Oracle 查询技巧与优化(二) 多表查询
- Android系统默认值的设置
- Microsoft caffe(caffe-windows) cifar实例编译之model的使用
- 我们的地盘,我们做主
- A + B for you again
- Oracle SQLloader
- iOS软件开发 设置UITextView输入内容位置从左上角开始