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

Ioncube on server?

Posted by vito, 01-11-2008, 03:42 PMWhat command line entry do I use to find out if I have...

PHP with JS chained select

Posted by horizon, 02-27-2010, 09:52 AMHi, I'm currently using the chained select contribution...

php website taking screenshots of other websites...

Posted by thomase, 09-08-2008, 04:29 PMI'd like to be able to take a screen shot, similar to the...

header already sent?

Posted by Calibaba, 03-27-2008, 12:00 PMPHP Warning: Cannot modify header information - headers...

PTZ control queue to a website in script / code

Posted by magi5, 05-05-2007, 08:41 PMHello. Does anybody know about a "Pan/Tilt/Zoom control...