Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jul 15, 2011 10:29 am 
Offline
Senior Newbie

Joined: Mon Jul 11, 2011 2:12 am
Posts: 7
Hi

I have installed APC and PHP with:

apt-get install php-pear php5-cli php5-cgi php5-dev php-apc

The matter is I do not see any performance boost with APC enabled. APC is installed with default settings and I have tried to change some of these also according to advices given by Linode but nothing happens - sometimes it evens makes performance worse.

Basically I have used ab to do some stresstest. My testpage is some regular HTML with a single phpinfo() in it giving the page a total size of around 50K.

Anyone got a clue as to why?


Top
   
 Post subject:
PostPosted: Fri Jul 15, 2011 10:43 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
PHP apc caches the php byte code, phpinfo() doesn't require much in the way of resources so you won't see an improvement, run something complex like wordpress or drupal etc

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Sun Jul 17, 2011 5:17 am 
Offline
Senior Newbie

Joined: Mon Jul 11, 2011 2:12 am
Posts: 7
Thanks for answering

I see, this link also suggests what you say.

http://bitflop.com/document/120


Top
   
 Post subject:
PostPosted: Mon Jul 18, 2011 11:46 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Whenever you run a PHP script, the PHP interpreter compiles the source code of the script to byte code for execution. This takes time, and on more complex web apps, it can be a significant amount of the execution time.

APC caches the result of this compilation, so that when a script is executed, it can skip the compilation and just interpret the pre-compiled bytecode.

On a simple script, the compilation time is an inconsequential part of the execution time. But on a more complex web app, with hundreds or thousands (or more) lines of code, skipping that step can save a large amount of time (and CPU power). Hence why those benchmarks you linked to show no savings for small stuff, but show huge savings for WordPress, Drupal, and Phorum.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group