zendtech / ZendOptimizerPlus

Other
915 stars 142 forks source link

please make the cachedir configureable #60

Closed thelounge-zz closed 11 years ago

thelounge-zz commented 11 years ago

i recebtly started to test zendoptimizerplus with my own RPM on Fedora 18 and was a little bit shocked that /tmp is hardcoded - depending on the environment this maybe tmpfs with is no good place for mmap or simply is no intentet for cache-files

currently my hack is to include a patch in my RPM-SPEC but that's a dirty solution

--- zendoptimizerplus-7.0.0/zendoptimizerplus-7.0.0/zend_shared_alloc.c 2013-03-04 13:02:03.000000000 +0100 +++ zendoptimizerplus-7.0.0-patched/zendoptimizerplus-7.0.0/zend_shared_alloc.c 2013-03-11 12:38:49.323387043 +0100 @@ -38,7 +38,7 @@

include "sys/mman.h"

endif

-#define TMP_DIR "/tmp" +#define TMP_DIR "/var/cache/zendoptimizer"

define SEM_FILENAME_PREFIX ".ZendSem."

define S_H(s) g_shared_alloc_handler->s

dstogov commented 11 years ago

TMP_DIR is used only for a lock file.

thelounge-zz commented 11 years ago

Am 11.03.2013 14:09, schrieb Dmitry Stogov:

TMP_DIR is used only for a lock file.

— Reply to this email directly or view it on GitHub https://github.com/zend-dev/ZendOptimizerPlus/issues/60#issuecomment-14712202

uhm and where is the mmap-file?

i am missing a counterpart for apc.mmap_file_mask = /var/cache/apc/apc.XXXXXX

httpd 10503 root mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 10503 root 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 11890 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 11890 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 11937 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 11937 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 11955 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 11955 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 11959 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 11959 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 12067 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 12067 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 12119 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 12119 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 12125 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 12125 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 12146 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 12146 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 12151 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 12151 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted) httpd 12775 apache mem REG 9,1 133304 133894 /usr/lib64/php/modules/ZendOptimizerPlus.so httpd 12775 apache 11u REG 9,1 0 1574374 /var/cache/zendoptimizer/.ZendSem.bkblwc (deleted)

dstogov commented 11 years ago

mmap(0, requested_size, PROT_READ | PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);

O+ uses anonymous mapping.

thelounge-zz commented 11 years ago

OK, thank you! BTW benchmarks compared APC/ZendOptimzer on the same machine to a CMS-page are impressive


Zend Optimizer: Concurrency Level: 100 Time taken for tests: 929.985 seconds Complete requests: 500000 Failed requests: 50399 Write errors: 0 Total transferred: 16815888676 bytes HTML transferred: 16602388676 bytes Requests per second: 537.64 #/sec Time per request: 185.997 ms Time per request: 1.860 [ms](mean, across all concurrent requests) Transfer rate: 17658.11 [Kbytes/sec] received


APC: Concurrency Level: 100 Time taken for tests: 1035.094 seconds Complete requests: 500000 Failed requests: 50057 Write errors: 0 Total transferred: 16815889682 bytes HTML transferred: 16602389682 bytes Requests per second: 483.05 #/sec Time per request: 207.019 ms Time per request: 2.070 [ms](mean, across all concurrent requests) Transfer rate: 15865.00 [Kbytes/sec] received