php fpm, opcache and huge pages












0















I'm using php-fpm configured to use file cache like this (php.ini):



opcache.enable=1
opcache.file_cache=/var/lib/hugetlbfs/group/www-data/pagesize-2MB
opcache.huge_code_pages=1


and by using debug.php:



<H1>This is normal HTML</H1>
But the <U>following table</U> is generated by PHP:
<?php
phpinfo();
?>


I can see that Zend OPcache is up and running, the opcache is enabled and using my configuration; also opcache-gui is showing the memory being used. When I'm checking /var/lib/hugetlbfs/group/www-data/pagesize-2MB I discover that contains no file (sudo find /var/lib/hugetlbfs/group/www-data/pagesize-2MB -type f) and has 0 size (sudo du -sh /var/lib/hugetlbfs/group/www-data/pagesize-2MB); this also happens even while my php website is continuously stressed with requests. I do find though many directories (e.g. /var/lib/hugetlbfs/group/www-data/pagesize-2MB/0c5f279af5b0301d11f2fde4c3271f7d/.../php-pages/wordpress/wp-content) while also the huge code memory seems to be used:



grep Huge /proc/meminfo
AnonHugePages: 14336 kB
ShmemHugePages: 0 kB
HugePages_Total: 33
HugePages_Free: 18
HugePages_Rsvd: 18
HugePages_Surp: 1
Hugepagesize: 2048 kB


Q: shouldn't that pagesize-2MB directory contain some cached files? If not then why not? If yes then how should I fix this missing cached files?





PS: my configuration is below




  • Ubuntu 16.04.5 LTS

  • PHP 7.0.32-0ubuntu0.16.04.1

  • using /usr/sbin/php-fpm7.0










share|improve this question





























    0















    I'm using php-fpm configured to use file cache like this (php.ini):



    opcache.enable=1
    opcache.file_cache=/var/lib/hugetlbfs/group/www-data/pagesize-2MB
    opcache.huge_code_pages=1


    and by using debug.php:



    <H1>This is normal HTML</H1>
    But the <U>following table</U> is generated by PHP:
    <?php
    phpinfo();
    ?>


    I can see that Zend OPcache is up and running, the opcache is enabled and using my configuration; also opcache-gui is showing the memory being used. When I'm checking /var/lib/hugetlbfs/group/www-data/pagesize-2MB I discover that contains no file (sudo find /var/lib/hugetlbfs/group/www-data/pagesize-2MB -type f) and has 0 size (sudo du -sh /var/lib/hugetlbfs/group/www-data/pagesize-2MB); this also happens even while my php website is continuously stressed with requests. I do find though many directories (e.g. /var/lib/hugetlbfs/group/www-data/pagesize-2MB/0c5f279af5b0301d11f2fde4c3271f7d/.../php-pages/wordpress/wp-content) while also the huge code memory seems to be used:



    grep Huge /proc/meminfo
    AnonHugePages: 14336 kB
    ShmemHugePages: 0 kB
    HugePages_Total: 33
    HugePages_Free: 18
    HugePages_Rsvd: 18
    HugePages_Surp: 1
    Hugepagesize: 2048 kB


    Q: shouldn't that pagesize-2MB directory contain some cached files? If not then why not? If yes then how should I fix this missing cached files?





    PS: my configuration is below




    • Ubuntu 16.04.5 LTS

    • PHP 7.0.32-0ubuntu0.16.04.1

    • using /usr/sbin/php-fpm7.0










    share|improve this question



























      0












      0








      0








      I'm using php-fpm configured to use file cache like this (php.ini):



      opcache.enable=1
      opcache.file_cache=/var/lib/hugetlbfs/group/www-data/pagesize-2MB
      opcache.huge_code_pages=1


      and by using debug.php:



      <H1>This is normal HTML</H1>
      But the <U>following table</U> is generated by PHP:
      <?php
      phpinfo();
      ?>


      I can see that Zend OPcache is up and running, the opcache is enabled and using my configuration; also opcache-gui is showing the memory being used. When I'm checking /var/lib/hugetlbfs/group/www-data/pagesize-2MB I discover that contains no file (sudo find /var/lib/hugetlbfs/group/www-data/pagesize-2MB -type f) and has 0 size (sudo du -sh /var/lib/hugetlbfs/group/www-data/pagesize-2MB); this also happens even while my php website is continuously stressed with requests. I do find though many directories (e.g. /var/lib/hugetlbfs/group/www-data/pagesize-2MB/0c5f279af5b0301d11f2fde4c3271f7d/.../php-pages/wordpress/wp-content) while also the huge code memory seems to be used:



      grep Huge /proc/meminfo
      AnonHugePages: 14336 kB
      ShmemHugePages: 0 kB
      HugePages_Total: 33
      HugePages_Free: 18
      HugePages_Rsvd: 18
      HugePages_Surp: 1
      Hugepagesize: 2048 kB


      Q: shouldn't that pagesize-2MB directory contain some cached files? If not then why not? If yes then how should I fix this missing cached files?





      PS: my configuration is below




      • Ubuntu 16.04.5 LTS

      • PHP 7.0.32-0ubuntu0.16.04.1

      • using /usr/sbin/php-fpm7.0










      share|improve this question
















      I'm using php-fpm configured to use file cache like this (php.ini):



      opcache.enable=1
      opcache.file_cache=/var/lib/hugetlbfs/group/www-data/pagesize-2MB
      opcache.huge_code_pages=1


      and by using debug.php:



      <H1>This is normal HTML</H1>
      But the <U>following table</U> is generated by PHP:
      <?php
      phpinfo();
      ?>


      I can see that Zend OPcache is up and running, the opcache is enabled and using my configuration; also opcache-gui is showing the memory being used. When I'm checking /var/lib/hugetlbfs/group/www-data/pagesize-2MB I discover that contains no file (sudo find /var/lib/hugetlbfs/group/www-data/pagesize-2MB -type f) and has 0 size (sudo du -sh /var/lib/hugetlbfs/group/www-data/pagesize-2MB); this also happens even while my php website is continuously stressed with requests. I do find though many directories (e.g. /var/lib/hugetlbfs/group/www-data/pagesize-2MB/0c5f279af5b0301d11f2fde4c3271f7d/.../php-pages/wordpress/wp-content) while also the huge code memory seems to be used:



      grep Huge /proc/meminfo
      AnonHugePages: 14336 kB
      ShmemHugePages: 0 kB
      HugePages_Total: 33
      HugePages_Free: 18
      HugePages_Rsvd: 18
      HugePages_Surp: 1
      Hugepagesize: 2048 kB


      Q: shouldn't that pagesize-2MB directory contain some cached files? If not then why not? If yes then how should I fix this missing cached files?





      PS: my configuration is below




      • Ubuntu 16.04.5 LTS

      • PHP 7.0.32-0ubuntu0.16.04.1

      • using /usr/sbin/php-fpm7.0







      php7 huge-pages php-opcache






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 1 min ago







      adrhc

















      asked Jan 8 at 21:42









      adrhcadrhc

      240111




      240111






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493338%2fphp-fpm-opcache-and-huge-pages%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493338%2fphp-fpm-opcache-and-huge-pages%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          サソリ

          広島県道265号伴広島線

          Accessing regular linux commands in Huawei's Dopra Linux