Bug #77622 [NEW]: PHP is slow at some point (because of huge page ?)

From: Date: Fri, 15 Feb 2019 10:03:07 +0000
Subject: Bug #77622 [NEW]: PHP is slow at some point (because of huge page ?)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219590@lists.php.net to get a copy of this message
From: lyrixx at lyrixx dot info Operating system: linux PHP version: 7.2.15 Package: *General Issues Bug Type: Bug Bug description:PHP is slow at some point (because of huge page ?) Description: ------------ Hello, When my computer becomes low on RAM, PHP becomes really slow. When I strace (sudo strace -p 2865 -f -T -tt) a composer update for exemple, I can see the following : 10:53:01.519555 mmap(NULL, 136314880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4349000000 <0.000006> 10:53:01.519581 munmap(0x7f4351001000, 2093056) = 0 <0.000009> 10:53:01.519610 madvise(0x7f4349000000, 134221824, MADV_HUGEPAGE) = 0 <0.000008> 10:53:28.714302 munmap(0x7f436a800000, 67112960) = 0 <0.003810> 10:53:28.718243 mmap(NULL, 150994944, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4340000000 <0.000022> 10:53:28.718346 madvise(0x7f4340000000, 150994944, MADV_HUGEPAGE) = 0 <0.000058> 10:53:39.676726 munmap(0x7f435be00000, 75497472) = 0 <0.003604> 10:53:39.768176 mmap(0x7f4364601000, 67108864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f436aa00000 <0.000026> 10:53:39.768288 munmap(0x7f436aa00000, 67108864) = 0 <0.000014> 10:53:39.768333 mmap(NULL, 134221824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4337fff000 <0.000010> 10:53:39.768371 munmap(0x7f4337fff000, 134221824) = 0 <0.000009> 10:53:39.768407 mmap(NULL, 136314880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4337e00000 <0.000011> 10:53:39.768446 munmap(0x7f433fe01000, 2093056) = 0 <0.000012> 10:53:39.768484 madvise(0x7f4337e00000, 134221824, MADV_HUGEPAGE) = 0 <0.000009> 10:53:43.449465 munmap(0x7f4360600000, 67112960) = 0 <0.003008> 10:53:43.493691 mmap(NULL, 2097152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f436e800000 <0.000012> an theses calls are very slow. During theses call one core of my CPU is at 100% and I have some free RAM I usually close my browser to "fix" this issue, but it's not convenient... I have seen similar issue https://bugs.php.net/bug.php?id=70984 or https://bugs.php.net/bug.php?id=76867 And I tried to run sudo sysctl -w vm.nr_hugepages=512 But without success ====================================== ## PHP Version PHP 7.2.15-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 8 2019 15:38:01) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.15-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies with blackfire v1.24.4~linux-x64-non_zts72, https://blackfire.io, by Blackfire ## Compilations options php-config --configure-options --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --disable-silent-rules --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-cli --disable-cgi --disable-phpdbg --with-config-file-path=/etc/php/7.2/cli --with-config-file-scan-dir=/etc/php/7.2/cli/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --config-cache --cache-file=/build/php7.2-qjOCut/php7.2-7.2.15/config.cache --libdir=${prefix}/lib/php --libexecdir=${prefix}/lib/php --datadir=${prefix}/share/php/7.2 --program-suffix=7.2 --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-all --disable-debug --disable-rpath --disable-static --with-pic --with-layout=GNU --without-pear --enable-filter --with-openssl=yes --with-password-argon2=/usr --with-pcre-regex=/usr --enable-hash --with-mhash=/usr --enable-libxml --enable-session --with-sodium --with-system-tzdata --with-zlib=/usr --with-zlib-dir=/usr --enable-dtrace --enable-pcntl --with-libedit=shared,/usr build_alias=x86_64-linux-gnu host_alias=x86_64-linux-gnu CFLAGS=-g -O2 -fdebug-prefix-map=/build/php7.2-qjOCut/php7.2-7.2.15=. -fstack-protector-strong -Wformat -Werror=format-security -O2 -Wall -pedantic -fsigned-char -fno-strict-aliasing -g ## OS $ uname -a Linux gregoire 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS" -- Edit bug report at https://bugs.php.net/bug.php?id=77622&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77622&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77622&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77622&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77622&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77622&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77622&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77622&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77622&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77622&r=support Expected behavior: https://bugs.php.net/fix.php?id=77622&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77622&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77622&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77622&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77622&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77622&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77622&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77622&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77622&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77622&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77622&r=mysqlcfg

« previous php.bugs (#219590) next »