Jump to content

How does steam work?

Jason1232

How does Steam download updates for games without re-downloading all the files?

 

My complete guess would be some kind of checksum...check... then update based on that but i have no idea how and its kinda got me curious.

Link to comment
Share on other sites

Link to post
Share on other sites

It just downloads the new files. You're overthinking it.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

So, whats stooping it from over-writing files that don't need to be updated, and allows it to over-write the ones that do?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Jason1232 said:

So, whats stooping it from over-writing files that don't need to be updated, and allows it to over-write the ones that do?

Quote people or else they wont see it.

Steam just knows not to update those files? Like @kelvinhall05 said you're overthinking this.

Ion (Main Build)                                                                                        Overall Setup

i5 6500 3.2 GHz                                                                     -Blue snowball (White) thanks goodwill

MSI Mortar Arctic                                                                   -Logitech K120

Asus 1060 6GB Dual                                                             -Logitech Daedalus Prime G302

PNY CS1311 120 GB                                                            -Mousepad I made in 1st grade with my name on it                                                 

WD Caviar Blue 1 TB                                                              

Crucial Ballistix Sport LT White 16GB (8x2GB) 2400

NZXT S340 White

Corsair CXM 450W 

 

Lenovo H320 (Old Pre-built PC)                                      Possible upgrade for H320          

i5 650 3.2 GHz (heh)                                                                                    Xeon X3470

Motherboard unknown                                                       Same Motherboard

iGPU                                                                                   GT 1030 (MSI Low Profile Half Height)

Crucial 240GB SSD                                                           Crucial 240GB SSD

6GB DDR3 (4+2GB)                                                           8-10GB DDR3 (4+2+2GB/4+4+2GB)

Lenovo H320 case                                                             Lenovo H320 case

Unknown PSU (210W?)                                                     Same PSU (210W?)    

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Jason1232 said:

So, whats stooping it from over-writing files that don't need to be updated, and allows it to over-write the ones that do?

It only downloads the required files. If it's a bug fix, it'll overwrite the files that have been specified in the update, but otherwise, nothing gets overwritten.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, QuantumBit said:

Quote people or else they wont see it.

Steam just knows not to update those files? Like @kelvinhall05 said you're overthinking this.

I'm not overthinking it, I hate to sound like a dick but i am asking a how does something work, and your response is it just does, stop thinking about it.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Jason1232 said:

I'm not overthinking it, I hate to sound like a dick but i am asking a how does something work, and your response is it just does, stop thinking about it.

It probably uses MD5s. And if anything it probably uses a system similar to Subversion or Git for handling files.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, M.Yurizaki said:

It probably uses MD5s. And if anything it probably uses a system similar to Subversion or Git for handling files.

Now, that's useful, that gives me something i can go look into further, so thanks.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Jason1232 said:

I'm not overthinking it, I hate to sound like a dick but i am asking a how does something work, and your response is it just does, stop thinking about it.

 

 

The version of the game you have installed is known by steam as a "manifest". Different versions of a game, for example, the English and the French version of the same game, are called "depots", and the game as a whole is referenced by it's "appid".

 

When steam checks for updates, it sends your appid+depotid+manifest version to steams servers. It gets a response telling steam how many - if any - new "manifests" have been released. The manifest itself tells steam exactly what files have CHANGED between manifests, so when an update is released, steam only downloads the files changed between the current manifest, and the newest manifest.

 

You can use steamdb.info to view individual changes between manifests - here for example is the main data file for Fallout 4, showing the full filetree, and the manifests it's included in.

 

I hope this information helps.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Jason1232 said:

Now, that's useful, that gives me something i can go look into further, so thanks.

This is partially right; steam hashes files to verify their integrity, but it does not use them for the purpose of checking versions. Any changed files between manifests get completely re-downloaded, rather than the use of deltas or other patching mechanisms.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Tabs said:

The version of the game you have installed is known by steam as a "manifest". Different versions of a game, for example, the English and the French version of the same game, are called "depots", and the game as a whole is referenced by it's "appid".

 

When steam checks for updates, it sends your appid+depotid+manifest version to steams servers. It gets a response telling steam how many - if any - new "manifests" have been released. The manifest itself tells steam exactly what files have CHANGED between manifests, so when an update is released, steam only downloads the files changed between the current manifest, and the newest manifest.

 

You can use steamdb.info to view individual changes between manifests - here for example is the main data file for Fallout 4, showing the full filetree, and the manifests it's included in.

 

I hope this information helps.

Now that was just what i was looking for!

 

Thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, Tabs said:

This is partially right; steam hashes files to verify their integrity, but it does not use them for the purpose of checking versions. Any changed files between manifests get completely re-downloaded, rather than the use of deltas or other patching mechanisms.

I know its a bit crude, but was just trying to figure it out, somthing like this?
c33cf8f0be809d0a7926200de5eec4c7.png
https://gyazo.com/c33cf8f0be809d0a7926200de5eec4c7

Link to comment
Share on other sites

Link to post
Share on other sites

 

30 minutes ago, Jason1232 said:

I know its a bit crude, but was just trying to figure it out, somthing like this?

https://gyazo.com/c33cf8f0be809d0a7926200de5eec4c7

 

Almost right - Everything is perfect except the appid parent. It'd go straight from steam to Fallout 4 (appid 377163), etc since they all have separate appID's. We see the "nice name" but steam treats Fallout 4 as simply a bundle with AppID 377163.

 

 

And, when it comes to patching, effectively your machine would get a list of versions and download anything from the updates that is new.

 

So, for example:

 

App V1.0 (installed) > App V1.1 (updates to app.exe and app.dat) > App V1.2 (updates to app.dat and new file app2.dat)

 

In this scenario, Steam would download app.exe from V1.1 and the app.dat and app2.dat files form V1.2, since deltas are not used and those are the "effective" changes from V1.0 to V1.2. I know you didn't ask for clarity on this part but I thought I'd elaborate.

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, Tabs said:

 

 

Almost right - Everything is perfect except the appid parent. It'd go straight from steam to Fallout 4 (appid 377163), etc since they all have separate appID's. We see the "nice name" but steam treats Fallout 4 as simply a bundle with AppID 377163.

 

 

And, when it comes to patching, effectively your machine would get a list of versions and download anything from the updates that is new.

 

So, for example:

 

App V1.0 (installed) > App V1.1 (updates to app.exe and app.dat) > App V1.2 (updates to app.dat and new file app2.dat)

 

In this scenario, Steam would download app.exe from V1.1 and the app.dat and app2.dat files form V1.2, since deltas are not used and those are the "effective" changes from V1.0 to V1.2. I know you didn't ask for clarity on this part but I thought I'd elaborate.

I see so rename "nice names" to just 123456 (or somthing like that).

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Jason1232 said:

I see so rename "nice names" to just 123456 (or somthing like that).

Yep, pretty much. For completeness sake, underneath each of V1, V1.1 etc would be a filetree, but for the purposes of demonstrating how the system works, that pretty much nails it.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×