Steam Deck
Valve add an official way to increase swap file size
I saw there was a download that can let you increase your swap file size from the default size of 1 gig and can improve the systems performance

It’s easy enough to do this but it would be nice if there was an official way to do it in the decks settings
Legutóbb szerkesztette: BlueManifest; 2022. okt. 19., 21:12
< >
1622/22 megjegyzés mutatása
qunow886 eredeti hozzászólása:
#/DragonKeeper eredeti hozzászólása:
Linux system will use ram on the active programs before swap. If your ram is not fully being utilized then swap wont be used.
Therefore unless you are running alot of background stuff and have this specific game on the ultra/highest settings (which wouldnt be anywhere close to playable) you arent going to use all the ram.

adding more swap is for sure a placebo

swap also runs on your ssd which is significantly slower than ram and if anything would be a bottle neck
As I mentioned above there are simulation games that will exhaust 16G before long
Then just add another file. You arent limited to 1 swap file. or change the current one.

you can do it by 1st creating the file
sudo dd if=/dev/zero of=/home/deck/swapfile bs=1M count=4096
-- this will create a 4gb file
sudo chmod 600 /home/deck/swapfile
-- you must change the permissions so only root can read it
sudo mkswap /home/deck/swapfile
-- then format the file from data to swap
sudo swapon /home/deck/swapfile
-- and finally turn on the swaps usage
sudo swapon --show
-- you can then check to see if its active
sudo swapoff /home/deck/swapfile
-- this will turn its usage off if need be

obviously would be good to have an built in method but i dont think that many will run into this and the addition/change is very simple.

you can also then add the file to /etc/fstab to retain its usage after reboot
Legutóbb szerkesztette: d[-_-]b; 2023. jan. 7., 6:22
#/DragonKeeper eredeti hozzászólása:
qunow886 eredeti hozzászólása:
As I mentioned above there are simulation games that will exhaust 16G before long
Then just add another file. You arent limited to 1 swap file. or change the current one.

you can do it by 1st creating the file
sudo dd if=/dev/zero of=/home/deck/swapfile bs=1M count=4096
-- this will create a 4gb file
sudo chmod 600 /home/deck/swapfile
-- you must change the permissions so only root can read it
sudo mkswap /home/deck/swapfile
-- then format the file from data to swap
sudo swapon /home/deck/swapfile
-- and finally turn on the swaps usage
sudo swapon --show
-- you can then check to see if its active
sudo swapoff /home/deck/swapfile
-- this will turn its usage off if need be

obviously would be good to have an built in method but i dont think that many will run into this and the addition/change is very simple.

you can also then add the file to /etc/fstab to retain its usage after reboot
There are already third party tools that can do all these in 3 clicks, but they are third party
qunow886 eredeti hozzászólása:
#/DragonKeeper eredeti hozzászólása:
Then just add another file. You arent limited to 1 swap file. or change the current one.

you can do it by 1st creating the file
sudo dd if=/dev/zero of=/home/deck/swapfile bs=1M count=4096
-- this will create a 4gb file
sudo chmod 600 /home/deck/swapfile
-- you must change the permissions so only root can read it
sudo mkswap /home/deck/swapfile
-- then format the file from data to swap
sudo swapon /home/deck/swapfile
-- and finally turn on the swaps usage
sudo swapon --show
-- you can then check to see if its active
sudo swapoff /home/deck/swapfile
-- this will turn its usage off if need be

obviously would be good to have an built in method but i dont think that many will run into this and the addition/change is very simple.

you can also then add the file to /etc/fstab to retain its usage after reboot
There are already third party tools that can do all these in 3 clicks, but they are third party
not exactly a difficult process where a "tool" is needed. tbh. just make the file and turn its use on and off
d-_-b eredeti hozzászólása:
BlueManifest eredeti hozzászólása:
It’s pretty well known the performance improvements if you read about it on the steam deck sub reddit, not placebo

Having the option to do it doesn’t hurt anyone, if you don’t think it helps then you don’t have to use it
If your ram is not fully being utilized then swap wont be used.

This is actually not true. Read up on the "swappiness" value which determines the aggressiveness of swapping. The default is 60 and the Steam Deck appears to be at 100 (as aggressive as it gets). It will swap long before running out of system memory. During normal usage you will be using both system memory and swap. If you were to disable swap, it would actually severely impact system performance negatively. This is actually a bit more complicated than a lot of people think, everyone seems to have that moment where they think they'll disable swap or lower their swappiness value, just to find everything is worse than before. I would advise never disabling swap or changing the swappiness value (or at least not lowering it), and usually I'd have at least half as much swap as I do RAM. The old common advice was to create twice as much swap as RAM, but as common RAM amounts went up it seemed a bit ridiculous to keep doubling it, so I'll do 8GB swap for 16GB RAM and so on.
I can't say one way or another whether your FPS will improve increasing the swap file size (I'm not sure why it would, but I guess it's possible), but I happened across this thread while looking up where the Deck's swap file was stored and thought I'd chime in.
soundtoxin eredeti hozzászólása:
d-_-b eredeti hozzászólása:
If your ram is not fully being utilized then swap wont be used.

This is actually not true. Read up on the "swappiness" value which determines the aggressiveness of swapping. The default is 60 and the Steam Deck appears to be at 100 (as aggressive as it gets).

With SteamOS 3.5 the swappiness value is set to 60 instead of 100, wonder why it was even set to 100 in the first place.
soundtoxin eredeti hozzászólása:
d-_-b eredeti hozzászólása:
If your ram is not fully being utilized then swap wont be used.

This is actually not true. Read up on the "swappiness" value which determines the aggressiveness of swapping. The default is 60 and the Steam Deck appears to be at 100 (as aggressive as it gets). It will swap long before running out of system memory. During normal usage you will be using both system memory and swap. If you were to disable swap, it would actually severely impact system performance negatively. This is actually a bit more complicated than a lot of people think, everyone seems to have that moment where they think they'll disable swap or lower their swappiness value, just to find everything is worse than before. I would advise never disabling swap or changing the swappiness value (or at least not lowering it), and usually I'd have at least half as much swap as I do RAM. The old common advice was to create twice as much swap as RAM, but as common RAM amounts went up it seemed a bit ridiculous to keep doubling it, so I'll do 8GB swap for 16GB RAM and so on.
I can't say one way or another whether your FPS will improve increasing the swap file size (I'm not sure why it would, but I guess it's possible), but I happened across this thread while looking up where the Deck's swap file was stored and thought I'd chime in.
Cryoutilities sets the swap file to 16 GB and the swappiness to 1
X_m7 eredeti hozzászólása:
soundtoxin eredeti hozzászólása:

This is actually not true. Read up on the "swappiness" value which determines the aggressiveness of swapping. The default is 60 and the Steam Deck appears to be at 100 (as aggressive as it gets).

With SteamOS 3.5 the swappiness value is set to 60 instead of 100, wonder why it was even set to 100 in the first place.


Steam decks are SSD. The storage is fast enough for 100 swappiness to not be an issue.

https://lwn.net/Articles/690079/

Kernel devs have talked about increasing the swappiness for fast SSD to 200. However, I believe Valve made the right decision to decrease to 60 because they also release eMMC steam decks. eMMC might be slower than HDD.

The first step in the patch set is to widen the range of possible settings for the swappiness knob. In current kernels, it can go from zero (no swapping at all if possible) to 100 (reclaim anonymous and file-backed pages equally). Johannes raises the maximum to 200; at that value, the system will strongly favor swapping. That is a possibility nobody has ever wanted before, but fast drives have now made it useful. [/code]
< >
1622/22 megjegyzés mutatása
Laponként: 1530 50

Közzétéve: 2022. okt. 19., 21:07
Hozzászólások: 22