Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Gabriel Torres Posted February 16, 2015 Posted February 16, 2015 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 0766Thanks in advance.Gabriel.
RevengeFNF Posted February 16, 2015 Posted February 16, 2015 1. - Yes2. - 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.
ASTRAPI Posted February 16, 2015 Posted February 16, 2015 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....
Gabriel Torres Posted February 16, 2015 Author Posted February 16, 2015 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 3351STAT uptime 1623STAT time 1424126296STAT version 1.4.13STAT libevent 2.0.19-stableSTAT pointer_size 64STAT rusage_user 0.028001STAT rusage_system 0.008000STAT curr_connections 5STAT total_connections 8STAT connection_structures 6STAT reserved_fds 20STAT cmd_get 0STAT cmd_set 0STAT cmd_flush 0STAT cmd_touch 0STAT get_hits 0STAT get_misses 0STAT delete_misses 0STAT delete_hits 0STAT incr_misses 0STAT incr_hits 0STAT decr_misses 0STAT decr_hits 0STAT cas_misses 0STAT cas_hits 0STAT cas_badval 0STAT touch_hits 0STAT touch_misses 0STAT auth_cmds 0STAT auth_errors 0STAT bytes_read 105STAT bytes_written 3128STAT limit_maxbytes 67108864STAT accepting_conns 1STAT listen_disabled_num 0STAT threads 4STAT conn_yields 0STAT hash_power_level 16STAT hash_bytes 524288STAT hash_is_expanding 0STAT expired_unfetched 0STAT evicted_unfetched 0STAT bytes 0STAT curr_items 0STAT total_items 0STAT evictions 0STAT reclaimed 0ENDPlease advise.
RevengeFNF Posted February 16, 2015 Posted February 16, 2015 Can you post here the results of:cat /etc/sysconfig/memcachedDid you install also a php memcache extention?
Gabriel Torres Posted February 16, 2015 Author Posted February 16, 2015 Did you install also a php memcache extention?Ops. no. Maybe this is the issue... Installing right now... Hold on.
Gabriel Torres Posted February 16, 2015 Author Posted February 16, 2015 Yep! That was the issue. Installed memcache.so and it is working fine now:STAT get_hits 12190STAT get_misses 175Thanks for the prompt reply.
RevengeFNF Posted February 16, 2015 Posted February 16, 2015 No problem Now you just need to control it with phpMemcachedAdmin(or a similar control panel).
David.. Posted February 17, 2015 Posted February 17, 2015 After reading this topic, I just realised I don't see my Memcached process running?I think it stopped running after a reboot?
RevengeFNF Posted February 17, 2015 Posted February 17, 2015 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 onThat way memcached will start after a reboot.
David.. Posted February 17, 2015 Posted February 17, 2015 Run this: chkconfig --level 2345 memcached on That way memcached will start after a reboot. So, I should reboot now?
RevengeFNF Posted February 17, 2015 Posted February 17, 2015 You can simple start the service.service memcached start
Gabriel Torres Posted February 17, 2015 Author Posted February 17, 2015 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.
David.. Posted February 17, 2015 Posted February 17, 2015 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!
Gabriel Torres Posted February 24, 2015 Author Posted February 24, 2015 @RevengeNFN It's been a week and I got the following stats from the excellent tool you recommended. I guess everything is running as expected. Should I lower the amount of RAM allocated to memcached?
RevengeFNF Posted February 24, 2015 Posted February 24, 2015 @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.
Gabriel Torres Posted February 24, 2015 Author Posted February 24, 2015 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.