Jump to content
sleed

[TUTORIAL] Instalare eAccelerator [PHP Cacher]

Recommended Posts

Posted

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 encyclopedia

1) Instalare dependinte pentru a putea configura eAcceleratorul [ Debian/Ubuntu ] :

 apt-get install php5-dev make gcc build-essential

2) Downloadam eAccelerator & configuram :

cd /var

wget -q https://github.com/eaccelerator/eaccelerator/tarball/master

mv master eacc.tar.gz

tar -zxvf eacc.tar.gz

__________________________________________________________

cd $(ls -ld *eacc*/|awk '{ print $9 }')

phpize

./configure

make

make install

mkdir -p /var/cache/eacc

chmod 777 /var/cache/eacc

cd /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 restart

Nota : 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].

Posted

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 :)))

Posted (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 by deepdns
Posted
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.

Posted



root@cservice:/etc/nginx# apachectl -l
Compiled in modules:
core.c
mod_log_config.c
mod_logio.c
prefork.c
http_core.c
mod_so.c
root@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_WAIT
root@cservice:/etc/nginx#


root@cservice:/etc/nginx# netstat -an | wc -l
507
root@cservice:/etc/nginx#


Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 24
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Stepping: 4
CPU MHz: 2599.873
Virtualization: VT-x
root@cservice:/etc/nginx#


root@cservice:/etc/nginx# free
total used free shared buffers cached
Mem: 131072 126988 4084 0 0 28420
-/+ buffers/cache: 98568 32504
Swap: 65536 34376 31160
root@cservice:/etc/nginx#


lejer 150 in orice secunda si asta pe cel mai prashtie' VPS posibil cu 15$/an doar cu apache + nginx

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...