Ubuntu + VMware WorkStation + ntfs-3g

Si sou molt frikis com jo i teniu les VMs en una partició NTFS però voleu executar-les desde Linux i sense problema teniu en compte el següent:

Enable Big Write Mode and Disable Last Access Timestamp Updation:
The NTFS-3G driver supports a flag called big_writes while configuring your file system in /etc/fstab or while mounting using mount command. What this essentially does is that it instructs the driver to write data to disk in larger chunks instead of on every single write instruction received by it. This helps a lot with throughput while writing/copying/moving large files and is in general good for small files too.
Similarly, NTFS has a feature of recording last access time of a file and this this is done every time the file is accessed, which adds up to the total time it takes to read from or write to the file. This can be safely turned off without causing any harm to the data.
To configure these options, below are the settings I use in my /etc/fstab file. You can use the same flags as in screenshot, other details will vary from system to system depending on how many drives you have and how you configure them.Basically, the highlighted items are the ones you wanna change in your config.
Configure big_writes and noatime mode in /etc/fstab
3. Disable mlocate/locate indexing of NTFS drives
mlocate or locate is a standard program under linux which can be used to search the file system quickly for a file or directory. It uses a high performance index of the file system,  generated and updated every day by the updatedb command. Usually, this is a scheduled activity by default on most systems.
The updatedb utility has some issues with NTFS file system, where even if a single file or folder is changed on the file system, it considers all the files and folders as changed and re-indexes everything on the drive. This obviously takes CPU resources and if the drive is compressed, the situation becomes more problematic because of the high CPU utilization by compression/decompression routines. This doesn’t happen too much now-a-days it seems, probably due to updated versions of these two commands but still, changing a little configuration option for these commands can give you much better results.
The trick is to disable the index generation on NTFS file systems altogether. Usually, indexing is not required on NTFS and you can always go and search items using your GUI file managers if you need to. To disable it, edit the file /etc/updatedb.conf and add the entries ntfs and ntfs-3g to the “PRUNEFS=” line, like in the screenshot below. I am not sure whether ntfs-3g is needed or not but there is no harm in adding it so I add it nevertheless.

 


With this issue, using Vmware and using a VM machine can be a slow experience when doing high IO operations inside the VM machine. For example trying to uncompress a large zip file on the VM machine, just makes the host 100% CPU on the NTFS-3g process.

To solve this issue, just shutdown the VM machine and add the following line to the vmx file with your favorite text editor:

mainMem.useNamedFile = “FALSE”


I per últim el meu toc:

Dincs de les preferencies del  VMware Workstation definiu que les VMs es carreguin únicament en memòria RAM:

Selecció_230

Apa, vagi bé!

update: Recordar que és millor que la VM no tingui fitxer de swap i activar-li “Prioritat per a processos en 1r pla

Leave a Reply

Your email address will not be published. Required fields are marked *