PHP/MySQL -> memcached?

Posted by Sammy89, 02-14-2011, 01:41 PM
What is the best way to improve PHP/MySQL sites? I'm building from nothing and I want to speed it up with some sort of caching system to reduce load on the server and page load time in general. Ideas?

Posted by netmar, 02-15-2011, 01:31 AM
I'd look first at APC (Alternative PHP Cache). It's a bit easier to set up than memcached -- it's just a php extension. It really can help php performance though.

Posted by Sammy89, 02-15-2011, 03:47 PM
isnt memcahe faster since its memory based? i thought apc was just an opcode cacher?

Posted by bsdvps, 02-15-2011, 04:08 PM
I'm running nginx + MySQL + php-cgi with Wordpress (Super Cache enabled) I took some heavy traffic over 3 days and the server didn't even lag and didn't even notice resources spiking uncontrollably.

Posted by netmar, 02-15-2011, 06:40 PM
Sammy89 Actually, I think apc is actually the faster of the two(in most common use cases), but you're right in that it's an opcode cache. Memcache, OTOH, caches the results of queries and is a distributed cache, so a single cache can be used for multiple servers. Like I said, I'd start with apc just because it's simpler to set up, and this looks like a single server setup. Akin

Posted by gone-afk, 02-15-2011, 07:15 PM
Memcached and APC are great. For the absolute easiest way to reduce load: yum install php-eaccelerator. Compiled versions of your PHP scripts are stored on disk. Load on busy PHP sites can drop 50% instantly. Evaluate your needs/what is slowing things down, the above is not a magical solution for all.

Was this answer helpful?

 Print this Article

Also Read

How can I redirect all traffic which is NOT on a mobile device?

Posted by Chris`, 01-06-2008, 07:44 AMHey WHT! I have another question. I've finally got a...

Multiple IP's Ubuntu

Posted by jamiew8, 02-10-2011, 07:12 AMHi, I have been trying to add multiple IP's for SSL...

Where can I find a working PHP SMS text script?

Posted by lexington, 01-13-2011, 04:56 AMI found this site which works in sending text messages...

Mail/DNS Problem

Posted by efriese, 03-28-2008, 05:01 PMI'm having problems sending email to a particular domain....

need help with SEO

Posted by dennis1, 09-10-2008, 08:48 AMthis is a site I'm playing with hxxp://w...