steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

Move download cache inside user defined Steam Library location

Open Ghostbird opened this issue 6 years ago • 4 comments

Your system information

  • Steam client version (build number or date): Mar 20 2019 at 18:38:53, API v018, package versions 1553121671
  • Distribution (e.g. Ubuntu): Debian 10 “Buster”
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

I have a Linux system set-up where I have a relatively small solid state drive partitioned into / and /home and a 1TB hard-disk drive where I store my data. My Steam Library is located on the hard-disk.

Today I got a system notification that the SSD was full, and several of my programs misbehaved (including Steam). However, there was no real reason for it to be full. I then found out that the current Steam Client will store games in ~/.steam/steam/steamapps/downloading while downloading.

This is a problem for me for two reasons:

  • Some games are simply too big, they would require that I keep about 30% of my entire SSD free, just to install them.
  • It is highly inefficient in cases such as mine where the data is on separate file-systems, since the move from the download location to the actual final storage location is not a simple rename of the inode, but a full cross-file-system copy and erase. Note: It is even worse when the data is on another file-system on the same device such as common on Windows PCs with a single storage device divided into both C and D partitions. In this case, the reads and writes compete for device utilisation decreasing the total throughput even further.

Could you please consider moving the temporary download folder into the user designated Steam Library folder? Please consider that when a user has explicitly set a non-default Steam Library folder, there is usually a very good reason.

Steps for reproducing this issue:

  1. Install the steam client on a system with a small home partition
  2. Set the Steam Library folder to a different (bigger) partition
  3. Attempt to download a game that exceeds the total remaining free space on the home partition, but is smaller than the total remaining free space on the partition that holds the Steam Library.

Ghostbird avatar Mar 21 '19 15:03 Ghostbird

Note that a bind mount won't necessarily solve this issue since the Steam client doesn't seem to like moving very large files (>2GB) across filesystem boundaries for some reason.

TehFreek avatar Mar 21 '19 17:03 TehFreek

I agree it should be where it will be installed, but not like that can't run out of space either so i don't necessarily see this solving a free space issue. I see that as a user issue (all drives can be low on free space potentially so this cannot be 100% solved except by user).

Maybe 1st check drive where it will be installed except when low on space and in that case check home drive/partition free space, and if not then fail.

ghost avatar Mar 25 '19 01:03 ghost

I agree it should be where it will be installed, but not like that can't run out of space either so i don't necessarily see this solving a free space issue. I see that as a user issue (all drives can be low on free space potentially so this cannot be 100% solved except by user).

Maybe 1st check drive where it will be installed except when low on space and in that case check home drive/partition free space, and if not then fail.

I'm glad that you agree, with the location change. I agree that running out of space is a user issue. My point for this issue is not about running out of space at all. That is just an unfortunate side effect. In fact, the slowdown when moving files across filesystem boundaries is a far bigger issue, but is far more obscure, and I only managed to pinpoint it after I found this issue due to running out of disk space.

I propose that we hand the user full control and full responsibility.

Your proposal to check multiple drives seems overkill to me. The user has confirmed the library folder to use when he initialised the game installation. Steam will at that point calculate whether enough disk space is free for the installed game. The download is AFAIK always smaller than the installed game. Hence the user knows¹ that the system will not run out of space, if the download is cached on the same volume.

  1. Of course some edge cases might still apply, but those are outside the control of the user and likely unknown to them. These potential issues can be considered as they arise.

Ghostbird avatar Apr 04 '19 07:04 Ghostbird

Hit the issue just an hour ago. I have a smaller SSD for OS and /home. My Steam library is on a larger SSD. I had 30GB free, the update was reported by Steam to have 5GB. Steam very quickly (a minute?) allocated 15GB and most likely hit the root reserved space. Whole desktop was extra slow (reaction times 30s+), it was an agony just to kill Steam. I'll try to use a link or bind mount, but it would be better if Steam allowed the user to select the location of the download cache.

mnn avatar Jul 27 '22 06:07 mnn