Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a small VPS with 64MB RAM. I use it as an internal proxy. I only have one index.php on this server, which has the logic to fetch data from another server using php curl and display to the client (this is done for every request - there are no local files whatsoever).

I have installed PHP APC so that the index.php lies in the RAM. Are there any disadvantages to having APC on a 64MB box? I have heard there can be fragmentation/swapping problems - but I assume not in my case, right? On a related note: Does CURL cache any data (enough to create problem with APC on a 64 MB RAM?).

Any tips on best practices on this box to prevent swapping/fragmentation would be very helpful (I am pretty much a noob with this).



share|improve this question

migrated from Dec 2 '10 at 11:47

This question came from our site for computer enthusiasts and power users.

Where sells 64MB VPS's - or something? how much more would it be to push the boat out and double your memory? – Chopper3 Dec 2 '10 at 11:57
:) there are some low end providers. Actually I have few of them, and dont want to push till really needed. – JP19 Dec 2 '10 at 14:16

The only way to be sure is to run some tests for yourself, as I assume that none of the relevant project teams have particularly tested their code in such a constrained environment so you won't find any "official" recommendations.

Replicate the small VM on a local system, put it under some test load, and see what happens.

Regarding Curl, IIRC it performs no caching in memory: content it recieves is dropped to disk immediately and it does not stay resident after a transfer is completed. The kernel may cache some of the content being written of course.

share|improve this answer

You won't have fragmentation problems, since the only file you have is the index.php. APC is an opcode cache, not a caching proxy, so only one php file's code section (opcode) will sit there, nothing else from an external source. So no fragmentation will occur and of course none of your curl data will be "cached".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.