windows - Can compressing Program Files save space *and* give a significant boost to SSD performance?

28
2013-09
  • Christopher Galpin

    Considering solid-state disk space is still an expensive resource, compressing large folders has appeal. Thanks to VirtualStore, could Program Files be a case where it might even improve performance?

    Background

    In particular I have been reading:

    SSD and NTFS Compression Speed Increase?
    Does NTFS compression slow SSD/flash performance?
    Will somebody benchmark whole disk compression (HD,SSD) please? (may have to scroll up)

    The first link is particularly dreamy, but maybe head a little too far in the clouds.

    The third link has this sexy semi-log graph (logarithmic scale!).

    *SEMI-LOG* graph of NTFS compression performance on an SSD

    Quote (with notes):

    Using highly compressable data (IOmeter), you get at most a 30x performance increase [for reads], and at least a 49x performance DECREASE [for writes].

    Assuming I interpreted and clarified that sentence correctly, this single user's benchmark has me incredibly interested. Although write performance tanks wretchedly, read performance still soars. It gave me an idea.

    Idea: VirtualStore

    It so happens that thanks to sanity saving security features introduced in Windows Vista, write access to certain folders such as Program Files is virtualized for non-administrator processes.

    Which means, in normal (non-elevated) usage, a program or game's attempt to write data to its install location in Program Files (which is perhaps a poor location) is redirected to %UserProfile%\AppData\Local\VirtualStore, somewhere entirely different.

    Thus, to my understanding, writes to Program Files should primarily only occur when installing an application. This makes compressing it not only a huge source of space gain, but also a potential candidate for performance gain.

    Is this accurate? Will compressing Program Files provide a significant read performance improvement with only a negligible write performance degradation thanks to VirtualStore?

    I've postponed my own testing of Program Files directly due to confusion from the beginning of this post which suggests turning compression off may not immediately decompress the files (though I intend to use the compact command which may).

  • Answers
  • surfasb

    There is a flaw in your line of thinking.

    Thus, to my understanding, writes to Program Files should primarily only occur when installing an application. This makes compressing it not only a huge source of space gain, but also a potential candidate for performance gain.

    Virtual Store is not used if the program is running as Admin. In the case of Setup Programs, this is all setup programs.

    It's very rare to run into a program that isn't UAC aware these days and where VirtualStore takes over. For example, my Virtual Store only lists Foxit Reader.

    Compressing it though, does look interesting. In my case, compressed my Program Files out of curiosity. My most disk intensive programs is the Total War series: Napoleon, Empire, Shogun 2. In particular, switching between Battle map and the Campaign map involves a heavy amount of reads.

    I decided to compress the Steam folder and fire it up a few times. Predictable, since the game loads require heavy sequential reads, it was slower. My map loading times went from 38 seconds to about 48, although it actually took over two minutes my first time loading.

    I haven't tried other applications.

  • crea7or

    It will depend on your system. Compact command is fast, but not compress files so good. Average read speed is known and average decompression speed also can be calculated. But I don't think that there is possible significant improvements. At least it's not so good for single core processor.

    There is a dilemma:

    [load time of uncompressed data]

    vs

    [load time of compressed data]+[decompression time] (higher memory usage in as the side effect)

    loading time from ssd is about 150-200mb/sec, decompression speed is about 20mb/sec. So, usual compression raito should be more than 10x and it doesn't looks like a real thing.

  • Isaac Rabinovitch

    Actually, the graph in the third article is not entirely accurate. Turning on compression from within Windows does NOT compress all files that are actually safe to compress. You can easily verify this by looking inside system folders with color highlighting enabled for compressed files.

    The solution? I found a tool called Drive Press and I have devoted today to singing its praise: I've been able to realize triple space savings with it. Literally.

    I think this tool would also improve overall SSD performance, because there is more spare area available on the drive.

    My average space savings are now 20%-25% (but this is only after using Drive Press, which compresses more than Windows itself somehow). Windows compression itself gave me 5%-10% max on the same data set.

    Basically, if you're looking at NTFS compression, you must check out Drive Press. It won't boot you out of NT either - when I was trying to manually compress every file using Explorer (a very untenable proposition anyways), I did compress boot loader files and had to decompress my drive using an external USB connection on another computer before I could get into Windows again. Even though Drive Press compresses much better than Windows, it does not compress what must remain clear.


  • Related Question

    windows - A compression program that handles files with unusual extensions
  • ripper234

    WAR files are simply ZIP files with a renamed extension. I'd like to configure a compression program to handle these (on double-clicking the file), but mine doesn't recognize them unless I rename them to .ZIP. I have setup Windows file associations, but my file compression program just wants to 'add them to archive' instead of opening them.

    Which compression program would you recommend?


  • Related Answers
  • 8088

    WinRAR and the open source 7-Zip will extract any file you throw at it, regardless of file extension. Personally, I prefer WinRAR (mainly because of 7-Zip's clunky UI, but this may have changed since I have last used it) over 7-Zip, but i know many people swear by 7-Zip

    enter image description here

    enter image description here


    Windows cannot do exactly what you are after. The whole purpose of file extensions is to assign each unique extension to a program to open them. In theory, every file extension is a completely different format and therefore a program should not be set as a 'catch-all' for file extensions. Besides, what if you have a .zip file renamed to .jpg? What happens then?

    What you could do though is to have an icon in your quick launch bar and drag-and-drop the files onto the program. If the program supports it, they should then launch and extract the file (or do whatever they do with them).

  • 8088

    I think 7-zip will be able to manage such stuff.

    enter image description here

    All compressed files have header information describing the compression used.
    Smart compression tools work with that header information.

    If your compression program uses file extensions to figure such things out,
    drop it -- 7-zip will probably handle the format you are working with.


    Update on the comment:

    From your question notes I presume you refer to the Sun *war*, Web Archive format.
    I have successfully opened filename.war archived with this format
    using a 7-zip installation on Windows XP.

  • fconolly

    I find Izarc has support for a huge number of compression formats including .war files. It integrates nicely with the windows shell and come in a portable flavour too! (IZarc2Go)

    See here: http://www.izarc.org/

    Izarc supports a far higher number of formats than 7Zip and most other archive software. From the website here is a list of features:

    IZArc is the best freeware archive utility supporting many archive formats like: 7-ZIP, A, ACE, ARC, ARJ, B64, BH, BIN, BZ2, BZA, C2D, CAB, CDI, CPIO, DEB, ENC, GCA, GZ, GZA, HA, IMG, ISO, JAR, LHA, LIB, LZH, MDF, MBF, MIM, NRG, PAK, PDI, PK3, RAR, RPM, TAR, TAZ, TBZ, TGZ, TZ, UUE, WAR, XXE, YZ1, Z, ZIP, ZOO. With a modern easy-to-use interface, IZArc provides support for most compressed and encoded files, as well as access to many powerful features and tools. It allows you to drag and drop files from and to Windows Explorer, create and extract archives directly in Windows Explorer, create multiple archives spanning disks, creating self-extracting archives, repair damaged zip archives, converting from one archive type to another, view and write comments and many more. IZArc has also build-in multilanguage support.

    With IZArc you can open CD image files like ISO, BIN, CDI and NRG. It is also possible to convert such files from one type to another (BIN to ISO, NRG to ISO).

    If you need to send large files to your colleagues, friends or customers who may not have archiving tool you can easily create self-extracting archive that can be extracted by simple double click.

    IZArc can be configured to run your preferred Anti-Virus scanner when you open any archives.

    IZArc supports 256-bit AES encryption to secure your data.

    IZArc is integrated in Windows so you can perform all archiving operations by using right-click menus in Windows Explorer.

    If you have broken archives IZArc can help you to repair them with ease.

  • Snark

    Try ALzip. ALZip support 36 file formats. This means, ALZip can extract almost all the archives from usual to unusual.

  • 8088

    If you are using Windows, then right click the .WAR file. Goto Properties, and on the General Tab displayed, press the Change button next to 'Open with'. From there select whatever Zip program you use and press OK. You have now associated your WAR files with your compression program, so that double clicking on them will open them inside your compression program.

    The properties box should now look something like this:

    alt text