Bug #77536 [Fbk->NoF]: finfo considerably slower on 7.3 vs. 7.2

From: Date: Sun, 31 Mar 2019 04:22:05 +0000
Subject: Bug #77536 [Fbk->NoF]: finfo considerably slower on 7.3 vs. 7.2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220267@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77536&edit=1 ID: 77536 Updated by: php-bugs@lists.php.net Reported by: jscaltreto at gmail dot com Summary: finfo considerably slower on 7.3 vs. 7.2 -Status: Feedback +Status: No Feedback Type: Bug Package: Filesystem function related PHP Version: 7.3.1 Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2019-03-18 10:59:33] nikic@php.net The aforementioned commit is in 7.3.3. Can you confirm that this performance issue is resolved now? ------------------------------------------------------------------------ [2019-02-18 13:54:09] nikic@php.net I've disabled the use of MADV_HUGEPAGE by default in https://github.com/php/php-src/commit/928c42211f737640e4dc3c9702ba833c3059bddf. ------------------------------------------------------------------------ [2019-01-29 16:45:58] jscaltreto at gmail dot com I believe the commenter above may be on to something. The results in my environment with thp defrag set to defer is much better: jake@new-vps ~/phptest % cat /sys/kernel/mm/transparent_hugepage/enabled always [madvise] never jake@new-vps ~/phptest % cat /sys/kernel/mm/transparent_hugepage/defrag always defer defer+madvise [madvise] never jake@new-vps ~/phptest % ./test2.sh 100 Testing finfo over 100 iterations --- Testing PHP 7.2 Took: 0.11759901046753 --- Testing PHP 7.3 Took: 30.368657827377 jake@new-vps ~/phptest % echo defer | sudo tee /sys/kernel/mm/transparent_hugepage/defrag defer jake@new-vps ~/phptest % ./test2.sh 100 Testing finfo over 100 iterations --- Testing PHP 7.2 Took: 0.096560001373291 --- Testing PHP 7.3 Took: 0.44092488288879 So it appears the major issue I'm seeing is with thp and memory fragmentation. Which I suppose would be considered environmental, but considering many distros enable thp out of the box there may be something to evaluate. ------------------------------------------------------------------------ [2019-01-29 16:01:09] ab@php.net Thanks for the report. I don't seem to reproduce it, compiled both versions on the same host with same configure args. - 7.3 took 0.67183995246887 - 7.2 took 0.67918705940247 The diff is almost negligible and can vary on both versions within +/- 3% on the given snippet. There must be something Docker or environment specific causing this. Btw. there is a certain diff in the libmagic versions still. It might make sense you to check, whether it's related to bug #77095. Newer libmagic versions consume more input and use more comprehensive regex in some cases, which can especially affect files with a lot of spaces. However /bin/dash definitely doesn't fall under that. Thanks. ------------------------------------------------------------------------ [2019-01-29 15:35:28] spam2 at rhsoft dot net looks like again an issue with tramsparent huge pages which feels more and more like a nice idea but completly unusabe in real life! the aim to be faster *but* tlb misses are much more expensive and memory fragmentation comes into play which leads to unpredictable results because it takes ages to recover / cleanup when you endforce the use instead of madvise just wait a few hours and complete machines are freezing to death no idea why this is still that unuseable after that many years and not got either fixed or thrown away entirely in the linux kernel ------------------------------------------------------------------------ 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=77536 -- Edit this bug report at https://bugs.php.net/bug.php?id=77536&edit=1

« previous php.bugs (#220267) next »