Jump to content

Questions on memcached


Recommended Posts

Posted

Hi,

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.

Gabriel.

 

Posted

1. - Yes

2. - For IPB3 64Mb is more than enough. With IPS4 probably you will need more. But nothing like installing phpmemcachedadmin and check how much memory is using and then you can tune it.

3. - I don't know. Maybe some expert or staff can explain that.

Posted

1) Yes

2) For ipb 3 even 8mb is fine but you can add 16mb to be sure or even check it daily and adjust it :)

3)You will not get any important improvement.

 

From my benchmarks Zend opcache + Memcache are giving the best results....

Posted

Hi,

I added to conf_global.php:

$INFO['use_memcache'] = '1';
$INFO['memcache_server_1'] = '127.0.0.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
END

Please advise.

 

Posted

After reading this topic, I just realised I don't see my Memcached process running?

I think it stopped running after a reboot?

​Run this:

chkconfig --level 2345 memcached on

That way memcached will start after a reboot.

Posted

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.

Posted

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! :)

Posted

@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.

Posted

Thanks; I installed it using apt-get install memcached. It is not unusual for Debian repositories to be outdated...

Nice to know that IPB 4.0 will cache the page for visitors/guests... This should improve performance a lot.

Archived

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

  • Recently Browsing   0 members

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