sleed Posted January 4, 2015 Report Posted January 4, 2015 eAccelerator - PHP Cacher- eAccelerator este indicat pentru a creste performantele web-serverului dumneavoastra, pentru a optimiza procesele php-ului.- Dupa parerea mea, este peste APC si XCACHE.- Mai multe detalii aici : eAccelerator - Wikipedia, the free encyclopedia1) Instalare dependinte pentru a putea configura eAcceleratorul [ Debian/Ubuntu ] : apt-get install php5-dev make gcc build-essential2) Downloadam eAccelerator & configuram : cd /varwget -q https://github.com/eaccelerator/eaccelerator/tarball/mastermv master eacc.tar.gztar -zxvf eacc.tar.gz__________________________________________________________cd $(ls -ld *eacc*/|awk '{ print $9 }')phpize./configuremakemake installmkdir -p /var/cache/eaccchmod 777 /var/cache/eacccd /etc/php5/conf.d/_____________________________________________________Apoi adaugam in : /etc/php5/conf.d/eaccelerator.ini URMATOARELE : extension="eaccelerator.so"eaccelerator.shm_size="48"eaccelerator.cache_dir="/var/cache/eacc"eaccelerator.enable="1"eaccelerator.optimizer="1"eaccelerator.check_mtime="1"eaccelerator.debug="0"eaccelerator.shm_max="0"eaccelerator.shm_ttl="0"eaccelerator.shm_prune_period="0"eaccelerator.shm_only="0"eaccelerator.compress="1"eaccelerator.compress_level="9"/etc/init.d/apache2 restartNota : Am comparat rezultatele obtinute de la APC, Xcache si eAccelerator si se pare ca eAccelerator a iesit castigator, cu putin peste APC [Alternative PHP Cache]. Quote
sleed Posted January 4, 2015 Author Report Posted January 4, 2015 Mai degraba, pe un web accelerator, un reverse proxy, ar merge de minune. Nginx + apache + postgresql + eacc, un mic tweak la kernel si cam aia e.. Ar trebui sa nu iti mai crape la 10 visitatori / s ) Quote
black_death_c4t Posted January 4, 2015 Report Posted January 4, 2015 eacc nu face caching ? e ok sa mai ai inca o chestie in fata care sa faca tot caching ? @aelius? Quote
deepdns Posted January 4, 2015 Report Posted January 4, 2015 (edited) Nu recomand, mai bine cum a zis :nginx + varnish ?... la varnish o sa te cam futa mod rewrite dar cine cunoaste merge pe mana lui...sau in ultima instanta nginx + clasicul apache, de asta pana si cloudflare se bazeaza pe nginx ca doar nu is prosti , asa ca vedetiva de treaba cu modulele de apache, lasatil curat ca e mai bine. Edited January 4, 2015 by deepdns Quote
caii Posted January 4, 2015 Report Posted January 4, 2015 Mai degraba, pe un web accelerator, un reverse proxy, ar merge de minune. Nginx + apache + postgresql + eacc, un mic tweak la kernel si cam aia e.. Ar trebui sa nu iti mai crape la 10 visitatori / s )Mie mi se pare complicata combinatia de nginx+apache, ca sa nu mai spun de cei care mai baga si un varnish in fata. Cu cat mai multe layere, cu atat mai greu de descoperit problema daca crapa cate ceva. Cu apache cred ca e insesizabil un tweak la kernel daca il folosesti doar pentru webserver, iar migrarea catre nginx nu e asa grea incat sa fii nevoit sa folosesti apache+nginx. APC mi s-a parut peste eAccelerator, cu cache_dir mutat intr-un /tmp sa poti profita de RAM. Quote
deepdns Posted January 4, 2015 Report Posted January 4, 2015 root@cservice:/etc/nginx# apachectl -lCompiled in modules: core.c mod_log_config.c mod_logio.c prefork.c http_core.c mod_so.croot@cservice:/etc/nginx#root@cservice:/etc/nginx# netstat -ant | awk '{print $6}' | sort | uniq -c | sort -n 1 Foreign 1 established) 9 LISTEN 108 ESTABLISHED 390 TIME_WAITroot@cservice:/etc/nginx#root@cservice:/etc/nginx# netstat -an | wc -l507root@cservice:/etc/nginx#Architecture: x86_64CPU op-mode(s): 32-bit, 64-bitCPU(s): 24Vendor ID: GenuineIntelCPU family: 6Model: 62Stepping: 4CPU MHz: 2599.873Virtualization: VT-xroot@cservice:/etc/nginx#root@cservice:/etc/nginx# free total used free shared buffers cachedMem: 131072 126988 4084 0 0 28420-/+ buffers/cache: 98568 32504Swap: 65536 34376 31160root@cservice:/etc/nginx#lejer 150 in orice secunda si asta pe cel mai prashtie' VPS posibil cu 15$/an doar cu apache + nginx Quote