Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Virtual Memory Vs RAM

Posted on 2014-07-16
12
Medium Priority
?
222 Views
Last Modified: 2014-07-16
Hi

Just looking for some feedback based on Virtual Memory Vs RAM?

what it is, is we have on old .net system running with RAM which performs great and the new system runs in a VM cluster environment and theoretically it has much more RAM and more processors than that really old one, much more, but that’s not for real as it’s only a virtual allocation on a system shared with 40 odd other VMs.

we have noticed making a few calls to the sql server 2012 DB takes an extra second or 2, would this be down to the virtual memory?

in the old system all the calls to the db was made in the front end whereas the new system is split up into layers to taking away the heavy load in the app's front end.

so do you think that getting the new system running on a server with RAM will perform way better?

appreciate all opinions

Thanks
0
Comment
Question by:razza_b
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40199594
Virtual memory is stored on disk and not in RAM
So it is slower to use than from RAM

The more RAM you have the better.
0
 
LVL 1

Author Comment

by:razza_b
ID: 40199603
would this be the case then, if we managed to use just RAM rather then virtual the system would perform much better?

if so why is that?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40199619
Windows will automatically move the less used bits of memory to the page file and keep the active bits in the RAM.
Sticks of RAM will always be faster than reading from an HDD

You have 40+ VM's - sharing how much RAM?
0
Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

 
LVL 1

Author Comment

by:razza_b
ID: 40199640
not sure exactly will need to get back to you on that one, but you would think 40 vm's sharing, where 1 VM is a production application server just shouldn't be setup for virtual memory?

do you think it should be separated and using just RAM only?
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 664 total points
ID: 40199670
There is no reason to turn off the paging file, in fact it's likely to do more harm - you should just let Windows manage your memory.
But if you have 40 odd VM's trying to use 2GB of memory shared between them then there isn't much for Windows to manage.
Without knowing what all these VM's are doing - I would be looking at 32GB of RAM, which should be enough to share nicely, 64 would be better.
0
 
LVL 70

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 1336 total points
ID: 40199901
You have to be very careful with terms here, because there's some inherent contradictions and misalignments.

Every computer uses what it calls "virtual memory" (typically a paging file) to off-load things from RAM but keep them more quickly accessible than a file in a directory somewhere.

Then along came VM software running on a host adding a different layer of virtual memory/objects.  VM will logically split existing physical RAM into different "virtual machines".  This lead to physical memory becoming also, technically, "virtual memory".  (Yikes, that's a mind bender.)

SQL Server traditionally has not run well in virtualized environments like that.  I don't know if it's lag from the overhead of being virtual (naturally the VM vendors says it's not).  

So you have to determine two virtual layers:
1) How much physical RAM and CPU does the VM allow SQL Server to use?  Is it fixed or variable?
2) Within SQL's virtual environment, is that machine instance over-using its "virtual memory", i.e. paging file?
0
 
LVL 1

Author Comment

by:razza_b
ID: 40200087
Thanks for feedback, yes your right all confusing to me :), so would you say that its best to have this application vm host running on its own away from the other VM's so that the RAM is not being split into virtual memory and if it is on its own will this still be classed as virtual memory?

hope that makes sense...as im just trying to figure out what would make a new system run slower than the old one...
0
 
LVL 1

Author Comment

by:razza_b
ID: 40200093
So you have to determine two virtual layers:
 1) How much physical RAM and CPU does the VM allow SQL Server to use?  Is it fixed or variable?
 - how much should be allocated and what is best fixed or variable?
 2) Within SQL's virtual environment, is that machine instance over-using its "virtual memory", i.e. paging file?
 - how can I find this out?
0
 
LVL 70

Expert Comment

by:Scott Pletcher
ID: 40200100
Bottom line, you'll need more resources allocated to SQL Server.  If the VM admins can give you that from the existing VM, great.  You can try asking for a separate, non-VM machine, but some places simply don't do that anymore, preferring to run everything using VMs.
0
 
LVL 1

Author Comment

by:razza_b
ID: 40200161
ok, so if our admins decide to stay with 40 VM's sharing all the RAM or "Virtual memory" and I get more resources allocated SQL Server will it still run as fast as old system that is using just RAM? and more allocation still means "Virtual Memory" which is being read from disc still?
0
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 1336 total points
ID: 40200176
"As fast"?  I can't tell you that.
SQL should run faster if it gets more resources and it's running slow now.


>> and more allocation still means "Virtual Memory" which is being read from disc still? <<
To VM, physical RAM is still a type of "virtual memory".  So, the VM slice of RAM allocated to SQL Server should be physical RAM, at least until paging is required.  If the VM software allows you to specify a minimum physical memory, and you can get them to raise that for SQL, then your performance should improve.  But that depends on the specific VM software, and the VM admins themselves and what they want to do.
0
 
LVL 32

Expert Comment

by:aleghart
ID: 40201014
Why is everybody calling this "virtual memory"?  That term describes a disk-based paging file substituted for actual RAM by the operating system.

Virtual Machines use RAM from the host.  They don't use "virtual RAM".

If the applications inside the VM demand more memory than what is specificied/allocated by the hypervisor, the VM's operating system will swap to virtual memory, which is a paging file inside the VM disk. (This is slow.)

If the host has a memory requirement greater than what is physically installed, the host will use a swap/paging drive to substitute for RAM.  (This is slow.)

If the applications inside the VM demand less than the memory allocated by the hypervisor --AND-- the host's total memory requirement is less than what is physically installed...all of the memory requirements of the VM are met by actual physical RAM installed into the host.

If you have overprovisioned your host, then you can fix that:
add more RAM to the host
reduce the memory allocated to VMs
move some VMs off to a different host

Having "40 odd other VMs" on a host would not be a problem if, for instance, each VM consumed 2GB of RAM, and the host had 96GB installed (leaving 16GB free).

How did you add up your memory usage for the VMs on that host?
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question