VMware Communities
mattad
Enthusiast
Enthusiast

Can I switch "write-through" policy when changing content?

When I start a VM then a part of the VM is read from the *.vmdk into physical memory.

Then lets assume I change something or write a new text file.

The new content is (as far as I know) written immediately not only to memory but also ("Write-through") to hard disc *.vmdk.

Sometimes I prefer to have as much speed as possible. So writing to hard disc is unwanted.

Can I disable write-through resp chnage it to "write changed content to hard disc when idle" or even to "write changed content to hard disc when shutdown guestOS" ?

Solution for WS and Player preferred

Matt

0 Kudos
10 Replies
continuum
Immortal
Immortal

Hi

discussing your question makes no sense without knowing your host OS and your config.ini settings.

Please add that info.

Also do you configure the mainmem parameters ?




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
mattad
Enthusiast
Enthusiast

My guestOS is OpenSolaris (resp. in another case Ubuntu)

My hostOS is Win7 Pro

Which config.ini do you mean? Where do I find this?

I am currently using VmWare Player but will apply your solution later on VmWare Workstation as well

Matt

0 Kudos
continuum
Immortal
Immortal

please inspect a vmware.log file - it will give you the full path to the config.ini file.

In the config.ini hostwide memeory settings are stored - so it can be used to tweak memory handling.

So please attach the config.ini and a vmware.log to your next reply




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
mattad
Enthusiast
Enthusiast

So ok, the file contents of

C:\ProgramData\VMware\VMware Player\config.ini is:

installerDefaults.autoSoftwareUpdateEnabled = "no"

installerDefaults.componentDownloadEnabled = "yes"

installerDefaults.dataCollectionEnabled = "no"

That's all

Matt

0 Kudos
continuum
Immortal
Immortal

then first of all configure memory.

menu > edit > preferences > memory

check the box "fit all ..."

also see http://sanbarrow.com/vmx/vmx-config-ini.html




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
ksc
VMware Employee
VMware Employee

It takes magic config options (welcome to the "unsupported" world) in the .vmx file. We don't expose a UI for these options.

Per-disk override:

scsi0:0.buffered = TRUE | FALSE (default FALSE), and the disk name is ideX:Y or scsiX:Y. If false, fall back to global options...

The global options are:

hard-disk.hostBuffer = "automatic" | "enabled" | "disabled" (default "automatic"). Automatic falls through to...

hard-disk.useUnbuffered = TRUE | FALSE (default TRUE on Windows, FALSE on Linux and Mac.)

The first option is newer; the second option is older and retained only as long as code stays clean.

We change defaults frequently, depending on known tuning properties / OS bugs and behaviors. Unless you have a specific reason to use otherwise, the defaults are almost always good enough. (But I gather you have a good reason to override the defaults).

When using buffered mode, the host OS decides when to write back. (We put it in the buffer cache, but don't explicitly flush).

mattad
Enthusiast
Enthusiast

>The global options are:

>hard-disk.hostBuffer = "automatic" | "enabled" | "disabled"  (default "automatic").  Automatic falls through to...

>hard-disk.useUnbuffered = TRUE | FALSE (default TRUE on Windows, FALSE on Linux and Mac.)

>The first option is newer; the second option is older and retained only as long as code stays clean.

Interesting, thank you.

I am intersted in global options.

To clarify:

- The default is hard-disk.hostBuffer=disabled

- If I switch to hard-disk.hostBuffer=enabled then I disable write through policy.

But when will the changes be flushed to real *.vmdk hard disc?

You write "the host OS decides when to write back"

Give me an idea when this is the case (for 32bit WinXP or 64bit Win7):

When CPU idle?

I expect at least when I do a shutdown of guestOS or hostOS.

Can I find out if there is any unflushed data?

A user option in menu "flush now" would be fine. Can you include such an option?

Thank you

Matt

0 Kudos
superciliousdud
Enthusiast
Enthusiast

Hi,

Sorry to resurrect a long dead thread, but I have been using these options for ages, but recently tried to upgrade to Workstation 14.1.1, but I discovered that these options (and others I found) no longer work. All VMDK file I/O is unbuffered in 14.x all the known options in config.ini being used and therefore I/O is 1000x slower than under Workstation 12.5.x.

Is there an equivalent setting for the Workstation 14.x on a Windows 10 host?

Thanks

0 Kudos
superciliousdud
Enthusiast
Enthusiast

Just in case anyone else is suffering this same issue, I have discovered an ugly, inelegant but working solution and I posted it in the other thread: Disk write cache broken in Workstation 14

0 Kudos
nivanov1
Contributor
Contributor


Per-disk override:

scsi0:0.buffered = TRUE | FALSE (default FALSE), and the disk name is ideX:Y or scsiX:Y. If false, fall back to global options...

The global options are:

hard-disk.hostBuffer = "automatic" | "enabled" | "disabled" (default "automatic"). Automatic falls through to...

hard-disk.useUnbuffered = TRUE | FALSE (default TRUE on Windows, FALSE on Linux and Mac.)


 

 

I wonder if these parameters are still valid, particularly their default values, after the 10+ years? Also, is there a way to see the runtime values of these parameters after the VM starts?

0 Kudos