Optimal settings for VPS with 512MB ram (memory issue)

For my own set up, and another I've done for a member on here, we have both moved away from APC in favour of Xcache 3.0.1 (and removed memcache)

We are both using CentOS with Apache though.

I found Xcache handles the backend caching better than APC, as APC fragments after a while, where Xcache has been stable for weeks without needing a restart.

This is from my xcache-admin page. cache has been running since the 9th
View attachment 44199

Isn't it because you were caching sessions with APC ? I remember it was one of the problem until I compile it with igbinary support, and also setting .ttl to 0 has helped a lot, and so far never seen fragmentaion or rarely. I might take a look to Xcache another time but for now will keep APC, thanks.
 
No, I was using 3.1.13 installed from source with igbinary support.
And when I've upgrading php, I've added php5-apc, which is supposed to be APC 1.1.14 (http://www.dotdeb.org/2013/01/24/php-5-4-11/)
I thought somehow it was still using old version.

So, you're saying by using php5-apc, it will used this one (not the old version) and for some reason, the last version is still 3.1.13, right ?
http://www.dotdeb.org/2013/03/21/php-5-4-13/

You seem to be following an older posting. APC (along with php 5.4.13) was updated in Dotdeb a while back.
 
xCache is seems to be good for XenForo. But he will still use up more resources. 512MB is something I keep looking at.

Although I do agree that it would be better to use for caching XenForo.

Still keep APC installed.... Just don't add it to the config.php file.
Yep, 512mb is the size of the test VPS.

That is running nginx / mariadb / APC but it's only hosting my dev sites, so isn't busy.
dev.webp

XenForo should only really be using around 55/60mb on a pretty stock install.

You can see how badly it fragments when using it for the backend (1 test XF install, and only me logging in to it!)
apc.webp
 
Yes, I know, I mean the link was just to show you "1.1.14" ; but I don't see APC being back to "1.1.13", that's why I'm a bit lost.
 
Isn't it because you were caching sessions with APC ? I remember it was one of the problem until I compile it with igbinary support, and also setting .ttl to 0 has helped a lot, and so far never seen fragmentaion or rarely. I might take a look to Xcache another time but for now will keep APC, thanks.
Yes, and you can reduce it by doing what you said.

My settings when running it on my main VPS

; APC Settings
;apc.shm_size = 512M
;apc.max_file_size = 10M
;apc.mmap_file_mask = "/apc.shm.XXXXXX"
;apc.ttl = 86400
;apc.user_ttl = 86400
;apc.stat = 1
;apc.serializer = igbinary
; Added 28.01.13
;apc.num_files_hint = 4096
;apc.user_entries_hint = 4096
;apc.localcache = 1
;apc.localcache.size = 2048
 
Yes, I know, I mean the link was just to show you "1.1.14" ; but I don't see APC being back to "1.1.13", that's why I'm a bit lost.
You're on the current version.

The Perl Development Team and The PHP Development Team don't always match the number. It has caused confusion in the past. PHP labels it from the version point of when it became default in PHP... While Perl version's it from when it was originally released.

X.1.13

Ignore the X value.


edit:

Question: What do you mean when you say Perl and PHP don't always match versions?

Answer:

APC History 101 :p

APC (Alternative PHP Cache) originally was a stand alone, independent, un-official plug-in for PHP. It was not part of the development and was developed outside of PHP.

Current version from source is 3.1.13

When PHP adapted it as an official part of PHP with all the support along with it... They originally number version-ed it from that point on and not from the original version number.

Version number: 1.1.13

Some linux distro and repositories will follow one or the other, but basically its the same thing. Only the number really changes (usually).

Yes, it can be confusing. If it was up to me... They would all match.
 
Top Bottom