Bug #78825 [Com]: stream_socket_client works slower than except

From: Date: Mon, 23 Dec 2019 12:02:36 +0000
Subject: Bug #78825 [Com]: stream_socket_client works slower than except
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224495@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78825&edit=1 ID: 78825 Comment by: vibbow at hotmail dot com Reported by: vibbow at hotmail dot com Summary: stream_socket_client works slower than except Status: Assigned Type: Bug Package: Performance problem Operating System: Windows Server 2019 PHP Version: 7.3.11 Assigned To: cmb Block user comment: N Private report: N New Comment: Just tried this on a clean install PC. Dell Optiplex 3060, with windows 10 1909 x64 Only PHP and VC runtime, no other software Still can get this reproduced. https://gist.github.com/vibbow/8909ffc9990023129562e8971fe30f7d Previous Comments: ------------------------------------------------------------------------ [2019-11-18 23:03:24] vibbow at hotmail dot com I can get this reproduced on my laptop without any virtualization software installed, so it's not virtualizaiton software related issue. Still try to figure out what's the key point to affect this. ------------------------------------------------------------------------ [2019-11-18 19:51:32] vibbow at hotmail dot com I'll try to run this test on two physical machine without any virtualization installed. ------------------------------------------------------------------------ [2019-11-18 19:41:52] vibbow at hotmail dot com I'm using minimum PHP config to reproduce this issue: By copy php.ini-production config file with add following two lines: extension_dir = ".\ext\" extension = sockets ------------------------------------------------------------------------ [2019-11-18 19:26:56] vibbow at hotmail dot com I tried to reproduce this issue on 4 different environment, 3 environment can reproduce this issue, 1 environemtn can't reproduce this issue. First I enhanced the test script a little bit, so I can see the overall trend. https://gist.github.com/vibbow/8909ffc9990023129562e8971fe30f7d This script will return four number at end of test: 1000 | 0 | 239 | 761 1st and 2nd number are latency below & above 5ms when using socket_create 3rd and 4th number are latnecy below & avobe 5ms when using stream_socket_client Next is my four enviroment and test results: - First environment: Two Physical Machine Machine One Running Windows 10 1909 x64 (Agent A) Machine Two Running Windows Server 2019 with Hyper-V enabled (Agent B) Running Ubuntu Server 19.10 as Hyper-V Guest (Agent C) Result: Agent A -> Agent C 992 | 8 | 157 | 843 Agent B -> Agent C 1000 | 0 | 106 | 894 Agent B -> Agent A 994 | 6 | 53 | 947 - Second environment: One Physical Machine Machine One: Running VMware ESXi 6.7 Running Windows Server 2019 as ESXi Guest (Agent A) Running Ubuntu Server 18.04 as ESXi Guest (Agent B) Result: Agent A -> Agent B 1000 | 0 | 239 | 761 - Third environment: One Physical Machine Machine One: Running Windows 10 LTSC 2019 with Hyper-V Enabled (Agent A) Running Ubuntu Server 18.04 as Hyper-V Guest (Agent B) Result: Agent A -> Agent B 1000 | 0 | 23 | 977 - Fourth environment: Two VIRTUAL machine (on vultr.com) VM1: Windows Server 2019 (Agent A) VM2: Ubuntu Server 19.04 (Agent B) Result: Agent A -> Agent B 999 | 1 | 1000 | 0 ------------------------------------------------------------------------ [2019-11-18 15:22:30] vibbow at hotmail dot com That'e weird, I can consistent reproduce this issue. I'll try to replicate my environment on a cloud server and try again. ------------------------------------------------------------------------ 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=78825 -- Edit this bug report at https://bugs.php.net/bug.php?id=78825&edit=1

« previous php.bugs (#224495) next »