Bug #76442 [Opn->Ver]: Slow MySQL perfomance via named pipe
| From: | cmb@php.net | Date: | Mon, 28 Jun 2021 20:05:28 +0000 |
| Subject: | Bug #76442 [Opn->Ver]: Slow MySQL perfomance via named pipe | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-234673@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76442&edit=1
ID: 76442
Updated by: cmb@php.net
Reported by: yaro at opti dot su
Summary: Slow MySQL perfomance via named pipe
-Status: Open
+Status: Verified
Type: Bug
Package: MySQLi related
Operating System: Windows Server 2008 R2
PHP Version: 7.2.6
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I can confirm that named pipes are considerably slower than TCP
with PHP-7.4. And although the MySQL manual mentions[1] (to my
surprise):
| The default is to use TCP/IP regardless of platform because
| named pipes are slower than TCP/IP in many Windows configurations.
I can also confirm that named pipes were slightly faster than TCP
with PHP 5.4.45.
[1] <https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/windows-select-server.html>
Previous Comments:
------------------------------------------------------------------------
[2018-07-03 11:44:48] cmb@php.net
Related To: Bug #76565
------------------------------------------------------------------------
[2018-06-12 01:19:48] yaro at opti dot su
Tested on php x86:
PHP: v7.1.11-x86
MySQL: v5.6.24 x64
OS: Windows Server 2012 R2
PHP version : 7.1.11 (32 bit)
MySQL version : 5.6.24-log
MySQL server : \\.\pipe\MySQL via named pipe
Latency (connect): 6.2270164489746 ms
Latency (close) : 0.030040740966797 ms
Latency (query) : 1.0011196136475 ms
Speed (select) : 1039 req/sec
Speed (insert) : 1000 req/sec
Speed (update) : 1066 req/sec
------------------------------------------------------------------------
[2018-06-11 23:18:45] yaro at opti dot su
Tested on php x64:
PHP: v5.6.36-x64, v7.0.30-x64, v7.1.18-x64, v7.2.6-x64
MySQL: v5.6.24 x64, v5.7.22 x64
OS: Windows Server 2008 R2, Windows Server 2016
=== Output of Test script ===
PHP version : 7.2.6
MySQL version : 5.7.22
MySQL server : \\.\pipe\MySQL via named pipe
Latency (connect): 46.875 ms
Latency (close) : 0 ms
Latency (query) : 16.15625 ms
Speed (select) : 64 req/sec
Speed (insert) : 63 req/sec
Speed (update) : 62 req/sec
PHP version : 7.2.6
MySQL version : 5.7.22
MySQL server : localhost via TCP/IP
Latency (connect): 3.90625 ms
Latency (close) : 0 ms
Latency (query) : 0.03125 ms
Speed (select) : 21333 req/sec
Speed (insert) : 12800 req/sec
Speed (update) : 10667 req/sec
I think this is a bug, because in the previous version of PHP everything worked is perfect!
Test script:
---------------
$cli = PHP_SAPI == 'cli';
$ln = chr(13).chr(10);
if (!$cli) echo '<pre>';
echo bench_db_format(bench_db('.', 'root', 'pass',
'db_name'), $ln).$ln;
echo bench_db_format(bench_db('localhost', 'root', 'pass',
'db_name'), $ln).$ln;
if (!$cli) echo '<pre>';
more code can be obtained from this link:
http://opti.su/public/bench_db.txt
------------------------------------------------------------------------
[2018-06-11 09:57:50] yaro at opti dot su
Additional info:
- Windows Server 2016 ~ 40 msec for mysqli_connect()
- Windows Server 2016 ~ 16 msec for mysqli_query()
php v7.2.5 x64, mysql v5.7.22 x64, VC14.13.26020
------------------------------------------------------------------------
[2018-06-10 10:50:32] yaro at opti dot su
Additional info:
- Windows Server 2008 R2 ~ 15 msec for mysqli_query()
- Windows Server 2012 R2 ~ 1 msec for mysqli_query()
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76442
--
Edit this bug report at https://bugs.php.net/bug.php?id=76442&edit=1