I have a vps running Ubuntu 12.04 with nginx,php,mysql & APC. I notice the ram increases each time I add a new site to the vps. Is this normal? cause I added 50 sites and it ended up using 1.5GB RAM
Asked
Active
Viewed 76 times
2 Answers
1
The server uses as much RAM as it possibly can to provide as much performance as possible. You can't save RAM for later, so your choices are to use it or waste it. Using it is better.
David Schwartz
- 31,893
1
There's overhead to anything extra you run on your machine. Each site adds some configuration to nginx which is stored in RAM, extra mysql tables (I assume, since you mention it) add configuration, indexes, etc in RAM. Extra sites might mean spawning more php processes, which come with memory overhead. Finally, more PHP means more stuff in the APC cache, which will sit in RAM.
You may also be seeing disk caching, which Linux will do with unused RAM to speed things up. The canonical reference for this is Linux ate my ram!, which describes that behavior.
Bill Weiss
- 11,266