Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should you start using Memcached?

I'm starting to learn about using Memcached with PHP and I was wondering; is there a point at which you should start using it? Is it always more efficient to cache data or does it only become effective once your site gets a certain number of hits? Presumably there is an overhead associated with Memcached, so when does the speed benefit outweigh this?

Thanks in advance for any advice.

like image 551
Philip Morton Avatar asked Nov 20 '08 16:11

Philip Morton


Video Answer


1 Answers

You should start using memcached when not using it starts to affect your site / server.

So when you just have 100 visitors a day and your site still responds quickly, don't bother using it.

But when you have running times somewhere near 200ms or more per page, and the site feels slow too, you should look out for the bottlenecks using some PHP profiler (XDebug integrates one that you can use in combination with WinCacheGrind or KCacheGrind). Especially caching database requests should save you some load time.

like image 181
Sebastian Hoitz Avatar answered Sep 21 '22 14:09

Sebastian Hoitz