APC (php accelerator). What situations should I use this?

Posted by matthewsteiner on Server Fault See other posts from Server Fault or by matthewsteiner
Published on 2010-05-10T15:02:55Z Indexed on 2010/05/10 15:04 UTC
Read the original article Hit count: 318

Filed under:
|
|

So I've just got a small vps. I've installed apc, which sped up normal pages by 20% - 30%. I was reading about memcached and came to the conclusion that I can use apc for the same thing (caching objects from database results) if I'm not distributing over other servers. Since I only have the one server, apc will be just as beneficial for caching things in memory.

I'm still in development mode, and I'm sure it's hard to tell what would be best for production mode. The thing is, my database queries seem pretty fast (between .0008 and .02). None of my pages are way database intensive.

Would it be beneficial to me to cache results in memory? If the database is running well right now, is it going to be having a hard time later? Also, is connecting to the database at all something that costs speed (even if I cache most of my queries, every page has to have a little database interaction for session data). So, basically if I have a limited ram, and one machine, will using apc rather than just letting the database be uncached be much faster?

Ideas?

© Server Fault or respective owner

Related posts about apc

Related posts about php