From: Alex B. <en...@tu...> - 2001-08-03 01:06:18
|
> Hi Alex, > >> Right now, I'm generating page cache ids with: >> -Request URI (that includes the get string) >> -A defined variable name (from the page definition) >> -The value of that variable. > > Hmm. What about POST parameters and sessions? So if a resultpage for sess1 > is diferent from one of sess2 because it depends on userdata AND post data. Well, the idea being that you don't want to cache pages that are session specific, or post specific. You could end up with a _huge_ set of cache files :) I'm thinking more for, say, a large tree of html documents generated from xml with xsl: you want to do the "render" once and then be able to serve it out to 8million people, etc. This isn't intended for form pages, session specific stuff, etc, as the files are stored in the filesystem, unencrypted. (me = security freak :) > But the script is the same, e.g. bc/user/htdocs/userinfo.php. > I'm not sure if it is neccessary to consider that. Currently I'm very > satisfied with Zend Cache but It is great and important to have a free > alternative in bc. But I hope this can be switched off !? This cache has nothing to do with zend's caching - it only caches page output - so if you have cached bc php, you'll see even _more_ of a performance jump. Zend cache does the actual bytecode... Actually - andi, do you have performance numbers for r2 on a zend cache-enabled box? I'd love to see 'em :) Also, note that you have to _explicitly_ request a page be cached, not the reverse. (this will be the same for modules) So there isn't really anything like "turn it off" because it isn't "on" unless you specifically request it :) >> I'll check it in as soon as I've cleaned up some of the more ick debug >> things I have floating around in it. > Ah cool. BTW: The chache example bc/user/htdocs/cache.php is missing in CVS > but included in Makefile. Really? Oh!, crap. I know what that is. I'll do a synch right now.. danke :) _alex > _andi > > > > _______________________________________________ > binarycloud-general mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-general > -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: Alex B. <en...@tu...> - 2001-08-03 16:34:55
|
> Hi Alex, > >>> Hmm. What about POST parameters and sessions? So if a >>> resultpage for sess1 >>> is diferent from one of sess2 because it depends on userdata >>> AND post data. >> >> Well, the idea being that you don't want to cache pages that are session >> specific, or post specific. You could end up with a _huge_ set of cache >> files :) > > Hmm, that's right. But what is with the areas of a sessioned page that are > "static" navigation etc. that depends not on session/post data? I guess the > per module cache applies here? Module "navigation_bar" (static, cached), > module "signup_process" (dynamic, !cached) ? Am I right? Exactly: for things like that, you'd cache the module output, not the page output. I think people will end up caching module output more than "entire" page output - it's more useful. >> This isn't intended for form pages, session specific stuff, etc, as the > files are stored > in the filesystem, unencrypted. > Indeed, would be a HUGE security risk. > > Ok, I got it now :-) > >> This cache has nothing to do with zend's caching - it only caches page >> output - so if you have cached bc php, you'll see even _more_ of a >> performance jump. Zend cache does the actual bytecode... Actually >> - andi, do >> you have performance numbers for r2 on a zend cache-enabled box? >> I'd love to >> see 'em :) > There is a benchmark utility shipped with Zcache. I just run the standard > page of current bc cvs through it. And yeees, I am very surprised. > My average performance boost of my projects (with or without db access) is > around 200%, for bc... > > HARR HARR HARR MORE POWER! (see second mail) heheheheh cool! >> So there isn't really anything like "turn it off" because it isn't "on" >> unless you specifically request it :) > Very fine :-) > > So for a big sime on your face, read the post about "Zend Cache". k :) _a -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: Andreas A. <a.a...@th...> - 2001-08-03 10:37:13
|
Hi, I just benched binarycloud with/without ZendCache in comparison with other scripts. And the results are surprising. Actually with Zend Cache enabled I gain huge performance boosts for sites without database access. Read on. --------------------------------------------------------------------------- Setup --------------------------------------------------------------------------- I ran the benchmarks on my devel box at home (crappy old box, with lots of stuff running (sshd, samba......)): * Intel Pentium 100 * 128MB PC100 RAM * 15GIG IBM HDD (IDE) * Linux Mandrake 8 (Kernel 2.4.3) * Apache 1.3.19 * MySQL 3.23.36 * PHP4.0.4pl1 (Zend Launch Pad Edition) * ZendOptimizer 1.1.0 * ZendCache 1.1.0 PHP compile options (launchpad - out of the box) ./configure --prefix=/Zend --with-apxs=/usr/local/apache/bin/apxs --disable-debug --with-config-file-path=/usr/local/Zend/etc --without-db2 --disable-sysvsem --disable-sysvshm --enable-xml --enable-wddx --with-mysql --with-gd=shared,/usr/local/gd --enable-gd-imgstrttf --with-jpeg-dir=/usr/local/jpeg --with-ttf=/usr/local/freetype --with-t1lib=/usr/local/t1lib --with-pgsql=shared,/usr/local/postgres --with-imap=shared,/usr/local/imap --with-ldap=shared,/usr/local/openldap --with-ibm-db2=shared,/usr/local/db2' --with-oci8=shared,/usr/local/oracle Zend Cache: - validate timestamps is enabled (so chache checks everytime if script changed, will perform even better if this is disabled in production) - reserved cache memory: 32Megs --------------------------------------------------------------------------- Benched scripts --------------------------------------------------------------------------- [1] Thyrell homepage www.thyrell.de/home/index.php A very simple script with sessions (language-detect) and smarty as template engine (smarty cache disabled). It is just one template with basic replacing work to do for the tpl engine (no section loops etc). No Database access. [2] Database script (huge) Manage script for category administation (unlimited depth for cats). Script is currently not r2 based [but r2 friendly and after the entitity/database stuff is out, it will be ported:)]. MySQL Database, about 20 entries for categories with a depth of 4. This script is part of a more complex community application administrtion I'm currently working on. So much things are not optimized and It's overloaded with includes that will be removed/optimized. Escpecially the layout for the admin interface is very grapic intensive. So currently the loading time is very long. Basically: - Request class, session class of r2 - Metabase - Smarty - PEAR for error handling (exceptions and formwarnings) - The "manager" responsible for db-access uses recrusion to look up the categories (in this example depth = 4). It also currently executes 2 queries per query (COUNT(*))(Few template chunks with descent template logic (looping over arrays). - Advanced browser scripting (mostly IE5 behaviours). [3] binarycloud: index.php The current (2001-03-08, 10am GMT) cvs r2/binarycloud/build/en/index.php. No changes. --------------------------------------------------------------------------- The results --------------------------------------------------------------------------- I ran the benches doubletwice and the results differ slightly. [1] Thyrell homepage ------------------------- With cache Starting benchmark for http://dev.thyrell.corp/home/index.php (5 tries)... Try 1: 6.68 req/s Try 2: 6.90 req/s Try 3: 6.82 req/s Try 4: 6.79 req/s Try 5: 6.77 req/s 6.792 requests/second from 5 tries Without cache Starting benchmark for http://dev.thyrell.corp/home/index.php (5 tries)... Try 1: 0.98 req/s Try 2: 0.60 req/s Try 3: 0.94 req/s Try 4: 0.86 req/s Try 5: 0.60 req/s 0.796 requests/second from 5 tries -> Speedup: 753.27% [2] Database script (huge) ------------------------------- With cache Starting benchmark for http://pubtour.thyrell.corp/manage/common/categories/index.php (5 tries)... Try 1: 0.48 req/s Try 2: 0.87 req/s Try 3: 0.36 req/s Try 4: 0.28 req/s Try 5: 0.28 req/s 0.454 requests/second from 5 tries Without cache Starting benchmark for http://pubtour.thyrell.corp/manage/common/categories/index.php (5 tries)... Try 1: 0.29 req/s Try 2: 0.28 req/s Try 3: 0.27 req/s Try 4: 0.27 req/s Try 5: 0.27 req/s 0.276 requests/second from 5 tries -> Speedup: 64.49% [3] binarycloud ------------------ With cache Starting benchmark for http://bc.thyrell.corp/index.php (5 tries)... Try 1: 5.54 req/s Try 2: 4.58 req/s Try 3: 4.55 req/s Try 4: 4.54 req/s Try 5: 4.12 req/s 4.666 requests/second from 5 tries Without cache Starting benchmark for http://bc.thyrell.corp/index.php (5 tries)... Try 1: 1.21 req/s Try 2: 2.10 req/s Try 3: 1.98 req/s Try 4: 1.04 req/s Try 5: 1.04 req/s 1.474 requests/second from 5 tries -> Speedup: 216.55% Resumee: --------------------------------------------------------------------------- IMHO, the ZendCache is VERY groovy :-) But it's also a expensive pice of software. So for performance critical and larger business applications it is a must, I think. The performance boosts for non-database sites is great. And with the binarycloud cache the pages will become real speed monsters, I guess :-) More detailed information is published in Zend and Techmetrix whitepapers. You can download them from Zend.com or with some screenshots of the above tested sites from: http://www.thyrell.de/info/downloads/cache_bench.zip. Especially the behviour of database accesss with zend cache is interesting. According to the paper is error free with cache (with their setup), but there are errors without. Andi |