Yesterday I Tweeted the suggestion that one could use NTFS compression to gain more storage space on the Surface or other Windows RT tablet. People quickly pointed out there are a number of questions around, and potential issues associated with, doing this. I’m not going to fully explore this subject, but did want to get the conversation going. Perhaps someone into doing this for a living will fully explore the subject.
The only Surface I have is my go to machine, so I’m not going to muck around with it much. But I did do a simple test just to see if exploring the use of compression might make sense. I found a large folder (2.38GB) and compressed it. The directory was C:\Users\xxxxxx\AppData\Local\Packages. It compressed down to 1.67GB, a 30% savings that in concrete terms gave me an additional 700MB of space. A not insubstantial improvement, and that is with just one folder compressed.
Now my Surface has 128GB in it, 64GB internally and I added a 64GB SD card, so I’m not exactly in need of compression. I uncompressed the folder and started to write this blog post. I do have my old W500 sitting unused at home, so I could dig it out and do more testing (including actual performance tests) on an older Atom/SSD/Windows 8 system. But I don’t know if that will be interesting enough to suggest what Surface owners might want to do. Hence my call for someone more into doing this for a living to give I a try.
Now to address some of the things that were raised over on Twitter.
Is using compression bad on an SSD? I don’t think so, but I haven’t really studied the issue. Michael Fortin wrote a blog post back when Windows 7 came out talking about SSD support in which he recommended use of compression for “infrequently modified directories and files” and against using it for actively written files. Tom’s Hardware did an extensive review on the topic a little over a year ago and also recommended use of compression on an SSD. The real question around using NTFS compression on an SSD isn’t is it good or bad, but rather what directories would it be good for and which would it be a bad idea for.
Compression is basically a tradeoff in which you use more CPU time in order to take up less disk space. If you have files that are infrequently accessed and an abundance of free CPU time than you have a perfect situation for using compression. If you are trying to maximize CPU efficiency and/or client responsiveness then compression is counter-indicated. That is why, for example, Microsoft wouldn’t simply ship Surface with compression turned on. They would rather trade away some storage space than risk degrading the user experience. In compressing the directory mentioned above (which is where apps store their local data) I probably impacted application startup times a bit, I just don’t know how much. In previous experience on earlier versions of Windows I was never able to detect performance differences with compression enabled, even when I compressed the entire system disk. But Windows RT systems are very carefully balanced to provide their user experience, so it is possible that misuse of compression would lead to noticeable degradation. We need a guinea pig….
A related issue is around one of the more worrisome characteristics of SSDs, that they wear out from write activity. If compression leads to more writes, or a write pattern that isn’t balanced across the cells of the device, then you could have wear issues. On the surface (no pun intended) I don’t see it as an issue. Generally compression reduces the number of writes by compressing the data. But what it might do is increase the number of cells written on random updates as compression changes the update from as small as a single sector into chunks as large as 64KB. So on a file getting a high volume of very small updates you could see a theoretically bad behavior. But I doubt this is a relevant problem for today’s tablets, particularly given how SSD’s caching and internal file system behavior actually work. If you are planning to use your Surface as a transaction processing machine updating a database hundreds or thousands of times per second then contact me and we can discuss the wisdom of compressing the database file. But otherwise the wear issue is a non-issue over the expected lifetime of the device.
There is another point that was made in two ways, which is basically what if there is some other form of compression already at work? Some file types like JPEG or MP3 already compress the data, so adding more compression isn’t really going to help. True. Also, some SSD controllers do compression at the controller level (which, if the controller is fast enough, is all gain for no performance pain). But, as my test showed, not the Surface.
The largest amount of user data on a client device is likely to be already compressed files, so the purpose of using NTFS compression would be to reduce the amount of space taken up by Windows and applications rather than user data. If you need more space for your photos, videos, and music then use an SD card. They are cheap! The one in my Surface has my entire music collection on it, and when I travel that is where movies and TV programs I want to watch are stored. It is also where my camera gets backed up every night during a vacation. I just wish that Microsoft’s related Windows Store apps had better Library support (which is another topic and one of my few real complaints about the Surface).
I’d love it if someone took a deep look at this question and came up with a set of recommendations (and preferably a script) of what to compress on a Surface or other Windows RT device. I suspect one could easily free up 1-2GB with no noticeable impact on user experience. But I have other fish to fry so I won’t be the one to do it.