Windows 10: Any useful scenario for NTFS compression?

Page 3 of 3 FirstFirst 123
  1.    01 Dec 2015 #21

    Hello.

    These are some Windows folders that can be compressed too.

    \windows\assembly (already mentioned)
    \windows\inf
    \windows\infused apps
    \windows\installer (you may need to unpack it first with /u /s /a /a) (it was packed with lznt1 on my pc by default)

    This will shave off about 2GB+ of free space.
      My ComputerSystem Spec

  2.    01 Dec 2015 #22

    eLPuSHeR said: View Post
    \windows\inf
    That one is already compressed by compact /compactos:always (in my case from 50.4MB to 22.5). I'll add it anyway though, thanks.

    In case you are interested this is what I'm doing at the moment.. It is pretty stable.

    The compression is a bit trial and error (lzx for things like installer that are never used like installer, xpress8k for things that are like assembly). Obviously deleting is better than compressing when you can (WindowsApps and SoftwareDistribution\Downloads in particular). Fonts is reasonable extra saving (377MB to 249MB compressed) but you need to take/restore ownership.

    Code:
    $compactDirectory = @(	
    ("$env:programFiles",                     "", "xpress16k")
    ("${env:programFiles(x86)}",              "", "xpress16k"),
    ("$env:homeDrive\MSOCache",               "", "lzx"),
    ("$env:homeDrive$env:homePath\Documents", "", "xpress16k"),
    ("$env:homeDrive$env:homePath\OneDrive",  "", "xpress16k"),
    ("$env:homeDrive$env:homePath\Downloads", "", "xpress16k"),
    ("$env:windir\Assembly",                  "","xpress8k"),
    ("$env:windir\Fonts",                     "NT SERVICE\TrustedInstaller", "xpress16k"),
    ("$env:windir\InfusedApps",               "", "xpress16k"),
    ("$env:windir\Installer",                 "", "lzx"),
    ("$env:windir\Panther",                   "", "xpress16k"),
    ("$env:windir\SoftwareDistribution",      "", "xpress16k"),
    ("$env:windir\System32\Catroot2",         "", "xpress16k"),
    ("$env:windir\System32\LogFiles",         "", "xpress16k")		
    )
    #------------------------------------------------------------------------------------------------------------------------------------------------------
    function takeOwn-folder ($folder) {
    	$toplevel = Split-Path $folder -leaf
    	if (Test-Path "$PSScriptRoot\$toplevel.acl") {Remove-Item "$PSScriptRoot\$toplevel.acl" -Force -ErrorAction 0}
    	icacls "$folder" /save "$PSScriptRoot\$toplevel.acl" /t 
    	takeown /f "$folder" /r 
    	icacls "$folder" --% /grant "%USERDOMAIN%\%USERNAME%":(F) /t
    }
    #------------------------------------------------------------------------------------------------------------------------------------------------------
    function restoreOwn-folder ($folder, $owner) {
    	$toplevel = Split-Path $folder -leaf
    	$parentPath = Split-Path -parent $folder
    	icacls "$folder" /setowner "$owner" /t
    	icacls "$parentPath" /restore "$PSScriptRoot\$toplevel.acl"
    	Remove-Item "$PSScriptRoot\$toplevel.acl" -Force -ErrorAction 0	
    }
    #------------------------------------------------------------------------------------------------------------------------------------------------------
    For($i=0;$i -lt $compactDirectory.Count; $i++) {
    	$folder       = $compactDirectory[$i][0]
    	$owner        = $compactDirectory[$i][1]
    	$compression  = $compactDirectory[$i][2]
    		
    	if(Test-Path $folder)	 {
    		# take ownership if required
    		if ($owner -ne "") {takeOwn-folder -folder $folder} 
    			
    		Write-Host "Running " -NoNewLine
    		Write-Host "compact /c /s /a /f /q /i /exe:"$compression $folder"\*" -f White 
    
    		compact /c /s /a /f /q /i /exe:$compression $folder\*
    							
    		#restore ownership
    		if ($owner -ne "") {restoreOwn-folder -folder $folder -owner $owner}
    	}
    }
    What I've had problems with are these 3
    Code:
    	#	("$env:windir\System32\DriverStore\FileRepository","","lzx"),
    	#	("$env:programData","NT AUTHORITY\SYSTEM","xpress16k"),
    	#	("$env:APPDATA","NT AUTHORITY\SYSTEM","xpress16k"),
    Not sure if I've got the ownership wrong or what but windows doesn't work properly if I compress these.

    I'd like to compress DriverStore as it is big but my screen goes all funny if I do...
      My ComputerSystem Spec

  3.    01 Dec 2015 #23

    Sometimes when I install the OS, I choose to use NTFS compression across the entire System partition (On MBR/BIOS I combine boot and windows partitions).

    I do this after install, but before the final reboot via command prompt with something similar to:
    Code:
    FOR /F "delims=*" %I IN ('dir /b /s "C:\*.dll") DO compact /C /A /EXE:XPRESS18K "%I"
    FOR /F "delims=*" %I IN ('dir /b /s "C:\*.exe") DO compact /C /A /EXE:XPRESS18K "%I"
    compact /C /A /S:C:\
    compact /U /A /S:C:\boot
    compact /U /A /S:C:\Windows\boot
    compact /U /A C:\Windows\System32\winload.exe
    A few things you cannot compress and successfully boot on MBR/BIOS are:
    \Windows\System32\winload.exe
    \Windows\boot\*
    \boot\* (assuming you combine boot and OS partitions like I do)

    Everything else I believe is able to have compression applied.
      My ComputersSystem Spec

  4.    03 Dec 2015 #24

    I would love MS or someone else would make a nice GUI and improve the compact command.
      My ComputerSystem Spec

  5.    12 Dec 2015 #25

    Hello guys.

    A question crossed my mind. Does anybody know if Xpress DECOMPRESSION TIME is the same for al variants (4k, 8k, 16k)?
    I am asking this because right now I am quite satisfied with the 8k compression ratio/speed, but I could go for 16k just for the extra space savings.
      My ComputerSystem Spec

  6.    12 Dec 2015 #26

    eLPuSHeR said: View Post
    Hello guys.

    A question crossed my mind. Does anybody know if Xpress DECOMPRESSION TIME is the same for al variants (4k, 8k, 16k)?
    I am asking this because right now I am quite satisfied with the 8k compression ratio/speed, but I could go for 16k just for the extra space savings.
    Isn't that what testing load times of Winword.exe and firefox you did earlier does? For the first load this will read from disk and decompress into ram. This guy says xpress16k is just as fast Windows 10 Compression - Page 8 and (completely unscientifically) I can't feel any difference...

    I guess you could test it by decompressing something big (a wim or a game or something) but how this would apply to real use I don't know as if you've got enough RAM pages will be decompressed and stay in memory anyway until something pushes them out.

    Perhaps looking at frame rates in a game would be a good test? I don't have any so I can't test that.
      My ComputerSystem Spec

  7.    12 Dec 2015 #27

    Thanks. I am asking because the tool we used to measure loading times (AppTimer) doesn't take into account cpu usage, which would be nice to have too. I will test packing a game or something.

    Best regards.
      My ComputerSystem Spec

  8.    12 Dec 2015 #28

    I have made a quick test. Compressing a huge 4GB+ Neverwinter Nights 2 campaign I am currently playing. Although the game sits on my SSD, these external files are on my SATA II mechanical hard disk. I do not trust SSD tests because they are pretty fast already and it makes more sense on HD anyway.

    No great differences between Xpress8k and Xpress16k

    Both compression ratios were 2.2 to 1. Loading times (using a physical chronograph) were 18'69s and 19'54s respectively. If we take into account some error margin, the difference is less than a second.

    Some other apps. didn't get any benefit in size from going to 16k over 8k. Defraggler went from 1.8 to 2.2 though.

    I have not been able to determine if loading times are the same or not. Maybe someone could supply a different way of testing (or showing some documents or something).

    Right now I am sticking to 8k to be on safe ground.

    PS - By the way. When we did our earlier tests we didn't take into account Windows Prefetcher .pf files. They could add some randomness to loading times I think. I think we should have deleted the associated .pf files between runs.

    Best regards.
      My ComputerSystem Spec

  9.    11 Jan 2017 #29

    hello, anyone here reading this anymore? i have a question... how can i choose what format (algorithm) i want (for example xpress4k) to use it and compress my os binaries in that format? For example i want to choose xpress4k , if i just type the command : C:\Windows\system32>compact/compactos: always ....it automatically compress the file in whatever format it wants, and i want xpress4k. So how to make it follow my demand? Thanks
    Last edited by cata; 11 Jan 2017 at 09:30.
      My ComputerSystem Spec

  10.    30 Jan 2017 #30

    cata said: View Post
    hello, anyone here reading this anymore? i have a question... how can i choose what format (algorithm) i want (for example xpress4k) to use it and compress my os binaries in that format? For example i want to choose xpress4k , if i just type the command : C:\Windows\system32>compact/compactos: always ....it automatically compress the file in whatever format it wants, and i want xpress4k. So how to make it follow my demand? Thanks
    You can't specify the compression unfortunately. /CompactOS:always uses xpress4k. If there is some way to change this to xpress16k or something else I don't know it.

    If you want xpress4k then you can just run the command. If not you'll have to do it manually - just don't compress boot files.
      My ComputerSystem Spec


 
Page 3 of 3 FirstFirst 123

Related Threads
USB install - Fat32 OR NTFS ? in Installation and Upgrade
Fresh Installing Windows 10 and before downloading file, I was thinking if I should format my drive to Fat32 OR NTFS OR exFAT? Does it make any difference ? - Plz Guide me.
So, I'm having a hard time being convinced that memory compression (aka. Superfetch) is designed to improve system performance, because ever since I upgraded to windows 10, it's been doing the exact opposite. Now, I'm one of those guys who likes...
Windows 10 Memory Compression in Windows 10 News
634417066351685636
NTFS Permissions Confusion in General Support
I clearly do not understand NTFS permissions. Can someone please help eliminate my confusion. When I am signed in to RAVEN\Clayton (local, standard account) and I check Properties->Security on D:\Users\Clayton\Utilities, I find: 30157 To me...
I upgraded to Windows 10 on July 30th from Win7. Before I did I cloned my Win7 disk to another spare drive. Yesterday I accidently booted into that drive and Windows tried to upgrade that drive (and failed) or so says the Windows Update Log. So...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 07:15.
Find Us