简体   繁体   中英

Memory adjustments for magento with php5-fpm , Nginx, APC, Mysql

I am using magento with php5-fpm , Nginx, APC, and Varnish. When there is varnish hit, the load time is very good. But on varnish miss, the site takes toomuch time to load. I have seen through htop that CPU goes under a lot of load and Ram and swap become full. Sometimes i get 504 timeout!

I have a core2duo with 512mb Ram. I think there should be some memory issues. Please suugest me how should i configure the different parameters of php5-fpm, nginx, APC, Mysql.

You have Varnish+MySQL+php5-fpm+APC on the same 512Mo RAM server???

They all need a lot of RAM, by several hosts, feed them with RAM.

APC and Varnish are best used with big segments of shared memory , usually several Go of RAM, and you usually need to alter sysctl to allow such big shared memory settings.

Then MySQL will love to have several Go of RAM in things like innodb_buffer_pool_size .

Putting all theses things in 512Mo (and CPU is also a problem) I would mot expect more than one or two parallel requests on your HTTP host. And you would need to decrease default settings to ensure everything stay in memory without swapping. Think that most of the time the first thing to do is to increase default settings as they are not well suited for real life configuration (this is the case for MySQL, PostgreSQL and Varnish), so decreasing default values...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM