Score:0

Kernel version 5.4 performs better transactions in PHP than newer kernels? see thread

US flag

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.

Doug Smythies avatar
gn flag
You would have to bisect the kernel to isolate the exact change that results in your performance degradation. Try other kernels between 5.4 and 5.13 to better isolate the issue (and provide better starting conditions for bisection).You could try a newer kernel (6.2-rc2 is the most recent development kernel) to determine if the degradation has been reverted or fixed. I don't know if it is related, but look [here](https://www.phoronix.com/news/VMware-ESXi-Nasty-Linux-5.13).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.