Hey Ivan,
There have been a couple of threads about low memory environments here in the forums.
Here's probably the most useful one:
https://www.virtualmin.com/forums/message-view?message_id=104298Regarding Apache, running PHP scripts via either CGI or FCGId is probably preferred to mod_php for memory usage. Just be sure to actually remove mod_php from the Apache configuration so it isn't loaded anyway. CGI is probably slightly smaller than FCGId (just be sure to also remove mod_fcgid from your Apache).
I will also point out that Virtuozzo has a known problem with memory allocation--even when memory usage is well below the "allocated" amount, memory allocations will seemingly randomly fail. It may have some relation to number of virtual private servers and their allocations. I dunno. But I've yet to see a Virtuozzo instance that actually delivered the amount of memory it claimed.