News for hackers. Stuff that matters.
Re:macOS Catalina 10.15.5 by TheChaplain on Wednesday May 27, 2020 @04:19AM (#23320696)
Binary patching hasn't been a thing for years unfortunately.

Even bigger wreck on consoles these days, where an update can be 50+ gigabytes...

Re:macOS Catalina 10.15.5 by ttfkam on Wednesday May 27, 2020 @11:50AM (#23325083)
Yes it has, just not for Apple. Chrome/Chromium do Courgette (binary diff) updates to great effect. Those 8GB Xcode minor release monsters could definitely use some binary diff love.

https://www.chromium.org/developers/design-documents/softwar...

Re:macOS Catalina 10.15.5 by tomxor on Wednesday May 27, 2020 @09:23AM (#23322752)
> Binary patching hasn't been a thing for years unfortunately.

True, and it's fair to say binary diffs aren't worth the complexities they introduce anymore, yet the concept of only pulling updates for individual packages has been a thing for over two decades in the *nix world. It seems like a poor choice for Apple to not bother making updates more discerning while also removing binary diffs... certainly a shitty move for anyone without a 99th percentile internet connection - then again everyone outside of that group probably can't afford Apple products anyway.

For some perspective: 3.6 GiB is significantly larger than the downloads required to install my entire OS from scratch, and 36 times larger than my average weekly run of apt.

From my now outdated experience on Mac OS i'm aware they do divide things into installer packages with some kind of receipt for version info that software update probably probes. So I guess it must be that these packages are not very granular.

Re:macOS Catalina 10.15.5 by specialist on Wednesday May 27, 2020 @10:04AM (#23323420)
> binary diffs aren't worth the complexities they introduce anymore

Noob question: Why are binary diffs impractical?

Is it because the (compiled) object code layout dances around too much? If true, isn't that fixable? Meaning: make the order more stable, to minimize the size of the diffs?

I recall a recent story/post about boosting runtime performance by optimizing object code layout. Sorry, I can't refind that article.

If true, couldn't the internals of released code be "sorted" to better enable binary diffings? Maybe the layout optimizer step would minimize the variability enough without requiring a resort.

A fun experiment would be to take a series of releases, run that layout optimizer, and then try the binary diffing again.

--

Didn't Google publish some research, maybe 10 years back, about better binary diffing for publishing updates? Apologies, but I sorta assumed it had become the norm.

Re:macOS Catalina 10.15.5 by ttfkam on Wednesday May 27, 2020 @11:53AM (#23325117)
Yep, and they use Courgette for all of their Chrome/Chromium updates. It's why no one ever sees long "Downloading update..." progress bars in that browser anymore. 100KB binary diffs are typical. Blink (no pun intended) and you'd miss the download.
Re:macOS Catalina 10.15.5 by specialist on Thursday May 28, 2020 @02:26PM (#23340605)
Result! Thank you.

Skimmed the landing page, original paper. Courgette infers program's structure for smarter diffing. My half-baked notion is somewhere in between.

Re:macOS Catalina 10.15.5 by rhencke on Friday May 29, 2020 @12:50PM (#23352341)
Check out IntelliJ's binary patching - it might be closer to what you want? It's based on bsdiff.

The actual binary patching magic happens here: https://github.com/JetBrains/intellij-community/tree/master/...

Re:macOS Catalina 10.15.5 by tomxor on Wednesday May 27, 2020 @01:59PM (#23327188)
Not a noob question... I don't know, but was assuming they were not worth the hassle from experience of using them, having lived through an era of binary diffs for old games where applying them seemed to be very computationally expensive at the time - sometimes to the point that it seemed faster to download a whole release, I assumed it was even more expensive to generate them - Those experiences may not be valid anymore in light of faster hardware or better algorithms, but the gains may also be too minimal when compared to highly granular packaging systems that various Linux distributions use these days.

Sibling comment RE chrome is an interesting one, I can imagine in the specific case of very large and frequently updated binaries like chrome it would still be beneficial to use binary patching.

Re:macOS Catalina 10.15.5 by caribousoup on Wednesday May 27, 2020 @09:52AM (#23323201)
Definitely frustrating for anyone not on broadband. There are more of us than you'd think. It's a giant 'fuck you' from the software industry, real world efficiency be damned.
Re:macOS Catalina 10.15.5 by vadarvariu on Wednesday May 27, 2020 @11:39AM (#23324932)
Totally agree. Updated to Catalina recently and on top of the huge patch size the update client doesn't seem to have any retry mechanism built in. Connection drops 9.9G into a 10G download? Too bad, start over. Just a simple wget -c would do. Incredible.
Re:macOS Catalina 10.15.5 by caribousoup on Wednesday May 27, 2020 @11:54AM (#23325141)
I wonder how many real word resources are wasted over this. It costs money to serve that data, it costs money to download that data, it congests the network wherever that data is being routed, it consumes energy however that is generated in the region.

Windows Update does this too, if the transfer fails it starts from zero. Multiply this by... what, a couple million times for each update?

I assume they run the numbers and it's cheaper to just dump all the data and run things inefficiently, compared to having teams deploy it correctly. It's just a waste though, and it pisses off your customers.

Re:macOS Catalina 10.15.5 by vadarvariu on Wednesday May 27, 2020 @12:22PM (#23325599)
My personal monthly usage is in the 100G region; this particular failed update has cost me 20G of burned bandwidth. Where I live around 2% of the country doesn't have access to decent broadband. Since these updates are released every 2 months or so in a very back-of-the-envelope fashion failed updates amount to 0.2% of the country's total bandwidth usage. I might be an order of magnitude off but that is still an incredible waste.

Maybe they did run the numbers, but the amount of engineering effort required to fix it is absolutely minimal (couple of lines...). A significantly worse outcome for society as a whole at the cost of a try-catch block.

Re:macOS Catalina 10.15.5 by teknologist on Wednesday May 27, 2020 @10:14AM (#23323578)
JetBrains still do updates with binary patching for many (all?) of their products, and the experience is really nice.
Re:macOS Catalina 10.15.5 by drampelt on Wednesday May 27, 2020 @11:12AM (#23324542)
Yeah, it's awesome having regular < 100mb updates for their IDEs and Android Studio compared to 7+ GB Xcode downloads :(
Re:macOS Catalina 10.15.5 by hawski on Wednesday May 27, 2020 @05:15AM (#23321033)
If they would only use something like rsync or ostree at the least. But if the biggest files are archives it would require recompression. If it's more like an uncompressed tar archive then it should be easier, but still it would require either a clever algorithm or the format support by the algorithm.
Re:macOS Catalina 10.15.5 by ascagnel_ on Wednesday May 27, 2020 @10:22AM (#23323743)
Xbox 360 patches were handled differently -- only the game binary would be included in the initial patch; any content updates were released as free DLC add-on packs (or, if a game was releasing new paid DLC, they'd require a new add-on pack that included some subset of the new content for free).

PS4 updates are notably bad, since they do a full copy & write (vs write-in-place) on patches. It's good if there's an issue on updating, since you can delete the partially-updated copy and start over, but bad because it requires more than 2x the disk space for the patch.

Re:macOS Catalina 10.15.5 by modzu on Wednesday May 27, 2020 @12:35PM (#23325854)
i visited my brother last night and he threw on the xbox. it forced an update. then it downloaded almost a gig and threw an error. then it started again and installed and rebooted and installed.. about half an hour later we'd moved onto other things and never even played it. answered my question about whether or not i wanted one though! lol
Re:macOS Catalina 10.15.5 by Hamuko on Wednesday May 27, 2020 @04:45AM (#23320879)
Where are you getting 50+ GB console updates?
Re:macOS Catalina 10.15.5 by Operyl on Wednesday May 27, 2020 @04:48AM (#23320893)
I think they’re referring to games. A good example? CoD Modern Warfare (the recent one) _always_ seems to have 50GB updates. It is rather annoying, even with fast internet.
Re:macOS Catalina 10.15.5 by kjakm on Wednesday May 27, 2020 @08:54AM (#23322433)
Modern Warfare is a nightmare. 50-80GB updates every month and no online play until you update. That can be over 12 hours for me. It's one thing I've noticed since getting a console recently after not having one since the PS2 era. Huge updates constantly. Even when you buy a disc they have to download a bunch of stuff. Such a horrible user experience.
Re:macOS Catalina 10.15.5 by raihansaputra on Wednesday May 27, 2020 @06:06AM (#23321266)
Usually it's around 30GB. I play on PC and have to remind all of my party to update the night before. Each update seems to only come with small changes, and the total game size only increases by ~5GB usually. So they're either recompressing previous assets or changing stuff that can't be patched in along with new content. These updates usually happens every week/every other week. It's insane. I think all of the previous CoD:MW titles combined isn't as big as this one alone.
Re:macOS Catalina 10.15.5 by prputnam on Wednesday May 27, 2020 @11:05AM (#23324443)
My girlfriend and I play with our old roommates most evenings as of late - we've gotten in the habit of turning on my gaming rig and her PS4 around lunch to suss out any updates. We are lucky to have symmetrical gig internet, but even with an Ethernet cable connected the PS4 download speeds abysmal. Those COD patches really are monstrous.
Re:macOS Catalina 10.15.5 by raihansaputra on Thursday May 28, 2020 @02:05AM (#23333952)
Newer games in general have these humongous updates. I’m somehow pleasantly surprised when checking that GTA V total size is 90GB all in. An open world online game with endless possibilities. Fortnite, a way simpler game, is ~70GB with monstrous patches too. I really wonder what is in those files..
Re:macOS Catalina 10.15.5 by tibbydudeza on Wednesday May 27, 2020 @11:04AM (#23324429)
Probably how the stuff is packaged for consoles where content is continuously streamed to make up for the limited memory on consoles and anemic CPU's so texture maps , world data and game logic are interleaved.

Patching all of that is difficult to it is probably easier to replace the content streams in one go.

Re:macOS Catalina 10.15.5 by Operyl on Wednesday May 27, 2020 @03:47PM (#23328932)
This is the case for both PC and consoles for this game :).
Re:macOS Catalina 10.15.5 by Hamuko on Wednesday May 27, 2020 @05:24AM (#23321080)
I can't remember a time I've downloaded a patch that is as big as the base game on a console. Granted, most of the games I play are on physical copies.
Re:macOS Catalina 10.15.5 by tibbydudeza on Wednesday May 27, 2020 @11:01AM (#23324393)
Chrome uses binary patching mechanism rather reliably for millions of users.