News for hackers. Stuff that matters.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by CydeWeys on Wednesday November 14, 2018 @12:15PM (#18451535)
It's always amazed me how downright inefficient patching is, even though better algorithms have existing for literally decades. The typical implementation is that you have to re-download every single resource that's changed, even if the resource is gigabytes large and only a bit in it has changed.

Someone should calculate how many petabytes of Internet transfer capacity are wasted annually solely due to bad algorithms used in performing software updates. It'd be a surprisingly large figure.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by pcwalton on Wednesday November 14, 2018 @12:54PM (#18451970)
One important issue is that if the patch program goes wrong, you can easily end up with customers having broken installations that you can't fix. The patching software is how you distribute updates, so it has to work. So there's strong incentive to deploy simple techniques with fewer failure modes as opposed to optimizing away every last byte of network traffic.

Firefox has historically shied away from complicated patch algorithms for this reason among others. (To be fair, of course, we're also dealing with several orders of magnitude less data than AAA games are...)

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by CydeWeys on Wednesday November 14, 2018 @01:35PM (#18452438)
If the patch doesn't apply cleanly, don't apply it. The command-line `patch` utility works just fine for this. Transactional updates with rollback on failure are a solved problem.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by kbenson on Wednesday November 14, 2018 @02:09PM (#18452840)
Is patch generally applied to resources I the multiple gigabyte range, very possibly with the original resource size exceeding the total amount of installed RAM in the system?

Patching small to moderate sized resources transactional ly might be a solved problem, but I imagine doing so on large resources in an acceptable time frame may not be for this use case.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by TeMPOraL on Wednesday November 14, 2018 @04:02PM (#18453916)
> Is patch generally applied to resources I the multiple gigabyte range, very possibly with the original resource size exceeding the total amount of installed RAM in the system?

That's where bundling all your data files into a single large archive bites you in the butt. Individual files the game uses ain't gonna be that large.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by Tehdasi on Wednesday November 14, 2018 @04:28PM (#18454143)
The reason why games have such large files is that the fastest way of loading a game is to do a serial read of the data, ergo the large files.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by kbenson on Wednesday November 14, 2018 @04:45PM (#18454307)
Sure, but now we're talking about game developers making choices based on distribution and patching instead of what they would likely view as more important considerations, such as performance and ease of development use.

Perhaps they could break stuff apart prior to shipping, but I imagine that could cause a lot of QA headaches as sure it should all work perfectly fine if a solution is used that transparently supports both combined and split formats, but who wants to bet the ship date of a multi-hundred million dollar project on that?

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by rob_fulwell on Thursday November 15, 2018 @04:03AM (#18457893)
Welcome to the launch of the Xbox One.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by reaperducer on Wednesday November 14, 2018 @02:54PM (#18453248)
you can easily end up with customers having broken installations that you can't fix

I sometimes wonder if games were distributed on cartridge again if they would be more thoroughly tested before being released.

Plus, they'd load a brazillion times faster.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by tracker1 on Wednesday November 14, 2018 @03:35PM (#18453641)
TBH, I think that cartridges in this case could be replaced by USB thumb drive keys... effectively a 128GB USB drive with a hardware key, and maybe even an embedded OS. Updates download and apply into the Key. Take it with you, run on any common x86 system, it could be great.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by heimidal on Wednesday November 14, 2018 @03:07PM (#18453352)
Consumer expectations of scope, game length, release time tables, DLC, etc. have made this an impossibility.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by Jasper_ on Wednesday November 14, 2018 @12:30PM (#18451697)
SteamPipe breaks all bits of content up into ~1MiB chunks, and then fetches those chunks. As long as you align your packfiles to 1MB boundaries, and keep your content sorted, only new chunks will be downloaded. Unfortunately, a lot of developers don't follow these guidelines for a number of reasons, and basically generate a whole new set of chunks with every update.

This includes a game I work on, because it's built in a version of Unreal where we do not want to drastically change the packfile format and modify the build process to handle this case.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by PezzaDev on Wednesday November 14, 2018 @04:28PM (#18454149)
Do you know where I could find details about how to optimise for SteamPipe?
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by Jasper_ on Wednesday November 14, 2018 @06:34PM (#18455310)
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by pizzapill on Wednesday November 14, 2018 @01:44PM (#18452543)
Only companies that are bad at tech implement it this way.

Bethesda is really bad at tech. They use a ancient engine that binds physics calculation to frames and can't go over 60 FPS. They warned Fallout 76 fans during the Beta that they should not click the "Update" button (big download, game screwed). They trust the game client 100%. You can hack/cheat in this multiplayer game by changing INI files with a text editor.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by mjevans on Wednesday November 14, 2018 @05:36PM (#18454847)
Basic idea:

If the file is smaller than 10x the base patch unit size: don't bother just add the whole file as a single unit / send it all for each update.

Else: Create a manifest of the file: Size on Disk, Checksum of file, Name of file mapping to (one or more) list of segments within file by segment offset, segment size, segment checksum. A custom list might be provided by a resource packer that is aware of assets / code segments within the file.

A website will provide an interface that has a list of file names to target size/hashes.

There will also be a list by size/hash that enumerates the segment lists within the file.

To update, the file size/checksum would be computed and the manifests obtained from the server; these would be compared to the files on disk and invalid segments/files discarded.

The target version would then be selected and the target manifests collected. First limited by filename and then optionally project wide, segments would be matched first checking size then checksum. There are a couple different methods that might then be optimal depending on the desired outcome, which depend on disk space, operating system support for hard-linking/de-duplicating subsegments of a file, if the media is known to be an SSD or spinning rust, etc.

However, in any event, that infrastructure allows for easily checking and upgrading / repairing to any version from any version at the expense of storing a small quantity of metadata and having full copies via the actual delivery service for segments on file. The backend might also have de-duplication of the stored data as a bonus.

This is probably a very naive implementation of compression via de-duplication and should be obvious to anyone skilled in this form of art.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by kardos on Wednesday November 14, 2018 @12:21PM (#18451608)
> It'd be a surprisingly large figure.

It would be a rather large figure, but I'd wager that superfluous video streaming (eg, video advertising, or youtube/netflix autoplaying to no audience) overwhelmingly dwarfs any bandwidth wasted on suboptimal update delivery.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by zorked on Wednesday November 14, 2018 @02:23PM (#18452975)
Among others there's the issue that patching may be a seek-heavy operation. Downloading a 40GB file over a fiber connection is much faster than merging 8GB of new textures into a 32G file on a console that has a HDD.

When downloading from a fiber connection to a PS4 HDD the bottleneck is likely the HDD's speed. To merge a file you would need to at least read it and write it again, which is at least twice as slow as simply downloading it. Alternatively you can pay the cost by seeking constantly instead (like a texture per file), which may be even slower and probably sucks at runtime.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by mejari on Wednesday November 14, 2018 @02:46PM (#18453183)
Only a quarter of the US even has the option of fiber, much less actually have it. It's silly to use ideal fiber transfer rates as the argument for downloading whole-hog vs more targeted patching, and I doubt it's the reasoning they use.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by Tsubasachan on Wednesday November 14, 2018 @04:36PM (#18454226)
And don't forget that Sony and Microsoft need the infrastructure in place for handling millions of people patching the game at the same time...
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by tracker1 on Wednesday November 14, 2018 @03:56PM (#18453859)
If it's one 32G file, there's already something wrong...
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by TrevorJ on Wednesday November 14, 2018 @01:33PM (#18452422)
I've been pretty surprised at how good a job steam does at this. When I release an update for my game, the download size is typically quite tiny relative to all the files I've touched.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by hamilyon2 on Wednesday November 14, 2018 @01:44PM (#18452555)
Steam itself however downloads full installation, as it seems. Which is interesting.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by makomk on Wednesday November 14, 2018 @06:13PM (#18455131)
If a game update goes wrong, they can just send down another update. If a Steam update goes wrong...

(This has sort of happened. Valve managed to roll out a version of the launcher for Linux a while back which used instructions not available on older CPUs, and crashed before it reached the point where it could check for updates. Was a pain. Normally, if Steam exits uncleanly they force an update check immediately on next restart, but if it never gets that far you're screwed.)

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by gmueckl on Wednesday November 14, 2018 @04:41PM (#18454278)
Self-updating on Windows is a horrible thing to get right. I wouldn't be surprised if they did this to keep the complexity of the process as low as possible.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by billfruit on Wednesday November 14, 2018 @02:56PM (#18453264)
The pirates seems to have mastered the art of compressing assets to create distribution packages of manageable size. Maybe legit publishers needs to learn a few lessons from them.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by krferriter on Wednesday November 14, 2018 @05:05PM (#18454524)
That's because pirates care more about user experience and know more about digital packaging than the publishers do. People getting content from pirates can just switch to another source at any time if one pirate does a bad job. People getting content from official publishers are stuck with whatever they put out.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by Sohcahtoa82 on Wednesday November 14, 2018 @03:29PM (#18453564)
There was one game (I think one of the really old Unreal Tournament games) that had all the sound files as .wav files, which made the game huge. Many people were still on dialup at the time, so pirating it would have taken over a week to download it.

Well, one pirate group compressed all the .wav files into MP3s and wrote a quick batch script to decompress them all back into the .wav's. Turned a 700 megabyte download into a little under 100 megabytes.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by nullify88 on Wednesday November 14, 2018 @06:26PM (#18455255)
Jeez that takes me back. CORE, CLS... Some games were compressed with UHARC or ACE which performed better than other compressors at the time. mp3unpack or WAVE injector would also run to decompress the mp3s or recombine them back in to large solid files. All that while having some banging chip tune and a snazzy animation play. CLASS!
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by lacker on Thursday November 15, 2018 @11:45PM (#18466491)
At that time it might also have been illegal to distribute an mp3 decoder without paying royalties.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by skunkworker on Wednesday November 14, 2018 @01:58PM (#18452701)
Apple has had delta app updating since iOS 6 and I know that Steam also does this. The real issue becomes a combination of, 1. How fast is your internet connection. 2. How fast is your HDD to read the newly downloaded data and patch the existing file. (When I used to have my steam games/windows on an HDD this took forever.)
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by jayd16 on Wednesday November 14, 2018 @12:21PM (#18451603)
Is there a way for public users to rsync(or whatever flavor of "better algoritm" you like) to traditional CDNs like Akamai?
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by asgeir on Wednesday November 14, 2018 @12:38PM (#18451794)
zchunk, zsync, and casync spring to mind. zchunk and zsync require support for range queries but casync splits the chunks into multiple files. https://github.com/zchunk/zchunk http://zsync.moria.org.uk/ https://github.com/systemd/casync
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by kardos on Wednesday November 14, 2018 @12:23PM (#18451635)
The linux RPM world has "delta RPMs" which lets you ship much smaller packages when updating. I don't see any blocker to delivering these through a CDN. Not sure if this is quite what you were asking.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by paulryanrogers on Wednesday November 14, 2018 @03:19PM (#18453464)
I believe the Deb world also has Jigsaw
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by toomuchtodo on Wednesday November 14, 2018 @12:22PM (#18451621)
The closest you'd come to such a setup is a squid proxy with some prefetching (besides bittorrent, which CDNs don't support until IPFS is a first class citizen).
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by toomuchtodo on Wednesday November 14, 2018 @12:17PM (#18451551)
Internet transfer capacity is not wasted unless it goes unused (or data transferred caused other data that was needed urgently to be queued). For example, you could say any links not currently near full utilization are going to waste.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by egypturnash on Wednesday November 14, 2018 @12:28PM (#18451680)
If a hard drive doesn’t need to spin up because the patch you’re serving a zillion copies of fits in cache, you’re saving the power to run it and the heat it would have generated.

Similarly with all the other resources that would be used on its journey between the data center and the end user. You’re wasting time if you could send an efficiently-generated 2 gig patch instead of a 60 gig file, especially for users in remote places. You’re taking up more space and cycles on your CDN. CPUs switch from idle power consumption to active. Every stage you can think of takes some amount of power and other resources, and if you’re delivering an unnecessarily huge file, you’re wasting everything it took to run all the steps along the way.

Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by toomuchtodo on Wednesday November 14, 2018 @12:40PM (#18451817)
Human time is most valuable compared to the various waste you mention (cycles on CDNs, power, heat, etc).
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by CydeWeys on Wednesday November 14, 2018 @01:24PM (#18452313)
And a lot of human time is being wasted waiting for update operations that take much longer than necessary.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by TeMPOraL on Wednesday November 14, 2018 @04:07PM (#18453947)
Yes, the oft repeated mantra in this industry. It's a cute thing to say when it's about saving your (developer) time by externalizing energy use on other people.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by toomuchtodo on Wednesday November 14, 2018 @04:11PM (#18453992)
The world is awash in energy. Time is fleeting. Sort of a cheap shot to call it "cute" when it's factually accurate. I'm sure your time is worth more than overly optimizing every technical process to save a few KwH of power.
Re:Fallout 76 Day One Patch Is Larger Than the Game Itself by TeMPOraL on Wednesday November 14, 2018 @04:21PM (#18454083)
A few kWh of power times a million users. I'm not complaining about individuals buying time by paying for energy. I'm talking about saving little time for yourself by burning a disproportionate amount of power, distributed among all your users.