Portal Home > Knowledgebase > Articles Database > Memcached


Memcached




Posted by khanbaba, 10-17-2013, 01:36 PM
Hi, Our website is based on Wordpress, well today I noticed a strange thing I want playing with memcached and noticed interesting thing, I mean when I stopped Memcached the server load goes around to even 100% and sever got halted. And when I started memcached services server load got stable and was always under 1%. Can anybody please help me understand why its happening? I mean it should work without memcached running, we know memcached will add some speed and stability but in my case its extremely hard to survive without memcached running... Thanks.

Posted by datarealm, 10-17-2013, 05:24 PM
Are you having I/O trouble on the disk?

Posted by khanbaba, 10-18-2013, 04:41 AM
Not really we have one drive for files and for databases we have 80GB SSD. So it shouldn't be any issue with I/O.

Posted by Infinitnet, 10-18-2013, 05:40 AM
Watch "top" while you disable Memcached and see what exactly causes the high load. %wa would be the IO wait time, so if that goes over 20% or something and doesn't recover, it's your disk. Also keep an eye on the processes and see which ones consume most CPU cycles and post the results here or even better the whole "top" output with Memcached disabled.

Posted by khanbaba, 10-18-2013, 06:12 AM
There are lots of lots of php processes, we are using fcgi. usually to index.php of Wordpress install directory.

Posted by khanbaba, 10-20-2013, 01:49 AM
Anybody else?

Posted by critihost, 10-20-2013, 05:37 AM
Depending on your site code and the number of visitors it receives you could simply be experiencing one of the major benefits of caching. Your server may not be able to handle the load without it. Did you stop using memcached but leave it running with all the memory allocated? Are you restarting apache? With fcgi the processes before the apache restart may not be killed and it will simply spawn more. This combination could result in a depletion of memory.

Posted by mixmox, 10-22-2013, 03:56 PM
im interested to follow this discussion is memcahched improve server performance on high load ?

Posted by khanbaba, 10-23-2013, 02:10 AM
Yeah it will improve the performance for sure, I am using it for quite some time so far so good. You must give it a try, I am using it with combination of mod_fcgi, nginxcp. Thanks.

Posted by mixmox, 10-23-2013, 03:55 PM
which part of data will be cached by memcached ?

Posted by khanbaba, 10-24-2013, 11:32 AM
Better read: http://en.wikipedia.org/wiki/Memcached

Posted by Scott.Mc, 10-24-2013, 08:56 PM
You likely have two different issues which combine to create the problem. The first is by disabling memcached you are removing the caching of your database queries and your database is likely not fully optimized so it takes longer to generate your pages. The other is even though you are stopping the memcached daemon your application is still configured to use it so you are adding a several second delay to each page while it timesout memcached , this vastly reduces your capacity and causes the effects you are seeing. Try disabling memcached in wordpress before stopping it and note the difference.

Posted by mixmox, 10-25-2013, 04:18 PM
so you mean memchached will make problem for wordpress ?

Posted by Scott.Mc, 10-25-2013, 04:59 PM
Only when you stop memcached while still having it configured in wordpress.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language: