2

I'm running several Linux-based VMs (vApps, actually) that have varying amounts of memory assigned to them. Some have databases, some web servers, etc. While some are using less than 40% of their assigned memory, a few are consistently using over 90%, and one is also using 15% of it's swap space. I'd like to re-balance the memory allocations and try to get them all using roughly the same fraction, but what should I aim for? 90%? 75%?

I'd like to do this in one outage, so I'm guessing I need to add extra space to the one using 15% of its swap space (the others are generally less than 1%). Should I just add 15% of my swap space size to the memory allocation, or should I pro-rate it somehow?

Thanks.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
samwyse
  • 123
  • 3
  • There's no formula. Adjust and tune as per the workload. If this is VMware (*you weren't clear*) [the memory guidelines are more complex](http://serverfault.com/questions/528254/vsphere-education-what-are-the-downsides-of-configuring-vms-with-too-much-ra). We'd need more information. – ewwhite Jan 07 '15 at 19:32
  • Yes, it's VMware. I was hoping for a simple guideline, such as "allocate 50% more than the average utilization". For example, best practices for file systems is to act when they reach 90% of capacity. Reading everything at the link, I'm thinking that the best practice is to allocate an amount equal to one standard deviation above the mean. Fortunately, I have several months of data I can look at, so I can figure it out without too much work; unfortunately, I won't be able to use the results for other systems going forward. – samwyse Jan 08 '15 at 15:26

1 Answers1

2

Memory allocation in VMware is a complex topic. It really can't be distilled to a "allocate X amount" per machine. You really have to look at utilization inside the VMs as well as from the host, cluster and and resource pool levels.

Can you give a specific situation or scenario that you need help with? What is the layout of your cluster?

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • It's a vApp with 10 servers. Each has 4 CPUs and various amounts of RAM and disk as suggested by a configuration tool. Using the Linux 'free' command, servers are showing various levels of RAM utilization, as described above. The servers with low utilization are not swapping at all, the ones with higher rates are showing 1-2% swap utilization, and one is showing ~15%. Adding RAM involves a bit of paperwork, so I'd like to minimize experimentation and allocate the "optimum" amount on my first try. I'm trying to decide if I want to get utilization down to 70% or 90% or what. – samwyse Jan 09 '15 at 15:33
  • Why are these configured as vApps? – ewwhite Jan 09 '15 at 15:41
  • Purchased and installed as a vApp. – samwyse Jan 09 '15 at 15:58
  • More details, please? – ewwhite Jan 09 '15 at 16:43