Welcome! Log In Create A New Profile

Advanced

Re: server performance issue

SplitIce
October 26, 2010 04:16AM
well 128 children is too much, work out the average response time of your
script then use this formulae.

requests per second * average response time = number of workers or max
children

Generally a figure no higher than 30 is needed unless your script needs
improvement.

On Tue, Oct 26, 2010 at 6:59 PM, Xin Liu <liuxin84@gmail.com> wrote:

> I tried to use static mode, and set pm.max_children = 128.
> Then php-fpm will take up 100% cpu.
> My question is that, for a server with I3 and 4G memory, what's the right
> parameter for nginx.conf and php-fpm.conf.
>
>
>
> On Tue, Oct 26, 2010 at 2:45 PM, SplitIce <mat999@gmail.com> wrote:
>
>> Im persuming you have an opcode cache?
>>
>> Also try using php-fpm in static mode, dynamic mode resulted in 502/504's
>> and high CPU usage for me.
>>
>> On Tue, Oct 26, 2010 at 5:42 PM, Xin Liu <liuxin84@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> For yesterday, my server is getting slower and slower...
>>> Sometime php-fpm is taking up 100% cpu, and there are about 1G free
>>> memory.
>>> Everytime I restart nginx and php-fpm, webserver will be OK. But after
>>> about 15minutes, it'll be very slow.....
>>>
>>>
>>> My server is running debian, and web server is
>>> Nginx+php-fpm+memcached+mysql.
>>> Hardware environment is I3 and 4G memory. It's that it's not hardware
>>> problem.
>>>
>>> And below is my configurations, anyone can give me a suggestion about
>>> this issue? How can I optimize server performance?
>>>
>>> *Nginx.conf*
>>>
>>> user www-data;
>>> worker_processes 4;
>>> worker_cpu_affinity 0001 0010 0100 1000;
>>> error_log /var/log/nginx/error.log;
>>> pid /var/run/nginx.pid;
>>> events {
>>> use epoll;
>>> worker_connections 10240;
>>> multi_accept on;
>>> }
>>> http {
>>> include /etc/nginx/mime.types;
>>> default_type application/octet-stream;
>>> access_log /var/log/nginx/access.log;
>>> sendfile on;
>>> tcp_nopush on;
>>> tcp_nodelay on;
>>> server_names_hash_bucket_size 128;
>>> server_name_in_redirect off;
>>> server_tokens off;
>>> keepalive_timeout 60;
>>> send_timeout 60;
>>> client_header_buffer_size 4k;
>>> large_client_header_buffers 4 4k;
>>> client_max_body_size 20m;
>>> gzip on;
>>> gzip_min_length 1k;
>>> gzip_buffers 4 16k;
>>> gzip_http_version 1.0;
>>> gzip_comp_level 9;
>>> gzip_types text/plain text/css image/x-icon image/bmp
>>> application/x-javascript application/xml;
>>> gzip_vary on;
>>> fastcgi_connect_timeout 300;
>>> fastcgi_send_timeout 300;
>>> fastcgi_read_timeout 300;
>>> fastcgi_buffer_size 64k;
>>> fastcgi_buffers 4 64k;
>>> fastcgi_busy_buffers_size 128k;
>>> fastcgi_temp_file_write_size 128k;
>>> include /etc/nginx/conf.d/*.conf;
>>> include /etc/nginx/sites-enabled/*;
>>> }
>>>
>>>
>>> *php5-fpm.conf*
>>>
>>> listen = 127.0.0.1:9000
>>> user = www-data
>>> group = www-data
>>> pm = dynamic
>>> pm.max_children = 66
>>> pm.start_servers = 8
>>> pm.min_spare_servers = 5
>>> pm.max_spare_servers = 16
>>> pm.max_requests = 512
>>>
>>>
>>>
>>> _______________________________________________
>>> nginx mailing list
>>> nginx@nginx.org
>>> http://nginx.org/mailman/listinfo/nginx
>>>
>>>
>>
>>
>> --
>> Warez Scene http://thewarezscene.org Free Rapidshare Downloadshttp://www.nexusddl.com
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>>
>>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
>


--
Warez Scene http://thewarezscene.org Free Rapidshare
Downloadshttp://www.nexusddl.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

server performance issue

Xin Liu October 26, 2010 02:46AM

Re: server performance issue

SplitIce October 26, 2010 02:52AM

Re: server performance issue

Xin Liu October 26, 2010 04:04AM

Re: server performance issue

SplitIce October 26, 2010 04:16AM

Re: server performance issue

Xin Liu October 26, 2010 05:34AM

Re: server performance issue

SplitIce October 26, 2010 05:34AM

Re: server performance issue

Phil Bayfield October 26, 2010 06:52AM

Re: server performance issue

Phil Bayfield October 26, 2010 06:56AM

Re: server performance issue

SplitIce October 26, 2010 07:02AM

Re: server performance issue

Phil Bayfield October 26, 2010 07:10AM

Re: server performance issue

iberkner October 26, 2010 07:40AM

Re: server performance issue

Phil Bayfield October 26, 2010 08:02AM

答复: server performance issue

Xin Liu October 26, 2010 10:18AM

Re: 答复: server performance issue

Phil Bayfield October 26, 2010 10:26AM

Re: 答复: server performance issue

iberkner October 26, 2010 10:26AM

答复: 答复: server performance issue

Xin Liu October 26, 2010 12:06PM

Re: 答复: server performance issue

Jérôme Loyet October 26, 2010 10:32AM

Re: 答复: server performance issue

Reinis Rozitis October 26, 2010 11:52AM

Re: 答复: server performance issue

Splitice October 26, 2010 05:20PM

Re: server performance issue

Ian Hobson October 26, 2010 03:34PM

Re: server performance issue

António P. P. Almeida October 26, 2010 03:20AM

Re: server performance issue

SplitIce October 26, 2010 03:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 156
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready