VMware Cloud Community
Wajeeh
Enthusiast
Enthusiast

Creating a separate vdisk for paging purpose


Dear Experts,

In physical servers sometimes we do create custom paging file to a separate partition on a hard disk if running low on virtual memory.

I would like to know if this also makes sense to do same by creating a separate vdisk in virtual machine OR not advisable OR best to let it be managed by Windows 2008 R2 server.

Any ideas on this ?

Kind Regards,

Tags (2)
0 Kudos
10 Replies
Alim786
Expert
Expert

From my research and experience, Windows 2008 R2 handles Memory management much better than previous OS. Therefore I would let the OS "system manage" it.

Also I have not seen much benefit from a dedicated vdisk for paging file and in some environments, may introduce its own issues, e.g. Backup, Snapshots. Therefore I would just leave it on the system vdisk but make sure you have enough available disk space for the paging file to expand.

Another important point, which I am sure you will know, is to make sure you have the latest ESXi updates and subsequently, the latest VM Hardware and VM Tools for the VMs.

Having said all this, i am a firm believer of "right sizing" VMs based upon medium to long-term monitoring and reports, either by scripts or tools like vCops, VMTurbo, etc...

I hope this helps.

VCP6-DCV, VCP5, CCNA, MCTS 2008R2, MCSA 2008R2, CCA, ITIL. Please mark answer helpful or correct as appropriate.
0 Kudos
JarryG
Expert
Expert

This makes sense in real (non-virualised) server, because you can optimise a few things, i.e. to put pagefile on separate faster disk (i.e. SSD), maximise transfer-speed (by using the outer cylinders of hard-drive), minimise access-time ("middle" of disk), prevent swap/pagefile fragmentation, etc.

How much sense it makes with VM depends on your storage-configuration. For example one of my arrays is Raid10/SSD where I always create small vdisk for every VM, and put only pagefile/swap-partition (with fixed size) there. This vdisk is very fast, and (according to my own experience) it is much better than over-commiting memory, because with its own pagefile/swap VM "knows" it is using swap instead of RAM, and I can controll how much it uses it (i.e. with "swappines" in linux). If I over-commited memory and counted on ESXi-swapping, VMs would know nothing about it and would try to use all memory without any limit (i.e. for disk-cache).

Furthermore, two general advantages of having pagefile/swap on separate vdisk come to my mind:

- can be excluded from backups (at least from those off-line)

- it is easier to adjust swap/pagefile-size (even on-line) by extending or adding one more vdisk, without touching VM system-partition

But this all depends on your own configuration/usage/etc.

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos
Shrikant_Gavhan
Enthusiast
Enthusiast

Hi Wajeeh,

Instead of that you can add a dedicated SSD for VM paging file.

Thanks and Regards,

Shrikant Gavhane

Thanks and Regards, Shrikant Gavhane
0 Kudos
Wajeeh
Enthusiast
Enthusiast

Hello Jarry,

thanks for all your information, one question like you mentioned general benefit of page file on separate vdisk come to your mind is that they can be excluded from backups, how is this possible if for example I want to take a image backup of the virtual machine?

0 Kudos
JarryG
Expert
Expert

I do not know what tool you use, but in most of esxi backup-tools you can pick up vdisk you want (or do not want) to backup. For image-backup I use ghettoVCB, simple but excellent free script, which I can configure per VM, as I need.

But be aware: if you want to back-up VMs without swap, then either do it off-line (shut VM down before, or suspend it to disk, but NOT to swap), or be sure VM is not using swap at the time of back-up. Otherwise image of VM might be inconsistent...

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos
King_Robert
Hot Shot
Hot Shot

There will be no difference after storing the page file on different vDisk till there is no SSD device is attached.

otherwise it is better to store the Page file on the same vDisk

0 Kudos
Wajeeh
Enthusiast
Enthusiast

Hello King Robert,

Since I have no SSD disk, I was also thinking that keeping it on separate vdisk is not helping me. That's why I asked here for opinions. I think better make windows operating system settings to automatically manage paging on all drives.

0 Kudos
Wajeeh
Enthusiast
Enthusiast

Hi Alim786,

At the time of creation of virtual machine we added separate vdisk for paging but with time and now after discussing here I found it is not helpful.

I need to know if now I want to make setting to let OS manage,  I just have to check the box automatically manage paging on drives? Then I need to reboot once is that safe?

In second step I can remove the vdisk Iam using now for paging file, right

Waiting for response

0 Kudos
Alim786
Expert
Expert

The best thing is to remove the page file from the dedicated vdisk, manually create one on the C: drive, reboot, remove vdisk, change page settings to "system managed", reboot.

VCP6-DCV, VCP5, CCNA, MCTS 2008R2, MCSA 2008R2, CCA, ITIL. Please mark answer helpful or correct as appropriate.
0 Kudos
AshleyBanks
Contributor
Contributor

We place all page files on a seperate vdisk on a different datastore with same capabilities for 2 reasons.

1.Our backups are done at a lun level so we can exclude the page file datastore from the backups.

2.We find we get a lot better de-duplication ratios if we store all page files on one aggregate creating more useable disk space.

It all depends on how you backend storage is configured to whether you will find any benifit but from our setup we do.

0 Kudos