help with memcached

The memcached server was running but the problem involved associating the memcached server with the PHP Pecl module, which couldn't be installed.

It involved the libmemcached directory being undefined or non-existent and libmemcached and it's dependencies/headers not being installed. I tried installing on my own with trouble - eventually did have my provider do it. I believe it involved an issue with my version of Centos and PHP.

As of now it appears I have memcached and the memcache/memcached modules installed. I have the admin config in my original post. My php snippet test demonstrates that memcached in working. I have checked minify css/fetch public templates as files in admin.php.

However, I can find no indication of better performance or loading times (pagespeed insights, pingdom, analytics, etc). How can I ensure it's properly configured and working? Is there anything else I need to do? I have a feeling it's running on the server but not applying itself to my instance of Xenforo.

Is there any way to test/confirm that caching is working properly on my xenforo installation?
 

Attachments

  • Screen Shot 2015-07-14 at 6.49.22 PM.webp
    Screen Shot 2015-07-14 at 6.49.22 PM.webp
    54 KB · Views: 36
I check it with phpmemcachedadmin ( phpmemcacheadmin - Memcached server admin in php for monitoring and debugging - Google Project Hosting ) in a protected directory. You'll see something like this (no config needed):

phpmemcachedadmin-1.2.0_stats.png


From the commandline you can simply telnet to memcached and run the command stats:
Code:
$ telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
stats
STAT pid 21824
STAT uptime 472251
STAT time 1436952308
STAT version 1.4.21
STAT libevent 1.4.15-stable
STAT pointer_size 64
STAT rusage_user 40.040000
STAT rusage_system 264.890000
STAT curr_connections 26
STAT total_connections 7674
STAT connection_structures 28
STAT reserved_fds 20
...
 
Last edited:
Thanks for the reply, I've installed the program and will play with it a bit. I'm new to this whole area, what are good/bad benchmarks here?

Here is what I'm seeing:

Screen Shot 2015-07-22 at 4.48.21 PM.webp

Shouldn't I be able to track an increase in speed/load time? Why is my "wasted" stat so high?

How can I adjust the file caching times and add new file types to caching?

Previously, after installing the memcached php module, when I attempted to log into the admincp it would automatically reload and not let me log in. I am no longer having that issue but I'm wondering if anyone knows what might have caused it and if there's any way I can assure users aren't having the same login issue.

Also, how does my config look?

Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
            // your memcached server IP /address
            'host' => '127.0.0.1',
          
            // memcached port
            'port' => 11211,
        )
    )
);

Thanks all.
 
Quite frankly they should give recommandation for startup values of memcache instead of telling people "start using memcached" (and hope for the best ?) because in their current implementation, they store stuff in there that is not optimized at all for memcached's default setup.
Quite frankly, people frequently run more than 1 script on a VPS/server that utilizes memcache, so any settings that may be beneficial to XF may be detrimental to those other scripts.
 
Top Bottom