VPS memory allocation

vps

#1

Hello,

I am running a 1GB DreamHost VPS right now for a single website. The VPS Optimization Wiki states that “Every DreamHost virtual private server (PS) uses roughly 100 MB of memory as a baseline without any user processes running.”. Does that mean that 100MB of my 1GB VPS will be unusable? if so then should I allocate only 900MB in my phprc file for my website?

I’m also using NGINX as my web server right now. I noticed that it uses a lot more RAM when compared to Apache. I barely get any site visitors right now, but my RAM usage hovers around 400MB-500MB. Is this normal or is it a sign of a memory leak?

Also, are there any plans to upgrade NGINX in the future? Wikipedia says that my current NGINX version 1.4.4 is outdated and I’m not sure whether this is a big security risk that I should worry about or not.


#2

I’m also curious about this,waiting for someone to sove this doubt.


#3

What’s telling you that your ram usage is 400-500MB? I check with the DreamHost panel under VPS to check RAM usage, plus I also run ‘top’ periodically from command line to see what’s running and how much RAM is being used.


#4

[quote=“Dreamy, post:1, topic:63236”]
Hello,

I am running a 1GB DreamHost VPS right now for a single website. The VPS Optimization Wiki states that “Every DreamHost virtual private server (PS) uses roughly 100 MB of memory as a baseline without any user processes running.”. Does that mean that 100MB of my 1GB VPS will be unusable? if so then should I allocate only 900MB in my phprc file for my website?[/quote]

Well, your Linux server will require some RAM for system processes so you can’t use all of it for your needs :slight_smile:
You can check it with this command:

$ free -m

             total       used       free     shared    buffers     cached
Mem:           496        237        259          0         45        102
-/+ buffers/cache:         89        407
Swap:          713          0        713

You can think that available RAM is total RAM minus (free+buffers+cached) because Linux will use free RAM to cache disk I/O if available.

Allocating 900 Mb to the PHP itself is not a good idea in general because you’ll need memory for nginx, mysql, etc and most likely you will face the oom killer problem sooner or later.

Take a look at this article to understand how to measure your Linux server performance and resources usage, maybe it will help you.