<p>Can anyone tell me what is the <em>memory usage overhead associated with PHP opcode cache</em>?  </p>

<p>I've seen a lot of reviews of <code>opcode cache</code> but all of them only concentrate on the performance increase. I have a small entry level <em>VPS and memory limits</em> are a concern for me. </p>

[{'answer_id': 29570, 'author': 'Edmund Tay', 'author_id': 2633, 'author_profile': 'https://Stackoverflow.com/users/2633', 'pm_score': 4, 'selected': True, 'text': '<p>Most of the memory overhead will come from the opcode cache size. Each opcode cacher has their own default(e.g. 30MB for APC) which you can change through the config file.</p>\n\n<p>Other than the cache size, the actual memory overhead of the cacher itself is negligible.</p>\n'}, {'answer_id': 29763, 'author': 'BlaM', 'author_id': 999, 'author_profile': 'https://Stackoverflow.com/users/999', 'pm_score': 0, 'selected': False, 'text': '<p>In todays world: It\'s neglectible. I think memory consumption was about 50 MB bigger with eAccelerator then it was without when I did my <a href="http://blogs.interdose.com/dominik/2008/04/11/benchmarking-php-eaccelerator-und-andere-opcode-caches/" rel="nofollow noreferrer">benchmarks</a>.</p>\n\n<p>If you really need the speed but do have headaches that your RAM might be not enough: grab $40 and buy another GIG of RAM for your server ;)</p>\n'}, {'answer_id': 29824, 'author': 'AdamTheHutt', 'author_id': 1103, 'author_profile': 'https://Stackoverflow.com/users/1103', 'pm_score': 0, 'selected': False, 'text': "<p>You can set a <code>limit</code> to memory consumption for <code>APC</code>, but that potentially limits its effectiveness.</p>\n\n<p>If you're just using it for silent <em>opcode caching</em>, then it should be fine. Once the memory allotment is full, no new files will be cached, but everything will work as expected. However, the user-space cache functions like <code>apc_store()</code> and <code>apc_fetch()</code> will fail silently and inexplicably if there is no memory available. </p>\n\n<p>This can be tricky to catch and debug since no error is reported and no exception is thrown.</p>\n"}]
['https://Stackoverflow.com/questions/29525', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2976/']