Status
Not open for further replies.

Webbstre

Customer
So I'm trying to track down the source of my unusually high server usage. After fiddling with vbShout I started looking at the vbOptimise options. Some were easy to set to a more efficient setting, but two things came up as problems:

1- When trying to switch my attachments to the file system it said that I had 0 attachments with 0 bytes... and below that it said not to finalize if this was the case. Is something wrong? The site has only been live for a day and a half, so I don't know if this is just the freshness or what.

2- I ran the system test and failed one test:
Running Test: Connection to xcache
Test completed successfully
Running Test: Store Cache
Test completed successfully
Running Test: Fetch Cache
Your Opcache Operator extension is functioning, however it is unable to store data. Please check your extension configuration.

Running Test: Flush Cache
Test completed successfully

What do I do about that? Could that be why my server's CPU usage is high? The caches aren't being used?
 
This is typical of XCache, if you're running on the DSO/CGI handler for PHP it can cause this, or if your XCache doesn't have a var_size allocated, without the fetch cache working vB Optimise won't be able to help your forum in any way. Could you post your XCache configuration (from php.ini) here and let me know what PHP handler you use (if you assigned it through things like WHM).
 
Yipes! So that would explain the high cpu usage!

Here are the relative parts of my php.ini file:

zend_extension="/usr/local/dh/apache/template/phpext/ZendExtensionManager.so"
zend_extension="/usr/local/dh/apache/template/phpext/php5-xcache/xcache.so"
zend_extension="/usr/local/dh/apache/template/phpext/zend_optimizer5/ZendOptimizer.so"



[xcache.admin]
xcache.admin.enable_auth = Off




; xcache.admin.pass = md5($your_password)

[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 = 16M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 2
; just a hash hints, you can always store count(items) > slots
xcache.slots = 1K
; ttl of the cache item, 0=forever
xcache.ttl = 3600
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval = 300

; same as aboves but for variable cache
xcache.var_size = 1M
xcache.var_count = 2
xcache.var_slots = 8K
; default ttl
xcache.var_ttl = 300
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

I'm not entirely sure what you mean by handler, but I'm going to guess you are asking about FastCGI or Apache? These settings were all set automatically by my host, Dreamhost, when I turned on XCache for my private server.
 
You're php.ini seems fine, however your var_size is set to 1M (1MB) which is terribly low, for vBO Pro I'd recommend atleast 32MB
Code:
xcache.var_size = 32M

As for your handler, FastCGI can be problematic with Opcachers like XCache and APC, In which case you want to investigate installing Memcache.

If you have any further questions I'll be happy to help :)
 
Thanks! I pumped up the var_size just now and ran the system test, and this time it passed! Let's see if the server load drops now.

Also, any comment on the other problem I mentioned in the OP? Is it safe for me to switch my attachments to files?
 
Hmm, it should be safe. The system that converts them is vBulletin, if unsure I'd recommend contacting vB themselves to see why the conversion isn't detecting any files before converting.
 
Im fairly certain that if it says 0 files with 0 bytes it's okay. It says that "do not finalise if there's any files with 0 bytes" or some shit.

0 bad files = yay xD
 
CGI may break XCache - If XCache is working I'd stick with it, Memcache is only better if a) You can't get XCache/others to work and b) You have several servers and want distributed cache.

If you moved to Memcache you wouldn't notice any speed differences really, they both use your servers RAM :)
 
Thanks. I just realized I was being dyslexic or something about the "the number above should be zero" (I kept thinking it said "the number should be above zero").

I think you may be right about XCache not functioning correctly. I'm going to check with my server guy, but if I can't run Memcached what else would you suggest?
 
So I think you are right, and that even with the php.ini setting fixed it just plain won't keep the cache for long before making it new again. It's technically working right now, but I still see the CPU load get over 100% sometimes. I read a lot online that says XCache doesn't work well with Zend OR fastcgi, so it sounds like what you were saying. Will update you if I get Memcache working and the problem solves itself.

How to people survive on busy vBulletin sites with the built-in caching? I can only guess that it sucks.
 
Let me know how it goes, if you need any info on installing/setting up memcached I'd be happy to help. As for big sites, well they have bigger servers and typically their own server administrators to fine tune services like mysql/apache/nginx/etc.. :)
 
Awesome, you'll need to edit your vBulletin config.php (includes/config.php) and apply Memcache in there where you'd normally allocate any other cacher systems to optimise vBulletins datastore. For now I don't recommend doing that until you've confirmed memcache is working, so for now you've have this in your config:
Code:
//$config['Datastore']['class'] = 'vB_Datastore_Memcached';
$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i]		= '127.0.0.1';
$config['Misc']['memcacheport'][$i]			= 11211;
$config['Misc']['memcachepersistent'][$i]	= true;
$config['Misc']['memcacheweight'][$i]		= 1;
$config['Misc']['memcachetimeout'][$i]		= 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;

Note the first line is commented so it won't be connected to the vBulletin datastore just yet, after that's added to your config.php (you can either add it, or edit what's already in your config.php), simply assign vB Optimise to Memcache then run a system test to see if everythings working. Let me know the results here :) If you'd like to add my MSN contact for faster responses then here it is: deceptor@xevvi.com :)
 
Awesome, I've just added you... and now I have what may be a potentially extremely stupid question:

Did I need to do something in the config file to make VB4 use XCache? I thought I only needed to set it in vbOptimise.
 
Oh? Don't have any friend confirmations, feel free to send me your MSN in a PM :)

As for XCache - you don't need to do anything in config for that to work with vBulletin, only assign it to the datastore if you want it to cache the vBulletin datastore. However it wouldn't work as the vBO test showed it failed (where-as with vBulletin you wouldn't be able to tell it kept failing).
 
Small progress: I figured out how to install the php extension. My problem now is that I can't find where it was installed to so I can make it load.
 
We finally got this working today after installing the memcache php extension and loading it in php.ini correctly :)
 
OK, well this will make me feel stupid, but I get the feeling that nothing had changed for my server resources at all. Still getting extremely high cpu load about once an hour and no difference in the amount of memory being used. If memcache was working, those would change, right? At the very least, even if something else is the source of the cpu usage the memory usages should still go up if memcached is working, right?
 
Status
Not open for further replies.

Similar threads

Top