Virtual Memory Vs RAM

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
LVL 1
razza_bAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
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
razza_bAuthor Commented:
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
GaryCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

razza_bAuthor Commented:
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
GaryCommented:
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
Scott PletcherSenior DBACommented:
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
razza_bAuthor Commented:
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
razza_bAuthor Commented:
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
Scott PletcherSenior DBACommented:
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
razza_bAuthor Commented:
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
Scott PletcherSenior DBACommented:
"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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aleghartCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Applications

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.