Skip navigation
VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
3,825 Views 13 Replies Last post: Jun 2, 2010 8:28 AM by sketchy00 RSS
WAMTech Enthusiast 43 posts since
Feb 24, 2009
Currently Being Moderated

Apr 17, 2009 9:15 AM

Swap file and Windows Page file location

 

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.

 

 

depping Champion VMware Employees User Moderators vExpert 4,238 posts since
Jan 17, 2005
Currently Being Moderated
1. Apr 17, 2009 9:50 AM in response to: WAMTech
Re: Swap file and Windows Page file location

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".

Duncan | Yellow-Bricks.com | Author of the vSphere 5.0 Clustering Deepdive
bpolitis Lurker 5 posts since
Jan 24, 2005
Currently Being Moderated
2. Jul 11, 2009 1:52 AM in response to: WAMTech
Re: Swap file and Windows Page file location

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.

mtnbiker98 Novice 10 posts since
Jan 2, 2009
Currently Being Moderated
3. Jul 13, 2009 3:33 PM in response to: bpolitis
Re: Swap file and Windows Page file location

 

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...

 

 

bpolitis Lurker 5 posts since
Jan 24, 2005
Currently Being Moderated
4. Jul 13, 2009 4:12 PM in response to: mtnbiker98
Re: Swap file and Windows Page file location

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.

afontana Hot Shot VMware Employees 122 posts since
Nov 13, 2007
Currently Being Moderated
5. Jul 13, 2009 9:57 PM in response to: bpolitis
Re: Swap file and Windows Page file location

 

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

 

 

livedrive777 Novice 26 posts since
Mar 27, 2008
Currently Being Moderated
6. Mar 16, 2010 8:25 AM in response to: afontana
Re: Swap file and Windows Page file location

Nope, he's definitely referring to the windows pagefile.  Refer back to TR-3671.  The Vmware swap is easy to handle.  The Windows pagefile more complicated by far.

livedrive777 Novice 26 posts since
Mar 27, 2008
Currently Being Moderated
7. Mar 16, 2010 9:15 AM in response to: WAMTech
Re: Swap file and Windows Page file location

 

After reviewing the TR-3671 document, I have to say there is no way I'd be willing to adopt that process for our VM pagefile locations. Here are my ideas for how I intend on approaching this problem:

1) Replicate the pagefile VMDK volume to DR, but on a weekly schedule or something of that nature

2) Use an actual file based copy that runs on a schedule to copy the VMDK files to a localized DR datastore, but ONLY if the file doesnt' exist. This will get the initial pagefile VMDK out there, but no need for future updates.

 

Bear in mind that we use NFS to store our VMDKs, which changes some things for us. If you have a NetApp system and you aren't doing this you should seriously reconsider. The advantages in my, and numerous others', opinions are significant and I have yet to encounter any downside in our implementation.

 

 

I thought about using non-persistent disks, but then teh redo files are stored with the VM itself, so that is a no-go as well.

 

 

Mike_Laverick Virtuoso vExpert 4,279 posts since
Jan 5, 2004
Currently Being Moderated
8. Mar 16, 2010 10:42 AM in response to: livedrive777
Re: Swap file and Windows Page file location

Plus non-persistent and independent mode disks look like they will be deprecated...

 

Regards

Mike Laverick

RTFM Education

http://www.rtfm-ed.co.uk

Author of the SRM Book:http://stores.lulu.com/rtfm

Free PDF or at-cost Hard Copy

Regards Mike Laverick RTFM Education http://www.rtfm-ed.co.uk
livedrive777 Novice 26 posts since
Mar 27, 2008
Currently Being Moderated
9. Mar 16, 2010 10:56 AM in response to: Mike_Laverick
Re: Swap file and Windows Page file location

Really?  I hadn't heard that.  Even persistent independant mode disks?  That is disappointing as the CPU and IO cycles involved with creating snapshots, particularly on things like pagefile and TEMP directory disks is very wasteful.

 

All of our pagefile disks are independant mode disks currently, they are just persistent so that features like sVmotion continue to work, that and the location of the redo files that I mentioned previously.

Mike_Laverick Virtuoso vExpert 4,279 posts since
Jan 5, 2004
Currently Being Moderated
10. Mar 16, 2010 11:04 AM in response to: livedrive777
Re: Swap file and Windows Page file location

 

Well, i wouldn't say my source is very authoritive.

 

I stumbled across this in the PowerCLI helpfile

 

 

 

 

 

Reported my dismay on RTFM:

 

 

http://www.rtfm-ed.co.uk/2009/09/13/powershell-vmdk-disk-modes-to-be-depreciated/

 

 

Regards

Mike Laverick

RTFM Education

http://www.rtfm-ed.co.uk

Author of the SRM Book:[http://stores.lulu.com/rtfm]

Free PDF or at-cost Hard Copy

 

 

Regards Mike Laverick RTFM Education http://www.rtfm-ed.co.uk
sketchy00 Hot Shot 187 posts since
Apr 13, 2009
Currently Being Moderated
11. Jun 2, 2010 7:42 AM in response to: livedrive777
Re: Swap file and Windows Page file location

Hey, I'd love to hear how this worked out.  I'm setting up my replicated environment, and of course, the VM's swap file was easy enough to adjust in vcenter, but it definately appears to be more complex when attempting to handing the Guest VM OS's swap/paging file.  Interesting that there isn't more authoritative documentation on this.

 

Any thoughts?

RParker Guru 7,853 posts since
Dec 6, 2006
Currently Being Moderated
12. Jun 2, 2010 8:18 AM in response to: livedrive777
Re: Swap file and Windows Page file location

The Windows pagefile more complicated by far.

 

Actually it's not.  the pagefile will recreate itself if Windows cannot find it.  If you turn of kernel paging in the registry the paging file becomes less important, but paging files are easy to manage, or they can be completely eliminated...

sketchy00 Hot Shot 187 posts since
Apr 13, 2009
Currently Being Moderated
13. Jun 2, 2010 8:28 AM in response to: RParker
Re: Swap file and Windows Page file location

RParker, so if I'm hearing you correctly, are you suggesting that if the steps described are followed (adding a new nonpersistent vmdk file, and changing the swap file location, etc.) that upon recovery or startup of that replicated VM, that the OS will indeed boot fine without error?

Bookmarked By (0)

Share This Page

Communities