Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give APC more memory #68

Closed
markjaquith opened this issue Apr 30, 2013 · 7 comments
Closed

Give APC more memory #68

markjaquith opened this issue Apr 30, 2013 · 7 comments

Comments

@markjaquith
Copy link
Contributor

apc.shm_size is left at the default, which is a measly 32 MB. Bigger WordPress installs that use an APC object cache backend can very quickly hit this limit. If you hit this limit on every page load, you cause a catastrophic failure which renders a site unusable.

I recommend that apc.shm_size be set to 256 MB.

@TheLastCicada
Copy link
Contributor

Since this Vagrant is only provisioned with 512 MB of RAM, allowing half of that to be used by APC seems excessive. Part of the goal here was to create a development environment that uses Memcached and Batcache to simulate what many larger WordPress sites use for caching. If you are using APC as the object cache backend rather than Memcached, it would make more sense to allocate the Memcached resources to APC instead. I haven't looked into this, but I assume neither Memcached nor APC actually allocate that RAM until it is used, so you could probably have both available and just use one or the other. And now I have talked myself into arguing your point.

So - here is my main question - how much RAM do we want to allocate to caching in a 512 MB environment? And I like the small footprint at 512 MB to keep it accessible, so I'd rather not change that.

@jeremyfelt
Copy link
Member

Intent here is for VVV to use APC as opcode cache only. That said, if we can make it easier for someone to use APC as object cache instead of memcached without having to do a lot of customizing, then that might be worth the change. Especially worth the change if memory isn't allocated until used.

@TheLastCicada
Copy link
Contributor

That is what I'm thinking.... originally I had thought of APC as opcode only and Memcached for object caching and page caching. But we do use APC for object caching on some of our sites and it would be nice to be able to replicate that in VVV. @markjaquith - do you think 128 MB would be enough for APC object caching in a development environment? I usually set it to 256 MB on live servers, but assume we can get away with less in development since not everything on the site will be used all at once.

@TheLastCicada
Copy link
Contributor

Son of a b, I'm drawn to the close button instead of comment for some reason....

@markjaquith
Copy link
Contributor Author

32 MB could be hit even without using APC as an object cache.

So - here is my main question - how much RAM do we want to allocate to caching in a 512 MB environment? And I like the small footprint at 512 MB to keep it accessible, so I'd rather not change that.

Well, you're correct in assuming that the space isn't pre-allocated. But I do confess that one of the first things I did while using this locally was to crank the VM up to 2GB.

128 MB should be fine. I opened #70 to discuss the issue for Memcache.

@jeremyfelt
Copy link
Member

Healthy discussion and this makes sense. Going to map a custom apc.ini file so that we can continue to make additional changes there when required. We'll try this out with the 512MB box size and see what it feels like.

@lock
Copy link

lock bot commented Feb 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants