Good day fellow Ubuntu users.
I would like to ask for any inputs or ideas to see on why the kernel version 5.4
performs way better transactions in PHP compared to the newer kernel versions.
Here's the information used during the tests.
Google VM Instance Type: c2-standard-30 w/ 1TB SSD Storage (tested different machine types and the result is the same).
Operating System: Ubuntu Focal 20.04 LTS
LXD/LXC version: 5.0.1
Number of LXC containers: 150
PHP Version: tested on 7.4, 8.0, 8.1 and the result is the same. pm.maxchildren is also set to 6.
Each container has the same version of `NGINX`, `PHP`, `MariaDB`, `WordPress`.
WordPress is also set to accept connections through the IP regardless of the url using the following setting in wp-config.php
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
Siege then runs the command http://internalips/?uncached-request
from the server to each of the container's internal IP.
Here's the results during the tests (compare the Transactions
).
######################################
# Kernel 5.13.0-1033-gcp
Transactions: 9368 hits
Availability: 100.00 %
Elapsed time: 59.70 secs
Data transferred: 34.42 MB
Response time: 0.19 secs
Transaction rate: 156.92 trans/sec
Throughput: 0.58 MB/sec
Concurrency: 29.79
Successful transactions: 9368
Failed transactions: 0
Longest transaction: 2.13
Shortest transaction: 0.00
######################################
######################################
# Kernel 5.15.0-1022-gcp
Transactions: 14192 hits
Availability: 100.00 %
Elapsed time: 59.66 secs
Data transferred: 52.15 MB
Response time: 0.13 secs
Transaction rate: 237.88 trans/sec
Throughput: 0.87 MB/sec
Concurrency: 29.88
Successful transactions: 14192
Failed transactions: 0
Longest transaction: 2.62
Shortest transaction: 0.00
######################################
######################################
# Kernel 5.4.0-1093-gcp
Transactions: 28261 hits
Availability: 100.00 %
Elapsed time: 59.21 secs
Data transferred: 103.85 MB
Response time: 0.06 secs
Transaction rate: 477.30 trans/sec
Throughput: 1.75 MB/sec
Concurrency: 29.91
Successful transactions: 28261
Failed transactions: 0
Longest transaction: 0.38
Shortest transaction: 0.00
######################################
So far I've tried setting up their sysctl configurations to be the same and there are no relevant information that sticks out on what's causing this issue on newer kernels.
I would highly appreciate if someone can shed some light on this roadblock T_T . Thank you and Godbless.