Jump to content

Questions on memcached

Recommended Posts


I am moving from Xcache to memcached for storing variables. A few questions:

1. Is this a smart move, performance-wise?

2. What is the recommended cache size? I am leaving at the default of 64 MB.

3. Is it possible for IPB to connect to memcached using a Linux socket instead of IP address for best performance? If so, how to configure this on conf_global.php?

On memcache I know I just need to add the following lines in /etc/memcached.conf and make sure /var/run/memcached is set for user nobody:

-s /var/run/memcached/memcached.sock
-a 0766

Thanks in advance.



Link to comment
Share on other sites


I added to conf_global.php:

$INFO['use_memcache'] = '1';
$INFO['memcache_server_1'] = '';
$INFO['memcache_port_1'] = '11211';

I can telnet to memcached, however it doesn't seem to be used, as both hits and misses are at "0":

STAT pid 3351
STAT uptime 1623
STAT time 1424126296
STAT version 1.4.13
STAT libevent 2.0.19-stable
STAT pointer_size 64
STAT rusage_user 0.028001
STAT rusage_system 0.008000
STAT curr_connections 5
STAT total_connections 8
STAT connection_structures 6
STAT reserved_fds 20
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 0
STAT get_misses 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 105
STAT bytes_written 3128
STAT limit_maxbytes 67108864
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT expired_unfetched 0
STAT evicted_unfetched 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT evictions 0
STAT reclaimed 0

Please advise.


Link to comment
Share on other sites

You can simple start the service.

service memcached start

Thank you! memcached is running now. :)

You're awesome!

I personally always perform a reboot after changing this kind of configuration, to make sure everything is working as expected. This way I don't have to worry if my hosting company reboots the server for any reason.

Yeah, a server reboot once in a while is really useful! :)

Link to comment
Share on other sites

@Gabriel Torres you can leave it that way. You have 99% of Hit Rate which is excellent.

I have been testing IPS 4.0 and memcached with it, and if you enable Page Cache for Guest you will need to raise that value. With this, we can have Guest smashing our site, and they will not touch the Database hehe


Just a thing i have noticed now views your image. You are using Memcached 1.4.13 which is a very old version from 2012.
I encourage you to update to 1.4.22.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...