20 ms·
> We live in a post-file-system-compression world. You'd think so, but allow me to point at my steamapps folder saving 20% disk space even with the not-very-go
by Dylan16807 10y ago
> We live in a post-file-system-compression world.
You'd think so, but allow me to point at my steamapps folder saving 20% disk space even with the not-very-good compression that NTFS offers. If it could use a better algorithm and a block size of 2MB instead of 64KB, it could nearly double that.
Hard drives have always been growing in size. We have always been in a 'post-file-system-compression' world. But people want to do things like fit on an SSD, so compression continues to be useful.
I just wish it didn't ultra-fragment files on purpose.
- danieldk 10y agoWe have always been in a 'post-file-system-compression' world. But people want to do things like fit on an SSD, so compression continues to be useful. Note though that some controllers do compression to reduce write amplification (e.g. the SandForce controllers used to do this). So, by using filesystem compression, you might be increasing write amplification and shortening the SSD lifetime.
- rictic 10y agoIs that increasing write amplification to a meaningful degree? Compressing already compressed data is generally only slightly less efficient than just compressing the data once, isn't it?
- danieldk 10y agoThat's an interesting question. As far as I understand, yes. If you buy, say an 256GB SSD backed by roughly the same amount of storage in physical cells. Such an SSD stores 256 GB regardless whether it is compressed or not. Now suppose that we have a compressed filesystem and an uncompressed filesystem and that both the filesystem and controller compression rates are 2:1. Now let's compare the two scenarios: 1. With filesystem compression: you could store twice the amount of data (~512GB). However, since the controller is not able to compress the data, all cells are completely full. 2. Without filesystem compression: you can store 256GB data. However, since the controller can compress the data, only half of the actual cells are used. Suppose now that in both setups, the SSD is nearly full and we rewrite or perhaps extend some data. In the former case, the controller has to scavenge for partially-used cells to combine and erase. In the latter case, the SSD controller still has 128GB of pristine cells to write the changed data immediately. Of course, compression was always somewhat of a cheapskate solution (and one of the reasons the SandForce controllers are not liked much). Higher-end SSDs would just have more storage space than logically addressable to have some leeway when the SSD is almost full.
- Const-me 10y agoYou have 2MB data. You compress it to 1MB, SandForce controller fails to do anything because already compressed, writes it to flash, and you wear out 1MB of physical flash memory. You don’t compress it, SandForce controller compresses it to 1MB, writes it to flash, and you wear out same 1MB of physical flash memory. How (1) might be increasing write amplification and shortening the SSD lifetime compared to (2)? Aren’t they nearly equivalent?
- dr_zoidberg 10y agoI'm left thinking if the extension mechanisms in NTFS can be used to implement a better compression scheme with support from the application level (instead of filesystem level). Or if Microsoft could sit and define a new version of NTFS in which they change LZNT to LZNT2 with better compression ratios and different requirements for modern systems :)
- mikeash 10y agoThe justification that hard drives need to work everywhere is a little weird. Most drives stay in their host machine until they die. Requiring some recent version of Windows to read the files wouldn't be a hardship. A little checkbox that saves you X% storage space and Y% CPU time in exchange for such a requirement would be useful.
- acdha 10y ago> The justification that hard drives need to work everywhere is a little weird. I think it's a pure anachronism at this point: it makes more sense to me in the era where small drive sizes meant a lot of professional users relied on external drives and “just upload it” wasn't going to fly with a 9600bps modem, not to mention hardware costing more and failing increasing the need to move drives between machines simply to get back in service.
- nullymcnull 10y ago> The justification that hard drives need to work everywhere is a little weird. Most drives stay in their host machine until they die. The article was pretty clear that the context they had in mind for this requirement was servers in a data center, not your home machine: > Without that requirement, a hard drive might be usable only on the system that created it, which would create a major obstacle for data centers (not to mention data recovery). Keep in mind they still thought they'd be targeting Alpha processors as late as the Win2K RC's.
- mikeash 10y agoHow is that a major concern for data centers? I thought drives typically stayed in a data center machine until they died too. And even if you were swapping them around, you'd only have a requirement for a certain newer OS, not the exact same physical hardware.
- AaronFriel 10y agoThere isn't really a Good Way(TM)* to avoid file fragmentation when using compression that allows arbitrary seeks. Thought experiment: take a large easily compressed file, and write 1MB of random data in the middle. That new data won't compress as well, and so it'll have to be stored elsewhere. Filesystem implemented deduplication is probably a much better long-term strategy than filesystem compression, but both online deduplication and online compression can impose hefty costs on frequently written data. ZFS and BTRFS can "get away" with implementing better compression because they're copy-on-write by default. In that model, compression can actually reduce the cost of the read-modify-write, and clever use of journaling and caching can reduce the cost of fragmentation. * - that I'm aware of, I won't pretend to know the state of the art.
- TylerE 10y agoIs fragmentation really an issue on SSD? Isn't access essentially O(1)?
- user5994461 10y agoIndeed. SSD don't fragment. "Fragmentation" is a property of rotating devices.
- rndgermandude 10y agoFiles will be still fragmented. However, you aren't affected by seek times. The OS/file system still has to keep metadata about where stuff is stored, and many files fragmented into many tiny slices will bloat that metadata, meaning you may spend a little more time needing to read that metadata from disk (and space storing it in the first place) and spend a little more time to "re-assemble" these slices into something virtually continuous the user land expects. More metadata may also mean disk caches become full more quickly, leading to metadata being evicted more often. This may all not matter on a beefy laptop/desktop/server, but your underpowered, memory-challenged ARM SoC NAS may notice a bit.
- echlebek 10y ago
- izacus 10y agoThe fact that modern games don't even bother to compress audio and are thus 50GB in size doesn't help eiter :)
- jblow 10y agoIt takes CPU to decompress audio, and games can easily be playing 100+ SFX at once.
- bitwize 10y agoSo load the clips from disk and pre-decompress them before firing the main engine up.
- striking 10y agoOr decompress them on level load or otherwise idle time.
- eropple 10y agoThis increases load times. Load times are already The Devil(tm). Disk space is cheap. Player time isn't.
- striking 10y agoThe neat thing about audio is that you can stream it in. Decompressing the most important sounds right at the beginning of the load screen for a scene or before the last one ends, and then streaming in the rest, would probably work well enough. (and sandbox games have idle zones and low-CPU times, so that's when you can do that.) Players don't expect much from load times anyway. And, no, my time as someone who plays video games is much cheaper than today's SSD storage. I wondered a few days ago why my Windows disk was so full. Video games. Literally 50% of it was video games. If I could save a couple GB on that, I'd be willing to give up a couple more seconds on every level reload.
- LeifCarrotson 10y ago> my steamapps folder saving 20% disk space even with the not-very-good compression that NTFS offers Wait, you run the Steam apps from a compressed folder? Doesn't that kill performance? Regardless, I have long felt that the right way for Steam to make this work would be to have, in addition to the "Download" and "Delete" tools, an "Archive" button that moves it to a specified path (by default, on the install drive, but configurable to another drive or a NAS) and compresses it - with whatever compression they want. I want my Steam apps uncompressed on my SSD. I don't have room on my SSD for hundreds of gigabytes of Skyrim textures that I haven't played in 6 months. But if I delete the app, then I have to wait hours (and cause Steam some expense) to download it again. Not everyone has multiple drives or a NAS, but a local archive would definitely be useful.
- detaro 10y agoYou can use Steam's backup feature for that, at least for games that manage their updates through Steam: https://support.steampowered.com/kb_article.php?ref=8794-YPHV-2033 https://support.steampowered.com/kb_article.php?ref=8794-YPH... Also useful if you don't have fast internet for your gaming PC, but access to it somewhere else.
- deleted 10y ago[deleted]
- wbkang 10y agoNo it does not kill performance. Decompression is a very fast operation. I have all of my drives compressed, it is fine.
- btym 10y agoIn my case having it compressed on SSD would greatly improve performance... because my steamapps directory is on a large spinning disk due to size ;)
- outworlder 10y ago> Wait, you run the Steam apps from a compressed folder? Doesn't that kill performance? No. In fact, it may improve performance, by virtue of transferring less data from slower I/O devices. Yes, slower, even if it's a SSD.
- marcosdumay 10y agoThe reason we are in a "post file system compression" world is because the format of every large file people have around is already compressed. Thus, there's nothing to gain in an extra layer of compression. But it seems game developers didn't get the memo...
- justin66 10y ago> But it seems game developers didn't get the memo... Except they totally did. You'll find that most game assets are already compressed, and compressed using an algorithm that allows for reasonably quick decompression using the CPUs of the day.
- greysphere 10y agoThey didn't get the memo, they wrote the memo: http://www.radgametools.com/oodle.htm http://www.radgametools.com/oodle.htm
- tr1ck5t3r 10y agoThis is just a spin document with fake constraints made to justify poor coding and/or the inability to licence real code and/or to get more money. Do you think winzip users consider those points cited by MS when zipping files? More like a case of MS wanted to suckle the Fed's law enforcement wallet by introducing insecurity through convenience.