Page 1 of 2 1 2 LastLast
Results 1 to 15 of 21

Installing Xcache on your server

This is a discussion on Installing Xcache on your server within the Member Articles forums, part of the Focus on Members category; Not meant to be comprehensive but I did want to provide the instructions for installing xCache on your server to ...

  1. #1
    Member
    Real Name
    Rich
    Join Date
    Sep 2007
    Location
    Stafford, VA
    Posts
    44
    Liked
    0 times

    Installing Xcache on your server

    Not meant to be comprehensive but I did want to provide the instructions for installing xCache on your server to take advantage of vBSEO's features to use this cache system. After trying a couple of the other cache systems, I found that this one worked without causing httpd to regularly crash (something eAccelerator kept causing).

    My server is an x686 with CentOS linux running on it. Some of your file locations might be different (or settings in php.ini) but these locations were exactly were mine were located.

    Log into root and create a directory called src and browse to it
    Code:
    ~/src $
    get the latest version of xcache (in this case 1.2.1 and untar/gunzip it:
    Code:
    ~/src $ wget http://xcache.lighttpd.net/pub/Releases/1.2.1/xcache-1.2.1.tar.gz
    ~/src $ tar -zxf xcache-1.2.1.tar.gz
    Browse to the xcache directory and follow these steps to install:
    Code:
    ~/src $ cd xcache
    ~/src/xcache $ phpize
    ~/src/xcache $ ./configure --enable-xcache
    ~/src/xcache $ make
    ~/src/xcache $ su
    ~/src/xcache $ make install
    Now you need to edit your php.ini file. If you have Zend installed then it's in the Zend subdirectory (/usr/local/Zend/etc for me) but there are also shortcuts to the php.ini file usually located in /usr/local that you can edit.

    Now, you'll see a number of different Xcache settings to add to your php.ini file. This is what works for me. Note that I have a pretty large forum (about 500K posts). The "trick" is to get your xcache size sufficiently large to avoid OOM's. Play around with the size until you don't get any OOM's. Also, in the documentation, it won't mention that you need to have a var size but this is required or you'll get some strange errors with vBSEO if you don't have a var.size established. My var.size is much smaller than the xcache size but both are optimum for my site.

    Here is my config (I place this *above* my calling of the Zend optimizer in my php.ini file):
    Code:
    [xcache-common]
    zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20020429/xcache.so
    ; required for >=php5.1 if you turn XCache on
    auto_globals_jit = Off
    [xcache.admin]
    xcache.admin.user = "admin"
    ; paste the output of md5("password") below
    xcache.admin.pass = "******"
    [xcache]
    xcache.shm_scheme = "mmap"
    xcache.size = 140M
    xcache.count = 2
    xcache.slots = 1K
    xcache.readonly_protection = Off
    xcache.mmap_path = "/dev/zero"
    xcache.stat = On
    xcache.cacher = On
    xcache.ttl = 3600
    xcache.gc_interval = 300
    ; same as aboves but for variable cache
    xcache.var_size = 2M
    xcache.var_count = 2
    xcache.var_slots = 1K
     
    ; default ttl
    xcache.var_ttl = 3600
    xcache.var_maxttl = 7200
    xcache.var_gc_interval = 300
    A few admin notes:

    You don't have to specify an admin password but I recommend it. Pick a password and then use an MD5 generator to fill in this field (here is a free one: MD5 generator - Calculate MD5 for the typed string.)

    Browsing to your xcache status is then as simple as uploading your files from the downloaded file above into a web addressable space. Download that tar.gz file above (xcache-1.2.1.tar.gz) to a place on your computer where you can extract it and upload the directory with the admin tools to a subdirectory on your forum's page for instance. Alternatively, you can use some linux commands to move the directory in the ~/src/xcache directory to a space where your web space is. I have mine at: http://www.forumurl.com/xcache so it's easy to get to)

    I then use the results (particularly the OOM to see how it's going). If you have a small forum you can probably get away with much smaller than 140M. Also, keep in mind that my xcache.count=2 and xcache.var.count=2 settings refer to the number of CPU's I have so set that accordingly for your site.

    I hope this was not too obscure. I'm trying to save you from some addtional time this took me.

    One last thing - after you've gotten all of this set up, I recommend installing this additional mod: datastore cache to XCache - boost your vBulletin - vBulletin.org Forum

    I found that it only affected the xcache.var.size by about 1MB on my site (changed from 1MB to 2MB after installing it) but the performance benefit was really good. Putting this mod together with the vBSEO mod has really increased performance.
    Rich, USMC Officer, WebsiteMaven

  2. #2
    Member mykkal's Avatar
    Real Name
    Michael McKoy
    Join Date
    Jul 2007
    Location
    Atlanta, GA
    Posts
    37
    Liked
    1 times

    Question What exactly is Xcache

    I mean...what does Xcache do? How will my site benefit?

  3. #3
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    it's a php caching solution. saves your server from compling the php all the time.

    I've found it to be buggy, and crashy. i've removed it.

  4. #4
    Member mykkal's Avatar
    Real Name
    Michael McKoy
    Join Date
    Jul 2007
    Location
    Atlanta, GA
    Posts
    37
    Liked
    1 times
    I understand what a cache is. So does it increase performance or cuase problems?

  5. #5
    Junior Member
    Real Name
    Nneel
    Join Date
    Jun 2006
    Posts
    28
    Liked
    0 times
    Quote Originally Posted by mykkal View Post
    I mean...what does Xcache do? How will my site benefit?
    it will help u to save bandwidth,reduce page loading time,reduce server load,boost ur php site performance..

    using vbdatastore- it will reduce ur sql query
    Quote Originally Posted by mykkal View Post
    I understand what a cache is. So does it increase performance or cuase problems?
    using it been 1yrs..never had any problem...it works farmore better than eAcc.It really helping me out.......helped out many satisfied user

  6. #6
    vBSEO.com SysAdmin Danny Bembibre's Avatar
    Real Name
    Daniel Bembibre Gude @dbembibre
    Join Date
    Mar 2007
    Location
    Madrid (Spain)
    Posts
    646
    Liked
    13 times
    Blog Entries
    20
    Never compile as root or configure as root, only make install need be maked as root user.
    vBSEO Success Story: bmwfaq.com 95% indexed in yahoo, 85% indexed in google and straight up and 10% indexed in bing

  7. #7
    Member PossumX's Avatar
    Real Name
    Possum
    Join Date
    Oct 2007
    Location
    CT
    Posts
    41
    Liked
    2 times
    I've got it installed along with vbdatastore and it works quite well. Took some tweaking with vBSEO and using the var cache, but I got it, and I am very happy with the differential (even though my traffic is nominal compared to many others, but give me time)
    NBSSportfishing.com Sportfishing Forums | Saltwater Fishing

  8. #8
    Junior Member
    Real Name
    Serkan
    Join Date
    Jan 2007
    Posts
    27
    Liked
    0 times
    I have been searching for several hours and could't decide xcache.var_size until I read this thread. You helped me so much. Thank you.

  9. #9
    Junior Member
    Join Date
    Nov 2005
    Posts
    24
    Liked
    0 times
    yep exactly... was getting the xcache.var_size = 0 error and it got me here. just wondering y lighty people never mentioned abt the size values in their manual..

    installed the datastore mod( vb.org) as well.
    thanks mate.

  10. #10
    Senior Member f4vn's Avatar
    Real Name
    Lam AJ
    Join Date
    Nov 2007
    Posts
    107
    Liked
    5 times

  11. #11
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    I just build it from the source on the XCache website. Everything works but i can't get links in the by colum to my users profiles on my forum home page to rewrite correctly when xcache is enabled in vbseo. turning a blind eye to the urls not being writen i do say the site feels more snappy. Anyone else with this problem?

  12. #12
    Senior Member amenadiel's Avatar
    Real Name
    Felipe CHW
    Join Date
    Feb 2007
    Location
    Santiago, Chile
    Posts
    168
    Liked
    0 times
    where are the caché files stored? I was thinking in mounting xcache on a tmpfs, but I can't find them!

    Perhaps they are already loaded in RAM?

  13. #13
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    it is a ram engine.

  14. #14
    Senior Member amenadiel's Avatar
    Real Name
    Felipe CHW
    Join Date
    Feb 2007
    Location
    Santiago, Chile
    Posts
    168
    Liked
    0 times
    Ok that makes sense :blush

  15. #15
    EGS
    EGS is offline
    Senior Member EGS's Avatar
    Real Name
    Justice McCay
    Join Date
    May 2008
    Location
    New Jersey
    Posts
    117
    Liked
    0 times
    Blog Entries
    1
    Not to crash a thread, but I've heard that eAccelerator is better and faster than XCache.

    Can anyone confirm? I've read a few reviews and comparisons between the two..

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Server Crash: Restored Forum & vbSEO
    By fernandose in forum Troubleshooting
    Replies: 3
    Last Post: 08-23-2007, 12:41 PM
  2. $$ Full vBulletin 3.6.7 installing help on new server $$
    By Vibu in forum Off-Topic & Chit Chat
    Replies: 3
    Last Post: 06-01-2007, 11:28 PM
  3. New class of semi-dedicated server
    By Doug Nelson in forum Off-Topic & Chit Chat
    Replies: 2
    Last Post: 05-09-2007, 09:40 PM
  4. Suggestion for a server problem
    By Mert Gökçeimam in forum Off-Topic & Chit Chat
    Replies: 1
    Last Post: 05-03-2006, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •