The smartread.v25.enabled Registry Key |
This article discusses the smartreadv25.enabled key in the vmPRO registry. It consists of the following sections:
Key:
smartread.v25.enabled
Function:
Enables or disables the SmartRead function, which provides overall disk I/O savings by performing progressive optimization of vmdk files, leaving out whitespace and deleting any unused blocks, and organizing the data stream for efficiency.
Possible Settings:
Boolean: (0 or 1)
Meaning of Setting:
0 is disabled
1 is enabled
Configuring this Key:
To configure this registry key:
When this option is selected, you will see the following footprint in the vmprox_fs logging (shown disabled).
2014-03-14 15:24:17.056931: vdsk_check_volumes:
vdsk_extent_path: /vmfs/volumes/4b1d74d6-eee84f06-fe5f-0030483450b0/Win2008R2 VSS Jon/Win2008R2 VSS Jon-flat.vmdk
smartread_enabled: 1
smartread_lvm_enabled: 1
smartread_fsck_enabled: 1
smartread_v25_enabled: 0
dev_path: /dev/mapper/c2a00066.947544p1
vtype: FILESYS (1)
fstype: ntfs (2)
fsck: 0:Checking 256 MFT records.
dev_path: /dev/mapper/c2a00066.947544p2
vtype: FILESYS (1)
fstype: ntfs (2)
fsck: 0:Checking 72960 MFT records.
In the example below, using a Windows Server VM, you can confirm that bytes are being ignored by pagefile.sys (the smartread.v25.enabled function is enabled in the following listing):
###Shows smartread.v25 enabled###
quantum:Soapy> reg show smartread.v25.enabled
smartread.v25.enabled = 1
###Shows ls -alh command is in the files_fs mount###
bash-4.1# pwd
/files/test/Win2008R2 VSS Jon/Win2008R2 VSS Jon.volume/1
###Page file in directory###
bash-4.1# ls -alh
total 108K
drwxrwxrwx 1 root root 4.0K Jul 13 2009 $Recycle.Bin
drwxrwxrwx 1 root root 8.0K Mar 17 14:37 .
drwxr-xr-x 1 root root 4.0K Mar 17 14:38 ..
-rwxrwxrwx 2 root root 1.0K Dec 26 19:31 .rnd
lrwxrwxrwx 2 root root 60 Jul 13 2009 Documents and Settings -> Users
drwxrwxrwx 1 root root 0 Jul 13 2009 PerfLogs
drwxrwxrwx 1 root root 4.0K Jun 11 2013 Program Files
drwxrwxrwx 1 root root 4.0K Feb 16 01:16 Program Files (x86)
drwxrwxrwx 1 root root 4.0K Feb 4 16:25 ProgramData
drwxrwxrwx 1 root root 0 Apr 12 2013 Recovery
drwxrwxrwx 1 root root 4.0K Mar 17 14:37 System Volume Information
drwxrwxrwx 1 root root 4.0K Feb 4 16:26 Users
drwxrwxrwx 1 root root 16K Feb 4 16:24 Windows
-rwxrwxrwx 2 root root 24K Mar 17 14:36 _BCD_QUANTUM_.BAK
-rwxrwxrwx 2 root root 21K Mar 17 14:36 _BCD_QUANTUM_.BAK.LOG
-rwxrwxrwx 2 root root 0 May 21 2013 _BCD_QUANTUM_.BAK.LOG1
-rwxrwxrwx 2 root root 0 May 21 2013 _BCD_QUANTUM_.BAK.LOG2
-rwxrwxrwx 2 root root 3.5K Mar 17 14:37 _RESTORE_QUANTUM.XML
drwxrwxrwx 1 root root 0 Sep 30 14:45 build
-rwxrwxrwx 1 root root 4.0G Mar 17 14:37 pagefile.sys
bash-4.1#
Since the pagefile.sys file is binary, to see its contents, use the hexdump command. With smartread.v25 enabled, only 0's are reported, as shown in this example.
bash-4.1# hexdump pagefile.sys
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
fff8e000
bash-4.1#
If smartread.v25 is disabled, rather than enabled, you'll see a hexdump that provides hex output that is not all 0's like this
quantum:Soapy > reg set smartread.v25.enabled 0
Registry key 'smartread.v25.enabled' set to '0'.
###Hexdump on smartread.v25 being turned off###
bash-4.1# hexdump pagefile.sys | more
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0001000 0000 0000 0000 0000 8948 245c 4808 6c89
0001010 1824 8948 2474 5720 5441 5541 5641 5741
0001020 8348 50ec 8b44 33f1 ffc9 d115 ffbf 44ff
0001030 f88b 29e8 0004 4500 e433 3b41 75c4 3307
0001040 e9c0 019c 0000 15e8 0004 8b00 89d8 2484
NOTE: If a snapshot is present in the pwd of the VM's datastore, toggling smartread.v25 will reflect the pagefile.sys of the snapshot and the smartread option selected at that time. The snapshot must be consolidated for the hexdump to reflect correctly.
After a page file is written to a NAS, if the storage supports sparse writes, a hexdump of the swap memory file will result in the same output shown at the end of the Confirming_that_smartread.v25_Is_Enabled section above, as seen from the /files mount.
###Example Backup with smartread.v25 enabled###
bash-4.1# pwd
/recover/files/55 hundo/2014-03/2014-03-17-135540/test/Win2008R2 VSS Jon/Win2008R2 VSS Jon.volume/1
bash-4.1# hexdump pagefile.sys
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
fff8e000
bash-4.1#
Please note that unless you are using a stat or 'ls' options from the ls command on the mounted storage, it can appear the pagefile.sys is taking up space on the NAS share, even after you've confirmed that the hex dump shows only 0's.
An easy way to confirm block usage is to use the 'ls -ls' command. The 's' option prints the size of each file in blocks when combined with 'l'.
bash-4.1# pwd
/recover/files/7500/2014-03/2014-03-17-140800/test/Win2008R2 VSS Jon/Win2008R2 VSS Jon.volume/1
bash-4.1# ls -lsh pagefile.sys
0 -rwxr-xr-x 1 root root 4.0G Mar 17 16:10 pagefile.sys
Block Space Being used on the filesystem
Actual File Size
bash-4.1# ls -alh
total 108K
drwxr-xr-x 1 root root 4.0K Jul 13 2009 $Recycle.Bin
drwxr-xr-x 1 root root 8.0K Mar 17 14:08 .
drwxr-xr-x 1 root root 4.0K Mar 17 16:06 ..
-rwxr-xr-x 2 root root 1.0K Dec 26 19:31 .rnd
lrwxr-xr-x 2 root root 60 Jul 13 2009 Documents and Settings -> Users
drwxr-xr-x 1 root root 0 Jul 13 2009 PerfLogs
drwxr-xr-x 1 root root 4.0K Jun 11 2013 Program Files
drwxr-xr-x 1 root root 4.0K Feb 16 01:16 Program Files (x86)
drwxr-xr-x 1 root root 4.0K Feb 4 16:25 ProgramData
drwxr-xr-x 1 root root 0 Apr 12 2013 Recovery
drwxr-xr-x 1 root root 4.0K Mar 17 14:08 System Volume Information
drwxr-xr-x 1 root root 4.0K Feb 4 16:26 Users
drwxr-xr-x 1 root root 16K Feb 4 16:24 Windows
-rwxr-xr-x 2 root root 24K Mar 17 14:08 _BCD_QUANTUM_.BAK
-rwxr-xr-x 2 root root 21K Mar 17 14:08 _BCD_QUANTUM_.BAK.LOG
-rwxr-xr-x 2 root root 0 May 21 2013 _BCD_QUANTUM_.BAK.LOG1
-rwxr-xr-x 2 root root 0 May 21 2013 _BCD_QUANTUM_.BAK.LOG2
-rwxr-xr-x 2 root root 3.5K Mar 17 14:08 _RESTORE_QUANTUM.XML
drwxr-xr-x 1 root root 0 Sep 30 14:45 build
-rwxr-xr-x 1 root root 4.0G Mar 17 16:06 pagefile.sys
bash-4.1#
The key thing here is that the NAS supports sparse file writes. Although pagefile.sys is 4GB in size (green highlight), the NAS filsystem (StorNext in this case) was able to determine that it contains nothing but 0's, so it occupies 0 blocks (yellow highlight).
This page was generated by the BrainKeeper Enterprise Wiki, © 2018 |