Linode RAM + CPU Increase - What configs To Change?

Hi, I have been using EE for long time and now I’m expanding the linode capacity from 4 GB RAM & 2 CPU cores to 8 GB & 4 CPU cores.

Could you please tell me what configurations that I have to change to make use of the resource increase? Does EE have an option to auto-configure this?

Thanks for your help.

You can set the Nginx wordpress proces to 4 in /etc/nginx/nginx.conf worker_processes 4;

For php, you can increase max_memory_usage, and also allocate more memory for zend opcache :

You can also optimize MariaDB settings, using mysqltuner :

@virtubox Not really. Nginx workers are set to auto. If VPS has 4 cores, it will use 4 - if it has 8 available, it will use 8.

Yes I know, but if you know exactly how much CPU cores are available on your server, it’s useless to let Nginx try to detect them.

I disagree. Its not a live calculation that consumes resources at all. Keeping it to auto makes your setup scalable.

This is the main reason EE, offers it in auto mode by default.

1 Like

@ggloveswp is absolutely right here… its also more flexible, you can move your linode sliders and you have nothing to change, just restart your nginx (rebooting your system…).

Mainly load in a wp server would be mainly caused by php processes and mysql. So run and follow the mysqltuner recommendations to tuneup the mysql configurations and increase the configurations of php-fpm processes under,

/etc/php/7.0/fpm/pool.d/www.conf

pm = ondemand
pm.max_children 
pm.start_servers 
pm.min_spare_servers
pm.max_spare_servers

tuning above parameters may help to avoid unwanted process swap and thereby cpu overhead caused by it.

Also we can increase the redis cache size (maxmemory) in case if you are using redis and you have more cacheble contents.

I would add that you can consider the ProxySQL between MS and the PHP. According to the MySql team, should be better than the query cache considerably and they are ditching QC in ersion 8.0.1 or 8.0.2

I’ll try it soon

My bad, auto is the best settings for nginx worker_processes.

NGINX can run multiple worker processes, each capable of processing a large number of simultaneous connections. You can control the number of worker processes and how they handle connections with the following directives:

worker_processes – The number of NGINX worker processes (the default is 1). In most cases, running one worker process per CPU core works well, and we recommend setting this directive to auto to achieve that. There are times when you may want to increase this number, such as when the worker processes have to do a lot of disk I/O. worker_connections – The maximum number of connections that each worker process can handle simultaneously. The default is 512, but most systems have enough resources to support a larger number. The appropriate setting depends on the size of the server and the nature of the traffic, and can be discovered through testing.

Source : https://www.nginx.com/blog/tuning-nginx/

1 Like