VMware Communities > VMTN > VMware vCenter™ > Site Recovery Manager > Discussions

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
5 Replies Last post: Jul 13, 2009 9:57 PM by afontana
Reply

Swap file and Windows Page file location

Apr 17, 2009 9:15 AM

Click to view WAMTech's profile Novice WAMTech 14 posts since
Feb 24, 2009

Hi all, I have a question to ask. I am currently setting up SRM 1.0.1 U3 in a VI 3.5 U3 and VC 2.5. I have NetApp SANs 3070HA models. I am currently setting up all my VMs in 14 LUNs that are being replicated to my DR SAN. My question is; if I put my swap file and windows page file for the VM Instances in a non-replicated Volume how then can SRM know where to create the Windows Page file since I have it in a VMDK all by it self. So basically all of my VMs have 2 or 3 VMDK 1 for the OS, 1 for the windows Page file and 1 for the Data if needed. I have my cluster configured to store the swap file in two specific LUNs (DataStores) that are not being replicated so there is nothing in the DR site from those two LUNS (Volumes). I read the document TR-3671 from NetApp where it shows how to get it working but it looks like a lot of work and configuration.

This is what I'm thinking; if I say replicate those two volumes (for the swap and windows Page file) once a month to my DR site and make them available would that work without having to go about configuring each VM with a new VMDK for the windows Page file? I mean there is nothing changing in those two files at any time right is just being accessed constantly. So if this is possible all I need to do is configured my cluster in the DR site to point to the same volumes for the swap file correct?

Thanks in advance and I hope to get some good leads.

Reply Re: Swap file and Windows Page file location Apr 17, 2009 9:50 AM
Click to view depping's profile Champion depping 2,992 posts since
Jan 17, 2005
VMware Moderator
It's certainly seems possible. But keep in mind that you will need to have a procedure in place for each VM that gets added to the recovery plan. You would need to replicate the LUN that holds the new swapfile vmdk before you add it to the recovery plan.

For the VMware swapfile it's not needed to use this. Just use vCenters capabilities and configure the cluster to use a central .vswp location. It's done in just a few clicks.

Duncan
VMware Communities User Moderator


Blogging: http://www.yellow-bricks.com
Twitter: http://www.twitter.com/depping

If you find this information useful, please award points for "correct" or "helpful".
Reply Re: Swap file and Windows Page file location Jul 11, 2009 1:52 AM
Click to view bpolitis's profile Lurker bpolitis 5 posts since
Jan 24, 2005
I did a recovery point installation last year that was similiar to this. We did not use SRS but were replicating using recovery point across two Clarion SANS in different states. Dependant upon the type of server that you are replicating (SQL, Application, Citrix etc.) moving the swap volumes to a non replicated LUN can result in a huge difference in total replicated volume. In our case upwards of 60% on certain servers. I believe it was over 80% on one Citrix server. Given the cost savings and bandwith savings I believe the overhead for moving the guest OS swap volume is probably warranted for most people - even though that requires a much more detailed setup of the guest and significantly more admin overhead time when spinning up a new OS

Think about it, a single windows guest brought online with swap on the local c: drive may generate over 8 gigs of data to be replicated just during it's install or setup process before it's even online to users.

We were not using DRS so on the far side we were bringing the guest OSes back online manually. If I recall correctly if you bring windows up and it can't find it's associated swap volume it simply re-creates a default one on the C:\ volume. So you may not have to replicate the swap volumes at all - as long as you leave enough room on the c:\ volume for the swap to be brought back there in case you fail over. Although it MIGHT have taken two boot processes for the guest to come up this way. In my instance since the guests were brought back online manually in the DR facility booting it twice was not an issue. But I would suggest you experiment with bringing it back up without it's designated swap volume and see what the results are - I don't really remember.

That being said, and given the bandwith savings that equal significant dollars moving swap out of the OS volume generates I think customers should start pushing VMWARE for a truly automated solution for this issue. It should be very easy to automate relocation of the windows swap volume through VMWare Tools or even perhaps at the virtual hardware level.

There needs to be a truly automated and proper management function for this issue. Particularly when dealing with Windows as it can be very difficult to prevent Windows from swapping.

Looking at the big picture the following server types:
Database Servers do mostly reads - most database servers do far more reads than writes after all we look at information more often than we create new info. This means lots of swap
Application Servers (Citrix, MS TS etc.) - Swap is the single biggest bottleneck for many applications on Terminal Services or Citrix
Business Rules Servers - Swap again is often the biggest bottleneck

For all these types of servers swap is a huge bottleneck and usually represents the single largest quantity of disk IO in the guest overall. And is certainly the highest amount of IO on the c:\ volume.

I would think it would be easy enough to create a feature in VMWARE that allows delegation on the SAN of a given LUN as a SWAP file sandbox. Then either by altering the OS through VMKTools or intercepting data as it goes through the virtual hardware it would be possible to redirect this data out into that sandbox. That sandbox could then be simply ignored from a backup and or replication standpoint.

Then in virtual center it would be easy enough to build an interface to designate for which OSes to redirect the swap file. Of course this would affect VMOTIONS etc. so it would not be a simple change, but given the amount of bandwith saved during replication I think such a feature would be a significant cost benefit to most customers.

There are actually multiple levels of cost savings. First there is no reason to include swap in snapshots etc or daily backups. Moving swap files out to a sandbox would save on disk overhead for any of these types of functions. Then when using replication such as SRS you add in the significant bandwith savings of eliminating potentially huge amounts of replication. This could easily have an ROI to a truly large organization of multiple hundreds of thousands of dollars per year.

Reply Re: Swap file and Windows Page file location Jul 13, 2009 3:33 PM
in response to: bpolitis
Click to view mtnbiker98's profile Novice mtnbiker98 10 posts since
Jan 2, 2009

Something to consider when designing for this is that if you do not replicate the swap volume over the VM will error when it attempts to start. The volume is not replicated and therefore not availble to the VM. I agree with bpoltis in that there can be a degree of cost savings in terms of bandwith. I have found this design to be more of a pain than I beleive it is worth. That is of course not to say that there is only one way to design this architecture or that I have thought of them all.

I am not sure what the math would show but I am not sure how much disk savings is actually incurred here. Creating a LUN on storage to hold entirely swap files is not only an administrative burden (as bpoltis mentioned) but it also creates a lot of wasted space.

Thoughts to consider...

Reply Re: Swap file and Windows Page file location Jul 13, 2009 4:12 PM
in response to: mtnbiker98
Click to view bpolitis's profile Lurker bpolitis 5 posts since
Jan 24, 2005
If I remember correctly, that if Windows "loses" it's swap volume it attempts to boot, displays an error that it will default swap back to c:\ and then comes up just fine. But it has been a year. In the case of the client I was working with they decided this was acceptable as they intended to semi-manually bring guests back online via scripting after a failover event. This was before the fully automated SRS solution was available.

In their case they did not have the bandwith to replicate the Guest OS if they attempted to replicate swap as well. They could only replicate the data volumes on a real time basis. By removing the swap files they did have enough bandwith to replicate the OS volumes as well.
Reply Re: Swap file and Windows Page file location Jul 13, 2009 9:57 PM
in response to: bpolitis
Click to view afontana's profile Enthusiast afontana 31 posts since
Nov 13, 2007
VMware

I think mtnbiker was referring to the VM swap file not the GOS swap file (i.e. windows page file).

One thing I wanted to point out was if the resources are available the VM swap file can be elimiated (or significantly reduced) by setting reservations. Additionally, unless you are overcommitting memory there shouldn't be much activity to the VM swap file, but setting a reservation to reduce the size may help out.

-alex

Actions