#20 Improve cache page?

open
nobody
None
5
2003-06-20
2003-06-20
Anonymous
No

Hi,

I made a benchmark:

a php-page is 49 kb in size and benchmarked
by the following:

a) the php-output is stored to /cache/index.htm
(as a static webpage). This results in: 2552
downloads/second

b) the output is stored in SHM via mmcache_cache_page
This results in: 1153 downloads/second

I know, this is much faster than parsing / executing
the php-source!

But do you think there is a possibility that mmcache
can directly suppress php before it is even called
and serve the content directly to the client resulting
in ~ 2000 till 2500 downloads / second?

Maybe mmcache can directly deal with Apache without
even asking php? When the requested page is in shm ,
mmcache could give it to apache and php.so is never
involved -> maybe this makes the 1500 downloads/sec
difference?

Thank you!

Discussion

  • Dmitry Stogov

    Dmitry Stogov - 2003-06-21

    Logged In: YES
    user_id=124551

    I am thinking about this. But usualy content caching are
    depended on different conditions (GET,POST,COOKIE,SESSION
    and SERVER variables) that can't be checked before PHP start.

    I am still thinking.

     
  • Nobody/Anonymous

    Logged In: NO

    Hi,

    I think it would work this way:

    But it is probably very difficult to create an apache-module.
    mmcache.so is run by apache instead of libphp4.so and
    mmcache.so loads libphp4.so

    Then mmcache.so decides what to do.

    Apache

    --->

    MMCACHE.SO

    --cached--> answer directly

    --not-cached--> ask libphp4.so

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks