Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hello,
My client’s website is encountering excessive consumption of CPU and RAM resources on a regular basis.
I have included specs and helpful information below.
Server specs:
The server is running a single website which is powered by WordPress. WordPress is running a pre-built theme and various plugins. JetPack Boost, Redis Object Cache, and WP Optimize are installed and configured to handle caching and optimizations.
DNS for the server is handled by CloudFlare. CloudFlare Caching is set to respect existing headers set on the server.
The server is actively consuming up to 80% or 90% of memory at any given moment. I know this because I have set DO resource alerts to be sent out when the server uses more than 70% of CPU or RAM. I also have Netdata installed on the server for realtime resource monitoring.
The website receives an average of 350 users per day according to JetPack stats.
I have followed some suggestions and added the following values to the server’s my.cnf file:
**[mysqld]**
* default-storage-engine = InnoDB
* performance_schema = off
* innodb_buffer_pool_size = 256M
* key_buffer_size = 64M
* table_open_cache = 1024
* max_connections = 200
* tmp_table_size = 64M
* max_heap_table_size = 64M
* thread_cache_size = 16
* slow_query_log = 1
* slow_query_log_file = /var/log/mysql/mysql-slow.log
* long_query_time = 2
I have used WP Optimize to convert the database and all of the tables to use InnoDB from MyISAM.
The plugin Index WP MySQL was installed to add high performance keys to the tables that did not have them.
The following Nginx configuration file is setup:
fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MY_CACHE:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
limit_req_zone $binary_remote_addr zone=php:10m rate=2r/s;
server {
server_name wanderwoman.ca www.wanderwoman.ca;
root /var/www/wanderwoman.ca;
index index.html index.htm index.php;
access_log /var/log/nginx/wanderwoman.ca.access.log;
error_log /var/log/nginx/wanderwoman.ca.error.log;
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(png|jpg|jpeg|gif|webp|svg|ico|woff|woff2|ttf)$ {
expires 365d;
etag off;
if_modified_since off;
add_header Cache-Control "public, no-transform";
}
location ~* \.(js|css|pdf)$ {
expires 30d;
etag off;
if_modified_since off;
add_header Cache-Control "public, no-transform";
}
location ~* \.(html)$ {
etag on;
add_header Cache-Control "no-cache";
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_read_timeout 240;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
include fastcgi_params;
fastcgi_cache MY_CACHE;
fastcgi_cache_valid 200 60m;
add_header X-Cache $upstream_cache_status;
limit_req zone=php burst=10;
}
location ~ /\.ht {
deny all;
}
location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ {
deny all;
}
location ~* wp-config.php {
deny all;
}
location ~ \.user\.ini$ {
deny all;
}
**fastcgi-php.conf file:**
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
try_files $fastcgi_script_name =404;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_index index.php;
include fastcgi.conf;
The PHP memory limit is set to 256MB.
What steps could I take to optimize the resources on the server and make the website perform better?
Cheers,
hashembarret@gmail.com
Witomir Łękowski
doug.landau
5350d4b31109448dbeb34a6ffc857a
RuRo
max johnson
rem3n
bo
d.mckinstry
Jim Cason
Charles kubai
Charles kubai