php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76458 Slow MySQL perfomance via named pipe on PHP x64
Submitted: 2018-06-11 21:58 UTC Modified: 2018-06-11 22:01 UTC
From: yaro at opti dot su Assigned: cmb (profile)
Status: Duplicate Package: Performance problem
PHP Version: 7.2.6 OS: Win x64 All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: yaro at opti dot su
New email:
PHP Version: OS:

 

 [2018-06-11 21:58 UTC] yaro at opti dot su
Description:
------------
On PHP v5.4.x mysqli_connect() and mysqli_query() worked momentally via named pipes for all version of windows (at least for MySQL v5.5, v5.6, v5.7), but in PHP v5.6.x, v7.0.x, v7.1.x, v7.2.x works very slowly:
~ 50 msec for mysqli_connect()
~ 16 msec for mysqli_query()

Tested on:
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

32-bit versions of PHP have not yet been tested

=== 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-11 22:01 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2018-06-11 22:01 UTC] cmb@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 13:01:30 2024 UTC