[Resolved] XCache not working...

Status
Not open for further replies.

asabet

Active Member
#1
I have 5 vBulletin forums on a single dedicated server with 8 cores. XCache is installed via cPanel/Easyapache and at some point in the past was working for me.

Recently I installed Litespeed Webserver (4-core) as well as a cPanel Varnish plugin for Litespeed made by Unixy. My forums have never been faster, my server load has never been lower (eg, currently shows "Load Averages: 0.65 0.85 0.83"), and I am very pleased. Still, I would love even more speed.

Now when I login to my XCache admin page, I can see that XCache is no longer caching any PHP. It is only caching var data. Can anyone give me some pointers in terms of how to get XCache working again?

Addendum: I don't know if it matters, but I have PHP suEXEC disabled in my Litespeed configuration since I read that I should keep this disabled if using XCache. I read elsewhere that for opcode caching I need to turn on suEXEC daemon mode. Changing the setting for lsphp5 run on startup to suEXEC daemon didn't have any obvious effect on XCache. Do I need to enable PHP suEXEC for that suEXEC daemon mode setting to have an effect? Or is all of this unrelated to my situation?
 
Last edited:

NiteWave

Administrator
#2
>Do I need to enable PHP suEXEC for that suEXEC daemon mode setting to have an effect?
no need. recommend to use suEXEC daemon mode in your case which xcache should work better

>I can see that XCache is no longer caching any PHP. It is only caching var data
create a phpinfo page. check the xcache settings in it. see if opcode cache is disabled purposely
 

asabet

Active Member
#4
I changed xcache.size to 1GB and xcache.count to 4 in php.ini. Do I need to rebuild matching LSPHP?

Addendum: It's working now! (without rebuilding LSPHP) Thanks for your help!

Couple more questions:

-Why is suEXEC daemon mode advantageous to me? I thought it was for shared environments?

-With 8 cores total and LSWS 4-core version, should I set xcache.count to 4 or 8?
 
Last edited:

asabet

Active Member
#6
From the xcache comment, you should set it to your CPU core count, which is 8 :)
Thanks! So here is what my XCache Admin page looks like after running for a few minutes. Is it normal to have such low numbers for "Cached" with this many "Hits"? Also, what can I do about "Clogs"?

 

semprot

Well-Known Member
#7
Thanks! So here is what my XCache Admin page looks like after running for a few minutes. Is it normal to have such low numbers for "Cached" with this many "Hits"? Also, what can I do about "Clogs"?
I am new to xcache too (just installed it today).
This far i only watch if the "percent graph" / "% used" of each cpu & var caching (the most bottom) is not 100% (full).

I use xcache 3.2.0, you use 3.1.0.
I don't have "clogs" column here.

Maybe litespeed staff can explain to us about what each column means :)

Update : you can try to put your mouse over the column name, in 3.2.0 xcache admin page there is explanation to each column :)
 
Last edited:

NiteWave

Administrator
#8
there is a xcache demo page: http://xcache.lighttpd.net/demo/cacher/

after playing around there for a while,
php#0: Hits(12.845) Cached(90)
php#1:...
php#7:

mouse hover on "Cached" -- "Number of entries stored in this cache"
so:
there are total 8 caches(php#0 ... php#7), which defined by xcache.count=8
there are 90 different php scripts' opcode cache stored in php#0, cache hits is 12,845 in php#0
...

since this thread's title is "XCache not working...", so this thread will be marked as "[solved]".
 

asabet

Active Member
#9
since this thread's title is "XCache not working...", so this thread will be marked as "[solved]".
Thanks for your help. Couple more questions:

-Why is suEXEC daemon mode advantageous to me? I thought it was for shared environments?

-With 8 cores total, should I still set xcache.count to 8 even though I am using LSWS 4-core edition?
 
#10
for suEXEC daemon mode, please refer:
http://blog.litespeedtech.com/2012/09/11/lsws-4-2-introduces-php-suexec-daemon-mode/
it works under any environment, not only shared host, and regardless php suEXEC mode enabled or disabled

xcache.count, I don't understand it very much. it's relating to php, no direct relate to lsws.
lsws 4-core: limit litespeed processes number
but this will not limt php process which can use all available cores
this is what I'd clarify.
 

semprot

Well-Known Member
#11
there is a xcache demo page: http://xcache.lighttpd.net/demo/cacher/

after playing around there for a while,
php#0: Hits(12.845) Cached(90)
php#1:...
php#7:

mouse hover on "Cached" -- "Number of entries stored in this cache"
so:
there are total 8 caches(php#0 ... php#7), which defined by xcache.count=8
there are 90 different php scripts' opcode cache stored in php#0, cache hits is 12,845 in php#0
...

since this thread's title is "XCache not working...", so this thread will be marked as "[solved]".
Just an update, you are correct about the xcache.count.
I just read your reply.
I set to 40, and when i see the xcache admin, only 4 cores have "Hit" stats, the other 36 don't receive hit at all.

Thank you.
 

asabet

Active Member
#12
Just an update, you are correct about the xcache.count.
I just read your reply.
I set to 40, and when i see the xcache admin, only 4 cores have "Hit" stats, the other 36 don't receive hit at all.

Thank you.
I set mine to 8 as you suggested, and all 8 show hits.
 
Status
Not open for further replies.
Top