XCache āļ„āļ·āļ­

āļ„āļ·āļ­ Module Cache Opcode āđƒāļŦāđ‰āļāļąāļš PHP āļāļĨāđˆāļēāļ§āļ„āļ·āļ­ āđ‚āļ”āļĒāļ›āļāļ•āļī PHP āļ—āļģāļ‡āļēāļ™āđāļšāļš Interpreter āļŦāļĢāļ·āļ­āđāļ›āļĨāļŠāļļāļ”āļ„āļģāļŠāļąāđˆāļ‡āđ€āļ›āđ‡āļ™āļ āļēāļĐāļēāđ€āļ„āļĢāļ·āđˆāļ­āļ‡ āđāļĨāđ‰āļ§āļˆāļķāļ‡āļ›āļĢāļ°āļĄāļ§āļĨāļœāļĨāļ„āļģāļŠāļąāđˆāļ‡ āđāļĨāļ°āļŠāļąāđˆāļ‡āļāļēāļĢāļ—āļģāļ‡āļēāļ™ āđāļ•āđˆ XCache āļˆāļ°āļŠāđˆāļ§āļĒāđāļ›āļĨāļ„āļģāļŠāļąāđˆāļ‡āđƒāļŦāđ‰āļ­āļĒāļđāđˆāđƒāļ™āļĢāļđāļ›āļ‚āļ­āļ‡ opcode āđ€āļĄāļ·āđˆāļ­āļĄāļĩāļāļēāļĢāđ€āļĢāļĩāļĒāļāđƒāļŠāđ‰āļ‡āļēāļ™ Script āļŠāļļāļ”āđ€āļ”āļīāļĄ āļāđ‡āđ„āļĄāđˆāļ•āđ‰āļ­āļ‡āđāļ›āļĨāļ„āļģāļŠāļąāđˆāļ‡āļ‹āđ‰āļģāļ­āļĩāļ āļ—āļģāđƒāļŦāđ‰ PHP āļŠāļēāļĄāļēāļĢāļ–āļ—āļģāļ‡āļēāļ™āđ„āļ”āđ‰āđ€āļĢāđ‡āļ§āļ‚āļķāđ‰āļ™ āđāļĨāļ°āđƒāļŠāđ‰ Memory (Ram) āļ™āđ‰āļ­āļĒāļĨāļ‡āļ­āļĩāļāļ”āđ‰āļ§āļĒ

āļ§āļīāļ˜āļĩāļāļēāļĢāļ•āļīāļ”āļ•āļąāđ‰āļ‡ XCache

  • wget http://xcache.lighttpd.net/pub/Releases/2.0.1/xcache-2.0.1.tar.gz
  • tar xzf xcache-2.0.1.tar.gz
  • cd xcache-2.0.1
  • phpize
  • ./configure --enable-xcache
  • make && make install
  • cat xcache.ini >> /usr/local/lib/php.ini
  • vi /usr/local/lib/php.ini
āđ€āļžāļīāđˆāļĄāļāđˆāļ­āļ™ zend
zend_extension = /usr/lib64/extensions/no-debug-non-zts-20060613/xcache.so

āđ€āļŠāđˆāļ™
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
zend_extension=/usr/local/lib/ioncube_loader_lin_5.2.so
zend_extension=/usr/local/lib/ZendOptimizer_5.2.so

āļ›āļĢāļąāļšāđāļ•āđˆāļ‡āļāļēāļĢāļ•āļąāđ‰āļ‡āļ„āđˆāļē Config XCache āļ•āļēāļĄāđ€āļŦāļĄāļēāļ°āļŠāļĄ

[xcache]
; ini only settings, all the values here is default unless explained

; select low level shm/allocator scheme implemenation
xcache.shm_scheme =        "mmap"
; to disable: xcache.size=0
; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
xcache.size  =               60M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count =                 8
; just a hash hints, you can always store count(items) > slots
xcache.slots =                8K
; ttl of the cache item, 0=forever
xcache.ttl   =                 0
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval =           0

; same as aboves but for variable cache
xcache.var_size  =            4M
xcache.var_count =             1
xcache.var_slots =            8K
; default ttl
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300

xcache.test =                Off
; N/A for /dev/zero
xcache.readonly_protection = Off
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path =    "/dev/zero"


; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (without checking open_basedir)
xcache.coredump_directory =   ""

; per request settings
xcache.cacher =               On
xcache.stat   =               On
xcache.optimizer =           Off

[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
xcache.coverager =          Off

; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = ""



xcache.size āļ‚āļ™āļēāļ”āļ‚āļ­āļ‡ cache
xcache.count āļˆāļģāļ™āļ§āļ™ Concurrency āļŦāļĢāļ·āļ­ āļˆāļģāļ™āļ§āļ™āļ‚āļ­āļ‡ CPU Core
xcache.slots āļ‚āļ™āļēāļ” slot āđƒāļ™āļāļēāļĢāđ€āļāđ‡āļš cache

 
  • āļ—āļģāļāļēāļĢ Restart Web Service ( httpd )
/etc/ini.d/httpd restart
  • āļ•āļĢāļ§āļˆāļŠāļ­āļšāļāļēāļĢāļ•āļīāļ”āļ•āļąāđ‰āļ‡ xcache āļˆāļēāļ
php -v
 

āļŠāļēāļĄāļēāļĢāļ–āļ•āļĢāļ§āļˆāļŠāļ­āļšāđ€āļ§āļ­āļĢāđŒāļŠāļąāđˆāļ™ xcache āļĨāđˆāļēāļŠāļļāļ”āļˆāļēāļ
http://xcache.lighttpd.net/pub/Releases/

āđ„āļ­āđ€āļĢāļĩāļĒāļĨāļĨāļĩāđˆāđ‚āļŪāļŠ
āļŠāļģāļŦāļĢāļąāļšāļāļēāļĢāļŠāļ™āļąāļšāļŠāļ™āļļāļ™ āđāļĨāļ°āļŠāđˆāļ§āļĒāđ€āļŦāļĨāļ·āļ­
http://www.ireallyhost.com/support
āļ‚āđ‰āļ­āļāļģāļŦāļ™āļ”āđƒāļ™āļāļēāļĢāđ€āļœāļĒāđāļžāļĢāđˆāļšāļ—āļ„āļ§āļēāļĄ āļ‚āđˆāļēāļ§āļŠāļēāļĢ
** āļšāļ—āļ„āļ§āļēāļĄāļ™āļĩāđ‰āļĄāļĩāļĨāļīāļ‚āļŠāļīāļ—āļ˜āļīāđŒ āđ„āļĄāđˆāļ­āļ™āļļāļāļēāļ•āļīāđƒāļŦāđ‰āļ„āļąāļ”āļĨāļ­āļ āļ—āļģāļ‹āđ‰āļģ āļ”āļąāļ”āđāļ›āļĨāļ‡āļāđˆāļ­āļ™āđ„āļ”āđ‰āļĢāļąāļšāļ­āļ™āļļāļāļēāļ• **
āđ‚āļ›āļĢāļ”āļĢāļ°āļšāļļāđāļŦāļĨāđˆāļ‡āļ—āļĩāđˆāļĄāļē āļšāļĢāļīāļĐāļąāļ— āđ€āļ­āđ‡āļāļ‹āđŒāļ•āļĢāđ‰āļē āļ„āļ­āļĢāđŒāļ›āļ­āđ€āļĢāļŠāļąāđˆāļ™ āļˆāļģāļāļąāļ” / https://www.ireallyhost.com
āļ—āļąāđˆāļ§āđ„āļ›