Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Is MMCache making it slower ??

Help
2004-09-29
2013-06-04
  • Stephen More
    Stephen More
    2004-09-29

    I have a php website with a backend of MySQL.
    ( php-4.3.9  MySQL-4.1.5 turck-mmcache-2.4.6 )
    Using a custom benchmark tool, my stats have not changed much at all after I installed MMCache. If anything I think it is slightly slower not faster.

    mmcache.php shows 1 Reload with many hits.
    /tmp/mmcache has files in them.

    Is there a sample php file I can load that shows the MMCache actually working faster ?
    Perhaps people can publish and share there results as well.

    Is there something I did wrong in the install/config ?

    -Thanks

     
    • Mauro Casciari
      Mauro Casciari
      2004-09-30

      Use *ab* (apache benchmark) for the test.

      If your script are too small(size) you can't benefit in performance.

      there are to advantages in use mmcache:

      opcode caching - The script was parsed only the first time it was call then the opcade generated was cached. Next call execute cached opcode.

      content caching - You can cache part of your document using mmcache_get and mmcache_put.

      ex:

      ...

      if ( !($foo = mmcache_get ( $foo_key ) ){
          $foo = create_content();
           mmcache_put( $foo_key, $foo, $ttl);
      }

      // use content foo
      ....

      see the README manual.

      Incastrix

       
    • warwick Shaw
      warwick Shaw
      2004-09-30

      We run as follows:

      uncomment this
      extension="/usr/local/lib/php/extensions/no-debug-non-zts-20040412/mmcache.so"

      leave the rest of the mmcache lines commented out.

      we get nearly double the pages served this way.

      Also try a build with the code from cvs.

      Warwick

       
    • Xuefer
      Xuefer
      2004-11-17

      iirc, mmcahce don't separate read lock and write lock, all process read it 1 by 1, not concurrently
      this maybe the problem.

       
    • What is your configuration in php.ini?