Welcome! Log In Create A New Profile

Advanced

Ubunu 9.04 High cpu and memery

Posted by Dark 
Ubunu 9.04 High cpu and memery
December 14, 2009 09:37AM
Hello there...

I have a very big problem. Im running a big blogg site with over 1 miljon visit per month.

I have setup Ngnix + PHP-FPM

The server has 1 Quadcore processor with two 73.5 gb SAS drives in raid1. its a dell 1950 with 2.0 Ghz x4

The site is running under WordPress.

The problem is that the site is eat ram as hell. Today the server died and eat up all swap space.

So the machine hang up and im visit the datacenter and set in more memory.

so from 12 gb ram to 20 gb of ram.

My PHP-FPM config is like this.

<value name="max_children">512</value>

Settings group for 'apache-like' pm style
<value name="apache_like">

Sets the number of server processes created on startup.
Used only when 'apache-like' pm_style is selected
<value name="StartServers">10</value>

Sets the desired minimum number of idle server processes.
Used only when 'apache-like' pm_style is selected
<value name="MinSpareServers">30</value>

Sets the desired maximum number of idle server processes.
Used only when 'apache-like' pm_style is selected
<value name="MaxSpareServers">40</value>

</value>


I think maxSpareServer need to be lower but my second technical man have set this and im setting it down from Startservers 30 to 10. And the server goes down from 12 gb of ram to 8 gb of ram.


But its still eat to much ram in my eyes. Those people that are visit the site is not more then 500 at the same time.

So if some one has more information about how the php-fpm work will i be glad if someone can help me.


Tnx for reading this text.

//Dark
Momchil Ivanov
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 09:44AM
На понеделник 14 декември 2009 15:37:22 Dark написа:
> Hello there...
>
> I have a very big problem. Im running a big blogg site with over 1 miljon
> visit per month.
>
> I have setup Ngnix + PHP-FPM
>
> The server has 1 Quadcore processor with two 73.5 gb SAS drives in raid1.
> its a dell 1950 with 2.0 Ghz x4
>
> The site is running under WordPress.
>
> The problem is that the site is eat ram as hell. Today the server died and
> eat up all swap space.
>
> So the machine hang up and im visit the datacenter and set in more memory.
>
> so from 12 gb ram to 20 gb of ram.
>
> My PHP-FPM config is like this.
>
> 512
>
> Settings group for 'apache-like' pm style
>
>
> Sets the number of server processes
> created on startup. Used only when 'apache-like' pm_style is selected 10
>
> Sets the desired minimum number of
> idle server processes. Used only when 'apache-like' pm_style is selected
> 30
>
> Sets the desired maximum number of
> idle server processes. Used only when 'apache-like' pm_style is selected
> 40
>
>
>
>
> I think maxSpareServer need to be lower but my second technical man have
> set this and im setting it down from Startservers 30 to 10. And the server
> goes down from 12 gb of ram to 8 gb of ram.
>
>
> But its still eat to much ram in my eyes. Those people that are visit the
> site is not more then 500 at the same time.
>
> So if some one has more information about how the php-fpm work will i be
> glad if someone can help me.

As far as I know, the apache like process control is not working at the
moment, you should use a constant number of processed. Please post your whole
fpm conf somewhere and give a link to it, so that we can take a look.

Are you sure that php ate your memory and not mysql? Why do you think it was
php?

Momchil
Alexey A. Rybak
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 09:48AM
apache-like is a stupid confusing part in config - this newer worked.
see the number of workers (max_children). but something tells me that
will not help you. 99% you have trouble with leaks that should be
fixed correctly. if you can't find the place well probably the only
way is try to set up max_requests to something low like 32 and
increase it but this is a very bad style of fixing problems.

On Mon, Dec 14, 2009 at 5:37 PM, Dark <nginx-forum@nginx.us> wrote:
> Hello there...
>
> I have a very big problem. Im running a big blogg site with over 1 miljon visit per month.
>
> I have setup Ngnix + PHP-FPM
>
> The server has 1 Quadcore processor with two 73.5 gb SAS drives in raid1. its a dell 1950 with 2.0 Ghz x4
>
> The site is running under WordPress.
>
> The problem is that the site is eat ram as hell. Today the server died and eat up all swap space.
>
> So the machine hang up and im visit the datacenter and set in more memory.
>
> so from 12 gb ram to 20 gb of ram.
>
> My PHP-FPM config is like this.
>
> 512
>
> Settings group for 'apache-like' pm style
>
>
> Sets the number of server processes created on startup.
> Used only when 'apache-like' pm_style is selected
> 10
>
> Sets the desired minimum number of idle server processes.
> Used only when 'apache-like' pm_style is selected
> 30
>
> Sets the desired maximum number of idle server processes.
> Used only when 'apache-like' pm_style is selected
> 40
>
>
>
>
> I think maxSpareServer need to be lower but my second technical man have set this and im setting it down from Startservers 30 to 10. And the server goes down from 12 gb of ram to 8 gb of ram.
>
>
> But its still eat to much ram in my eyes. Those people that are visit the site is not more then 500 at the same time.
>
> So if some one has more information about how the php-fpm work will i be glad if someone can help me.
>
>
> Tnx for reading this text.
>
> //Dark
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,30429,30429#msg-30429
>
>



--

wbr,
fisher
Jason
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 10:08AM
Sounds like a leak.

What version of PHP?
What else is running?
Is it a raw Nginx/FPM box?
Caching?

- Disable all plugins.
- Make your timeouts aggressive
- Do an extended ab and just hammer your box.
- On our grid we sometimes use selenium with remote control and spawn them
on EC2 instances for hog wild craziness.
- Check your mem during this time.
- Enable plug-ins one by one and repeat the testing.

I help out on BuddyPress.org with many patches and there are lots of users
who run high traffic sites. You might find some extra info poking around
there.


On Mon, Dec 14, 2009 at 9:37 AM, Dark <nginx-forum@nginx.us> wrote:

> Hello there...
>
> I have a very big problem. Im running a big blogg site with over 1 miljon
> visit per month.
>
> I have setup Ngnix + PHP-FPM
>
> The server has 1 Quadcore processor with two 73.5 gb SAS drives in raid1.
> its a dell 1950 with 2.0 Ghz x4
>
> The site is running under WordPress.
>
> The problem is that the site is eat ram as hell. Today the server died and
> eat up all swap space.
>
> So the machine hang up and im visit the datacenter and set in more memory.
>
> so from 12 gb ram to 20 gb of ram.
>
> My PHP-FPM config is like this.
>
> 512
>
> Settings group for 'apache-like' pm style
>
>
> Sets the number of server processes
> created on startup.
> Used only when 'apache-like'
> pm_style is selected
> 10
>
> Sets the desired minimum number of
> idle server processes.
> Used only when 'apache-like'
> pm_style is selected
> 30
>
> Sets the desired maximum number of
> idle server processes.
> Used only when 'apache-like'
> pm_style is selected
> 40
>
>
>
>
> I think maxSpareServer need to be lower but my second technical man have
> set this and im setting it down from Startservers 30 to 10. And the server
> goes down from 12 gb of ram to 8 gb of ram.
>
>
> But its still eat to much ram in my eyes. Those people that are visit the
> site is not more then 500 at the same time.
>
> So if some one has more information about how the php-fpm work will i be
> glad if someone can help me.
>
>
> Tnx for reading this text.
>
> //Dark
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?3,30429,30429#msg-30429
>
>
Jason
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 10:10AM
And for the record, that is a big box for wordpress. I've seen smaller
optimized systems (generally) run the #/month your quoting. HW is cheap is
no big deal, you've done well thus far I'm sure. Just find that leak and
try to maximize the box later.

On Mon, Dec 14, 2009 at 9:37 AM, Dark <nginx-forum@nginx.us> wrote:

> Hello there...
>
> I have a very big problem. Im running a big blogg site with over 1 miljon
> visit per month.
>
> I have setup Ngnix + PHP-FPM
>
> The server has 1 Quadcore processor with two 73.5 gb SAS drives in raid1.
> its a dell 1950 with 2.0 Ghz x4
>
> The site is running under WordPress.
>
> The problem is that the site is eat ram as hell. Today the server died and
> eat up all swap space.
>
> So the machine hang up and im visit the datacenter and set in more memory.
>
> so from 12 gb ram to 20 gb of ram.
>
> My PHP-FPM config is like this.
>
> 512
>
> Settings group for 'apache-like' pm style
>
>
> Sets the number of server processes
> created on startup.
> Used only when 'apache-like'
> pm_style is selected
> 10
>
> Sets the desired minimum number of
> idle server processes.
> Used only when 'apache-like'
> pm_style is selected
> 30
>
> Sets the desired maximum number of
> idle server processes.
> Used only when 'apache-like'
> pm_style is selected
> 40
>
>
>
>
> I think maxSpareServer need to be lower but my second technical man have
> set this and im setting it down from Startservers 30 to 10. And the server
> goes down from 12 gb of ram to 8 gb of ram.
>
>
> But its still eat to much ram in my eyes. Those people that are visit the
> site is not more then 500 at the same time.
>
> So if some one has more information about how the php-fpm work will i be
> glad if someone can help me.
>
>
> Tnx for reading this text.
>
> //Dark
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?3,30429,30429#msg-30429
>
>
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 12:48PM
Apache like pm is not supported. Do you have 512 static setup? The XML
was stripped. Post your whole config to pastebin.

Sent from my iPhone

On Dec 14, 2009, at 7:09 AM, Jason <jason.giedymin@gmail.com> wrote:

> And for the record, that is a big box for wordpress. I've seen
> smaller optimized systems (generally) run the #/month your quoting.
> HW is cheap is no big deal, you've done well thus far I'm sure.
> Just find that leak and try to maximize the box later.
>
> On Mon, Dec 14, 2009 at 9:37 AM, Dark <nginx-forum@nginx.us> wrote:
> Hello there...
>
> I have a very big problem. Im running a big blogg site with over 1
> miljon visit per month.
>
> I have setup Ngnix + PHP-FPM
>
> The server has 1 Quadcore processor with two 73.5 gb SAS drives in
> raid1. its a dell 1950 with 2.0 Ghz x4
>
> The site is running under WordPress.
>
> The problem is that the site is eat ram as hell. Today the server
> died and eat up all swap space.
>
> So the machine hang up and im visit the datacenter and set in more
> memory.
>
> so from 12 gb ram to 20 gb of ram.
>
> My PHP-FPM config is like this.
>
> 512
>
> Settings group for 'apache-like' pm
> style
>
>
> Sets the number of server
> processes created on startup.
> Used only when 'apache-like'
> pm_style is selected
> 10
>
> Sets the desired minimum
> number of idle server processes.
> Used only when 'apache-like'
> pm_style is selected
> 30
>
> Sets the desired maximum
> number of idle server processes.
> Used only when 'apache-like'
> pm_style is selected
> 40
>
>
>
>
> I think maxSpareServer need to be lower but my second technical man
> have set this and im setting it down from Startservers 30 to 10. And
> the server goes down from 12 gb of ram to 8 gb of ram.
>
>
> But its still eat to much ram in my eyes. Those people that are
> visit the site is not more then 500 at the same time.
>
> So if some one has more information about how the php-fpm work will
> i be glad if someone can help me.
>
>
> Tnx for reading this text.
>
> //Dark
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,30429,30429#msg-30429
>
>
Matthew Barr
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 12:54PM
> I have a very big problem. Im running a big blogg site with over 1
> miljon visit per month.
>
> The server has 1 Quadcore processor with two 73.5 gb SAS drives in
> raid1. its a dell 1950 with 2.0 Ghz x4
>
> The site is running under WordPress.
>
> The problem is that the site is eat ram as hell. Today the server
> died and eat up all swap space.
>
> So the machine hang up and im visit the datacenter and set in more
> memory.
>
> so from 12 gb ram to 20 gb of ram.


I can't comment on the php-fpm config, others will do so much better
than I.


However, you can easily scale Wordpress to a large number of users
using some of the caching plugins. The one to try in your scenario is
WP-Supercache.


Unless you've got some extenuating circumstances, it should take that
many users and pretty much laugh. (I'm assuming a normal usage with
a very low percentage of logged in users. You're also on a single web
server.)


Matthew
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 01:02PM
Yeh. 1 million per month isn't anything. I do a something like 2-3
million per day (not wordpress and spread over 3 servers) with much
less beefy specs. However one of the sites does have a lot of db
queries and spaghetti code and might be close to the amount of load a
wordpress install would use :)

I have noticed drupal and forum software usually eats larger amounts
of ram per php child myself. However this is why you have recycling
enabled and don't define more engines than you really need.

And thanks to Jerome for getting the dynamic (not "apache like")
process management code into the php core svn over the weekend. A
great start!

Sent from my iPhone

On Dec 14, 2009, at 9:49 AM, Matthew Barr <mbarr@interactiveone.com>
wrote:

>> I have a very big problem. Im running a big blogg site with over 1
>> miljon visit per month.
>>
>> The server has 1 Quadcore processor with two 73.5 gb SAS drives in
>> raid1. its a dell 1950 with 2.0 Ghz x4
>>
>> The site is running under WordPress.
>>
>> The problem is that the site is eat ram as hell. Today the server
>> died and eat up all swap space.
>>
>> So the machine hang up and im visit the datacenter and set in more
>> memory.
>>
>> so from 12 gb ram to 20 gb of ram.
>
>
> I can't comment on the php-fpm config, others will do so much better
> than I.
>
>
> However, you can easily scale Wordpress to a large number of users
> using some of the caching plugins. The one to try in your scenario
> is WP-Supercache.
>
>
> Unless you've got some extenuating circumstances, it should take
> that many users and pretty much laugh. (I'm assuming a normal
> usage with a very low percentage of logged in users. You're also on
> a single web server.)
>
>
> Matthew
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 03:26PM
Hello now will i come with the server-config.


<?xml version="1.0" ?>
- <configuration>
All relative paths in this config are relative to php's install prefix
- <section name="global_options">
Pid file
<value name="pid_file">/usr/local/logs/php-fpm.pid</value>
Error log file
<value name="error_log">/usr/local/logs/php-fpm.log</value>
Log level
<value name="log_level">notice</value>
When this amount of php processes exited with SIGSEGV or SIGBUS ...
<value name="emergency_restart_threshold">10</value>
... in a less than this interval of time, a graceful restart will be initiated. Useful to work around accidental curruptions in accelerator's shared memory.
<value name="emergency_restart_interval">1m</value>
Time limit on waiting child's reaction on signals from master
<value name="process_control_timeout">5s</value>
Set to 'no' to debug fpm
<value name="daemonize">yes</value>
</section>
- <workers>
- <section name="pool">
Name of pool. Used in logs and stats.
<value name="name">default</value>
Address to accept fastcgi requests on. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
<value name="listen_address">127.0.0.1:9000</value>
- <value name="listen_options">
Set listen(2) backlog
<value name="backlog">-1</value>
Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions.
<value name="owner" />
<value name="group" />
<value name="mode">0666</value>
</value>
Additional php.ini defines, specific to this pool of workers.
- <value name="php_defines">
- <!-- <value name="sendmail_path">/usr/sbin/sendmail -t -i</value>
-->
- <!-- <value name="display_errors">0</value>
-->
</value>
Unix user of processes
<value name="user">www-data</value>
--> Unix group of processes
- <!-- <value name="group">www-data</value>
-->
Process manager settings
- <value name="pm">
Sets style of controling worker process count. Valid values are 'static' and 'apache-like'
<value name="style">static</value>
Sets the limit on the number of simultaneous requests that will be served. Equivalent to Apache MaxClients directive. Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi Used with any pm_style.
<value name="max_children">512</value>
Settings group for 'apache-like' pm style
- <value name="apache_like">
Sets the number of server processes created on startup. Used only when 'apache-like' pm_style is selected
<value name="StartServers">10</value>
Sets the desired minimum number of idle server processes. Used only when 'apache-like' pm_style is selected
<value name="MinSpareServers">30</value>
Sets the desired maximum number of idle server processes. Used only when 'apache-like' pm_style is selected
<value name="MaxSpareServers">40</value>
</value>
</value>
The timeout (in seconds) for serving a single request after which the worker process will be terminated Should be used when 'max_execution_time' ini option does not stop script execution for some reason '0s' means 'off'
<value name="request_terminate_timeout">0s</value>
The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file '0s' means 'off'
<value name="request_slowlog_timeout">0s</value>
The log file for slow requests
<value name="slowlog">logs/slow.log</value>
Set open file desc rlimit
<value name="rlimit_files">6096</value>
Set max core size rlimit
<value name="rlimit_core">0</value>
Chroot to this directory at the start, absolute path
<value name="chroot" />
Chdir to this directory at the start, absolute path
<value name="chdir" />
Redirect workers' stdout and stderr into main error log. If not set, they will be redirected to /dev/null, according to FastCGI specs
<value name="catch_workers_output">yes</value>
How much requests each process should execute before respawn. Useful to work around memory leaks in 3rd party libraries. For endless request processing please specify 0 Equivalent to PHP_FCGI_MAX_REQUESTS
<value name="max_requests">2048</value>
Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect. Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) Makes sense only with AF_INET listening socket.
<value name="allowed_clients">127.0.0.1</value>
Pass environment variables like LD_LIBRARY_PATH All $VARIABLEs are taken from current environment
- <value name="environment">
<value name="HOSTNAME">$HOSTNAME</value>
<value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
<value name="TMP">/tmp</value>
<value name="TMPDIR">/tmp</value>
<value name="TEMP">/tmp</value>
<value name="OSTYPE">$OSTYPE</value>
<value name="MACHTYPE">$MACHTYPE</value>
<value name="MALLOC_CHECK_">2</value>
</value>
</section>
</workers>
</configuration>


But i still have some questions right now has the site eat up 12 gb of ram. And the cpu load is like 50 % on etch cpus.

My System is :

Wordpress with WP Supercache
The newest php-FPM
nginx version: nginx/0.6.35
Full updated Ubuntu-server.

Then the site has been running for 1 week the server died because its eat up all swap memory and go to hell.
Then im restarting php-fpm the server goes down from 12 gb of ram to about 1 gb and after some minits is about 6 gb.

Here is some screens from my system : http://data.fuskbugg.se/skalman01/----server.jpg
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 03:58PM
Pastebin this. The XML is stripped

Sent from my iPhone

On Dec 14, 2009, at 12:26 PM, "Dark" <nginx-forum@nginx.us> wrote:

> Hello now will i come with the server-config.
>
>
> <?xml version="1.0" ?>
> -
> All relative paths in this config are relative to php's install
> prefix
> -
> Pid file
> /usr/local/logs/php-fpm.pid
> Error log file
> /usr/local/logs/php-fpm.log
> Log level
> notice
> When this amount of php processes exited with SIGSEGV or SIGBUS ...
> 10
> ... in a less than this interval of time, a graceful restart will
> be initiated. Useful to work around accidental curruptions in
> accelerator's shared memory.
> 1m
> Time limit on waiting child's reaction on signals from master
> 5s
> Set to 'no' to debug fpm
> yes
>
> -
> -
> Name of pool. Used in logs and stats.
> default
> Address to accept fastcgi requests on. Valid syntax is
> 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
> 127.0.0.1:9000
> -
> Set listen(2) backlog
> -1
> Set permissions for unix socket, if one used. In Linux read/write
> permissions must be set in order to allow connections from web
> server. Many BSD-derrived systems allow connections regardless of
> permissions.
>
>
> 0666
>
> Additional php.ini defines, specific to this pool of workers.
> -
> - <!-- /usr/sbin/sendmail -t -i
> -->
> - <!-- 0
> -->
>
> Unix user of processes
> www-data
> --> Unix group of processes
> - <!-- www-data
> -->
> Process manager settings
> -
> Sets style of controling worker process count. Valid values are
> 'static' and 'apache-like'
> static
> Sets the limit on the number of simultaneous requests that will be
> served. Equivalent to Apache MaxClients directive. Equivalent to
> PHP_FCGI_CHILDREN environment in original php.fcgi Used with any
> pm_style.
> 512
> Settings group for 'apache-like' pm style
> -
> Sets the number of server processes created on startup. Used only
> when 'apache-like' pm_style is selected
> 10
> Sets the desired minimum number of idle server processes. Used only
> when 'apache-like' pm_style is selected
> 30
> Sets the desired maximum number of idle server processes. Used only
> when 'apache-like' pm_style is selected
> 40
>
>
> The timeout (in seconds) for serving a single request after which
> the worker process will be terminated Should be used when
> 'max_execution_time' ini option does not stop script execution for
> some reason '0s' means 'off'
> 0s
> The timeout (in seconds) for serving of single request after which
> a php backtrace will be dumped to slow.log file '0s' means 'off'
> 0s
> The log file for slow requests
> logs/slow.log
> Set open file desc rlimit
> 6096
> Set max core size rlimit
> 0
> Chroot to this directory at the start, absolute path
>
> Chdir to this directory at the start, absolute path
>
> Redirect workers' stdout and stderr into main error log. If not
> set, they will be redirected to /dev/null, according to FastCGI specs
> yes
> How much requests each process should execute before respawn.
> Useful to work around memory leaks in 3rd party libraries. For
> endless request processing please specify 0 Equivalent to
> PHP_FCGI_MAX_REQUESTS
> 2048
> Comma separated list of ipv4 addresses of FastCGI clients that
> allowed to connect. Equivalent to FCGI_WEB_SERVER_ADDRS environment
> in original php.fcgi (5.2.2+) Makes sense only with AF_INET
> listening socket.
> 127.0.0.1
> Pass environment variables like LD_LIBRARY_PATH All $VARIABLEs are
> taken from current environment
> -
> $HOSTNAME
> /usr/local/bin:/usr/bin:/bin
> /tmp
> /tmp
> /tmp
> $OSTYPE
> $MACHTYPE
> 2
>
>
>
>
>
>
> But i still have some questions right now has the site eat up 12 gb
> of ram. And the cpu load is like 50 % on etch cpus.
>
> My System is :
>
> Wordpress with WP Supercache
> The newest php-FPM
> nginx version: nginx/0.6.35
> Full updated Ubuntu-server.
>
> Then the site has been running for 1 week the server died because
> its eat up all swap memory and go to hell.
> Then im restarting php-fpm the server goes down from 12 gb of ram to
> about 1 gb and after some minits is about 6 gb.
>
> Here is some screens from my system : http://data.fuskbugg.se/skalman01/----server.jpg
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,30429,30502#msg-30502
>
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 04:04PM
Tnx Mike

Here it is : http://pastebin.com/m432a17eb
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 04:40PM
yeah, you have 512 children setup.

for a couple million hits per month, i'd set it down to.. 25? try to
figure out how many people might be executing a php script at once
roughly.

i do multi-millions of requests per month and my largest pool is like
40 children...

On Mon, Dec 14, 2009 at 1:04 PM, Dark <nginx-forum@nginx.us> wrote:
> Tnx Mike
>
> Here it is : http://pastebin.com/m432a17eb
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,30429,30509#msg-30509
>
>
Anatoly Pashin
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 10:26PM
Think you have too much mysql processes and you should look at my.cnf,
'cause yours 24 mysqld processes eats 24*2.1% (50%) of memory!
So tweak php-fpm to 20-25 pools like Michael said, than mysqld.

ps. 20GBs of memory for that? O_O

2009/12/15 Dark <nginx-forum@nginx.us>

> [...]
> Here is some screens from my system :
> http://data.fuskbugg.se/skalman01/----server.jpg
>
>
Re: Ubunu 9.04 High cpu and memery
December 14, 2009 10:54PM
maybe look at turning off persistent connections (if enabled)

if not, perhaps they might be of benefit with that many php processes.
i dunno. i don't use them ever and i haven't had an issue.

On Mon, Dec 14, 2009 at 7:23 PM, Anatoly Pashin
<anatoly.pashin@gmail.com> wrote:
> Think you have too much mysql processes and you should look at my.cnf,
> 'cause yours 24 mysqld processes eats 24*2.1% (50%) of memory!
> So tweak php-fpm to 20-25 pools like Michael said, than mysqld.
> ps. 20GBs of memory for that? O_O
>
> 2009/12/15 Dark <nginx-forum@nginx.us>
>>
>> [...]
>> Here is some screens from my system :
>> http://data.fuskbugg.se/skalman01/----server.jpg
>>
>
>
Re: Ubunu 9.04 High cpu and memery
December 15, 2009 03:14AM
Right me here if i am wrong here.

If i set max_children" to 25. its will handle about 25 users on each server? like this 25 x 40 MaxSpareServers = 1000 users on the same time?

I am not sure if i remember this right but im quite sure.

Well mike i will have a look on my.cnf and i will try to set them to this value:

<value name="max_children">25</value>
<value name="StartServers">10</value>
<value name="MinSpareServers">30</value>
<value name="MaxSpareServers">40</value>

//Dark thx for all help so long.
Re: Ubunu 9.04 High cpu and memery
December 15, 2009 03:34AM
again - the apache settings are useless. don't even worry about those.
set the process manager as static and set the number of engines to
roughly about how many php requests per second you expect to be
processing.

remember most decent php scripts will execute in less than 1 second,
so you can handle more than one request inside of the window of 1
second optimally... so it's okay to fudge it a few above and i
wouldn't stress about it unless nginx starts reporting back 504
gateway timeouts and such (because it might be blocking waiting for
the fastcgi reply, but all the engines are busy)

note that Jerome will soon have the dynamic (not "apache like")
process manager working soon and it will report out some basic usage
statistics to help determine if the values are set properly (we hope)

Jerome++ !


On Tue, Dec 15, 2009 at 12:14 AM, Dark <nginx-forum@nginx.us> wrote:
> Right me here if i am wrong here.
>
> If i set max_children" to 25. its will handle about 25 users on each server? like this 25 x 40 MaxSpareServers = 1000 users on the same time?
>
> I am not sure if i remember this right but im quite sure.
>
> Well mike i will have a look on my.cnf and i will try to set them to this value:
>
> 25
> 10
> 30
> 40
>
> //Dark thx for all help so long.
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,30429,30585#msg-30585
>
>
Re: Ubunu 9.04 High cpu and memery
December 15, 2009 03:50AM
IM going from 12 gb of ram down to 1 gb now.

I have set the cache from 100 mb in mysql to 1000 mbś to start testing.

maby i win more to cache the SQL to more memory.

as you said we has the problem on the default php-FPM.

That you talk about 504 Gateway error. therefore we high the child up.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready